Compiler Error Message: CS0006

Discussion in 'ASP .Net' started by Bruce, Aug 4, 2006.

  1. Bruce

    Bruce Guest

    We suddenly got a mysterious error message on our Windows Server 2003 (SP1)
    after rolling out a bug fix on a web services application this morning. The
    application compiles and runs fine on the development workstation (from vs
    2005 on Windows XP Pro), but when I run "Copy Web Site..." to move the app
    out from VS to the server, then all accesses to the web service via a
    browser show this error message: "Compiler Error Message: CS0006: Metadata
    file" .... "System.EnterpriseServices.dll' could not be found". (Full
    error is pasted below.)



    I cannot find any references to this error on MS websites or knowledgebase.
    I have found several newsgroup references elsewhere stating that you need to
    place the DLL into the GAC. But from what I can tell, this
    EnterpriseServices DLL is a .NET assembly that is inherently already in the
    GAC. (And I looked on the server, and it is present in /windows/assembly.)
    Also, several posting say to remove "<identity impersonate="true" />" from
    web.config, but we have no such line in ours.



    Any recommendations? It's urgent for us.



    Thanks,

    Bruce



    ------------------------------------------------------------



    Server Error in '/ws0200' Application.

    Compilation Error

    Description: An error occurred during the compilation of a resource required
    to service this request. Please review the following specific error details
    and modify your source code appropriately.



    Compiler Error Message: CS0006: Metadata file
    'C:\WINDOWS\assembly\GAC_32\System.EnterpriseServices\2.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.dll'
    could not be found



    Source Error:



    [No relevant source lines]





    Source File: Line: 0





    Show Detailed Compiler Output:



    c:\windows\system32\inetsrv>
    "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\csc.exe" /t:library
    /utf8output
    /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Web.Mobile\2.0.0.0__b03f5f7f11d50a3a\System.Web.Mobile.dll"
    /R:"C:\WINDOWS\assembly\GAC_32\System.Data\2.0.0.0__b77a5c561934e089\System.Data.dll"
    /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Drawing\2.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll"
    /R:"C:\WINDOWS\assembly\GAC_32\System.Web\2.0.0.0__b03f5f7f11d50a3a\System.Web.dll"
    /R:"C:\WINDOWS\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll"
    /R:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorlib.dll"
    /R:"C:\WINDOWS\assembly\GAC_32\System.EnterpriseServices\2.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.dll"
    /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Configuration\2.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll"
    /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Web.Services\2.0.0.0__b03f5f7f11d50a3a\System.Web.Services.dll"
    /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Xml\2.0.0.0__b77a5c561934e089\System.Xml.dll"
    /out:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET
    Files\ws0200\ea7bc2bc\ba7084cf\App_Code.kdys5pgv.dll" /D:DEBUG /debug+
    /optimize- /w:4 /nowarn:1659;1699
    "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET
    Files\ws0200\ea7bc2bc\ba7084cf\App_Code.kdys5pgv.10.cs"
    "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET
    Files\ws0200\ea7bc2bc\ba7084cf\App_Code.kdys5pgv.3.cs"
    "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET
    Files\ws0200\ea7bc2bc\ba7084cf\App_Code.kdys5pgv.2.cs"
    "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET
    Files\ws0200\ea7bc2bc\ba7084cf\App_Code.kdys5pgv.1.cs"
    "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET
    Files\ws0200\ea7bc2bc\ba7084cf\App_Code.kdys5pgv.0.cs"
    "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET
    Files\ws0200\ea7bc2bc\ba7084cf\App_Code.kdys5pgv.7.cs"
    "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET
    Files\ws0200\ea7bc2bc\ba7084cf\App_Code.kdys5pgv.6.cs"
    "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET
    Files\ws0200\ea7bc2bc\ba7084cf\App_Code.kdys5pgv.9.cs"
    "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET
    Files\ws0200\ea7bc2bc\ba7084cf\App_Code.kdys5pgv.5.cs"
    "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET
    Files\ws0200\ea7bc2bc\ba7084cf\App_Code.kdys5pgv.8.cs"
    "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET
    Files\ws0200\ea7bc2bc\ba7084cf\App_Code.kdys5pgv.4.cs"
    "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET
    Files\ws0200\ea7bc2bc\ba7084cf\App_Code.kdys5pgv.11.cs"
    "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET
    Files\ws0200\ea7bc2bc\ba7084cf\App_Code.kdys5pgv.12.cs"





    Microsoft (R) Visual C# 2005 Compiler version 8.00.50727.42

    for Microsoft (R) Windows (R) 2005 Framework version 2.0.50727

    Copyright (C) Microsoft Corporation 2001-2005. All rights reserved.



    error CS0006: Metadata file
    'C:\WINDOWS\assembly\GAC_32\System.EnterpriseServices\2.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.dll'
    could not be found



    Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET
    Version:2.0.50727.42
    Bruce, Aug 4, 2006
    #1
    1. Advertising

  2. Hello Bruce,

    Nice to see you again and how are you doing?

    Regarding on the error message you mentioned, it seems the ASP.NET runtime
    failed to locate the System.EnterpriseServices.dll metadata assembly from
    the following loatino:

    "C:\WINDOWS\assembly\GAC_32\System.EnterpriseServices\2.0.0.0__b03f5f7f11d50
    a3a\"

    Based on my experience, this is likely a machine specific issue. Have you
    tried deploying the web application on other webserver machine to see
    whether it also suffers this issue?

    I've done some research in our internal database and found some former
    cases that have the similar symptom as yours. In those cases, the problem
    machine's GAC_32 seems has been corrupted(or not installed well) and the
    System.EnterpriseServices.dll assembly is not in the expected location(as
    above).

    To verify this, you can start the commandline prompt(cmd.exe) on the
    problem server machine and navigate to the following directory:

    C:\WINDOWS\assembly\GAC_32\System.EnterpriseServices\2.0.0.0__b03f5f7f11d50a
    3a\

    After that use "dir" command to see whether the
    System.EnterpriseServices.dll assembly is in it. If the assembly does be
    missing, you can manually copy a valid copy into it. You can find a copy of
    the "System.EnterpriseServices.dll" in the following location:


    C:\Windows\Microsoft.NET\Framework\v2.0.50727

    After you have copied the assembly, you can test the web application again
    to see whether it works.

    Hope this helps.

    Sincerely,

    Steven Cheng

    Microsoft MSDN Online Support Lead



    ==================================================

    Get notification to my posts through email? Please refer to

    http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
    ications.



    Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
    where an initial

    response from the community or a Microsoft Support Engineer within 1
    business day is

    acceptable. Please note that each follow up response may take approximately
    2 business days

    as the support professional working with you may need further investigation
    to reach the

    most efficient resolution. The offering is not appropriate for situations
    that require

    urgent, real-time or phone-based interactions or complex project analysis
    and dump analysis

    issues. Issues of this nature are best handled working with a dedicated
    Microsoft Support

    Engineer by contacting Microsoft Customer Support Services (CSS) at

    http://msdn.microsoft.com/subscriptions/support/default.aspx.

    ==================================================



    This posting is provided "AS IS" with no warranties, and confers no rights.
    Steven Cheng[MSFT], Aug 7, 2006
    #2
    1. Advertising

  3. Bruce

    benwhite

    Joined:
    Aug 8, 2007
    Messages:
    1
    I had this same issue...

    I simply ran the "Microsoft .NET Framework Version 2.0 Redistributable Package" again, and selected the repair option.
    Once I rebooted the machine, everything worked again.
    benwhite, Aug 8, 2007
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Invalidlastname

    Compiler Error Message: CS0006

    Invalidlastname, Nov 6, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    1,806
  2. Kris Vanherck

    Strange compiler behavior after CS0006 error

    Kris Vanherck, Apr 21, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    449
    Ignacio Machin \( .NET/ C# MVP \)
    Apr 21, 2004
  3. james margey
    Replies:
    4
    Views:
    701
    Wayne Brantley
    Nov 29, 2004
  4. =?Utf-8?B?U3RldmVuIEJlcmtvdml0eg==?=

    Compiler error CS0006

    =?Utf-8?B?U3RldmVuIEJlcmtvdml0eg==?=, Jun 27, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    2,920
    Steven Cheng[MSFT]
    Jun 28, 2005
  5. =?Utf-8?B?Um9iIFdpbGxpYW1z?=

    CS0006 Compiler Error - but none of the usual causes

    =?Utf-8?B?Um9iIFdpbGxpYW1z?=, Nov 24, 2006, in forum: ASP .Net
    Replies:
    2
    Views:
    368
    Surfin swede
    Dec 11, 2006
Loading...

Share This Page