Moving from IIS6 to IIS7 and it won't load

Discussion in 'ASP .Net' started by David Thielen, Sep 10, 2008.

  1. So we have moved our app from .NET version 2.X in IIS6 to a Windows
    2008 Server running IIS7.

    We have copied all files to the Windwardreports\apps directory and
    that apps directory has been converted to an application running in
    ..NET 2.X and Integrated mode.

    We copied over the DB and edited the web.config file to the DB
    username and password. I also added the NETWORK SERVICE user to the
    DB.

    We checked all DLL’s to make sure they are all AnyCpu and they are.

    We have added the below registry entry to get more info but none is
    given. These are the core DLLs the store is using to run and I think
    it just picked Apache.Crimson because it is the first of the 12 that
    it needs.

    This file does exist in both the store\lib and store\bin directories
    so I am not sure why it cannot find it.

    The trust level on the apps dir in IIS7 is set to Full Internal so
    that should not be an issue.

    Any idea why we get the below?

    thanks - dave

    Upon opening the webpage for the first time I always get this error:



    Server Error in '/apps' Application.


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

    Could not load file or assembly 'Apache.Crimson' or one of its
    dependencies. An attempt was made to load a program with an incorrect
    format.

    Description: An unhandled exception occurred during the execution of
    the current web request. Please review the stack trace for more
    information about the error and where it originated in the code.

    Exception Details: System.BadImageFormatException: Could not load file
    or assembly 'Apache.Crimson' or one of its dependencies. An attempt
    was made to load a program with an incorrect format.

    Source Error:

    An unhandled exception was generated during the execution of the
    current web request. Information regarding the origin and location of
    the exception can be identified using the exception stack trace below.



    Assembly Load Trace: The following information can be helpful to
    determine why the assembly 'Apache.Crimson' could not be loaded.



    === Pre-bind state information ===

    LOG: User = NT AUTHORITY\NETWORK SERVICE

    LOG: DisplayName = Apache.Crimson

    (Partial)

    LOG: Appbase = file:///C:/inetpub/wwwroot/windwardreports/apps/

    LOG: Initial PrivatePath = C:\inetpub\wwwroot\windwardreports\apps\bin

    Calling assembly : (Unknown).

    ===

    LOG: This bind starts in default load context.

    LOG: Using application configuration file:
    C:\inetpub\wwwroot\windwardreports\apps\web.config

    LOG: Using host configuration file:
    C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Aspnet.config

    LOG: Using machine configuration file from
    C:\Windows\Microsoft.NET\Framework64\v2.0.50727\config\machine.config.

    LOG: Policy not being applied to reference at this time (private,
    custom, partial, or location-based assembly bind).

    LOG: Attempting download of new URL
    file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/Temporary
    ASP.NET Files/apps/56321f29/7ad90c14/Apache.Crimson.DLL.

    LOG: Attempting download of new URL
    file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/Temporary
    ASP.NET
    Files/apps/56321f29/7ad90c14/Apache.Crimson/Apache.Crimson.DLL.

    LOG: Attempting download of new URL
    file:///C:/inetpub/wwwroot/windwardreports/apps/bin/Apache.Crimson.DLL.

    ERR: Failed to complete setup of assembly (hr = 0x8007000b). Probing
    terminated.



    Stack Trace:



    [BadImageFormatException: Could not load file or assembly
    'Apache.Crimson' or one of its dependencies. An attempt was made to
    load a program with an incorrect format.]

    System.Reflection.Assembly._nLoad(AssemblyName fileName, String
    codeBase, Evidence assemblySecurity, Assembly locationHint,
    StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean
    forIntrospection) +0

    System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef,
    Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean
    forIntrospection) +465

    System.Reflection.Assembly.InternalLoad(String assemblyString,
    Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean
    forIntrospection) +181

    System.Reflection.Assembly.Load(String assemblyString) +42


    System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String
    assemblyName, Boolean starDirective) +190



    [ConfigurationErrorsException: Could not load file or assembly
    'Apache.Crimson' or one of its dependencies. An attempt was made to
    load a program with an incorrect format.]


    System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String
    assemblyName, Boolean starDirective) +3642952


    System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory()
    +402


    System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo
    ai) +155

    System.Web.Configuration.AssemblyInfo.get_AssemblyInternal() +36


    System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection
    compConfig) +235

    System.Web.Compilation.BuildProvidersCompiler..ctor(VirtualPath
    configPath, Boolean supportLocalization, String outputAssemblyName)
    +76


    System.Web.Compilation.CodeDirectoryCompiler.GetCodeDirectoryAssembly(VirtualPath
    virtualDir, CodeDirectoryType dirType, String assemblyName, StringSet
    excludedSubdirectories, Boolean isDirectoryAllowed) +2945079


    System.Web.Compilation.BuildManager.CompileCodeDirectory(VirtualPath
    virtualDir, CodeDirectoryType dirType, String assemblyName, StringSet
    excludedSubdirectories) +204

    System.Web.Compilation.BuildManager.CompileCodeDirectories() +615

    System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled()
    +739



    [HttpException (0x80004005): Could not load file or assembly
    'Apache.Crimson' or one of its dependencies. An attempt was made to
    load a program with an incorrect format.]




    System.Web.Compilation.BuildManager.ReportTopLevelCompilationException()
    +79

    System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled()
    +2944472

    System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager
    appManager, IApplicationHost appHost, IConfigMapPathFactory
    configMapPathFactory, HostingEnvironmentParameters hostingParameters)
    +1163



    [HttpException (0x80004005): Could not load file or assembly
    'Apache.Crimson' or one of its dependencies. An attempt was made to
    load a program with an incorrect format.]

    System.Web.HttpRuntime.FirstRequestInit(HttpContext context)
    +2740375

    System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context)
    +88

    System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr)
    +2740285






    david@
    Windward Reports -- http://www.WindwardReports.com
    me -- http://dave.thielen.com

    Cubicle Wars - http://www.windwardreports.com/film.htm
     
    David Thielen, Sep 10, 2008
    #1
    1. Advertising

  2. More on this - we got it working by doing the following:

    1) In the application pools right clicking and then selecting Set
    Application Pool Defaults

    2) Setting Enable 32-bit Applications to True

    The thing is, we have all AnyCpu DLLs - why is this happening?

    thanks - dave



    On Wed, 10 Sep 2008 12:03:55 -0600, David Thielen
    <> wrote:

    >So we have moved our app from .NET version 2.X in IIS6 to a Windows
    >2008 Server running IIS7.
    >
    >We have copied all files to the Windwardreports\apps directory and
    >that apps directory has been converted to an application running in
    >.NET 2.X and Integrated mode.
    >
    >We copied over the DB and edited the web.config file to the DB
    >username and password. I also added the NETWORK SERVICE user to the
    >DB.
    >
    >We checked all DLL’s to make sure they are all AnyCpu and they are.
    >
    >We have added the below registry entry to get more info but none is
    >given. These are the core DLLs the store is using to run and I think
    >it just picked Apache.Crimson because it is the first of the 12 that
    >it needs.
    >
    >This file does exist in both the store\lib and store\bin directories
    >so I am not sure why it cannot find it.
    >
    >The trust level on the apps dir in IIS7 is set to Full Internal so
    >that should not be an issue.
    >
    >Any idea why we get the below?
    >
    >thanks - dave



    david@
    Windward Reports -- http://www.WindwardReports.com
    me -- http://dave.thielen.com

    Cubicle Wars - http://www.windwardreports.com/film.htm
     
    David Thielen, Sep 10, 2008
    #2
    1. Advertising

  3. Hi Dave,

    Regarding on the two changes you've made below:

    ======================
    1) In the application pools right clicking and then selecting Set
    Application Pool Defaults

    2) Setting Enable 32-bit Applications to True
    =======================

    I think the 2) should be the critical one. Maybe something in your web
    application is specific to 32 bit runtime. For the 'Apache.Crimson" , is it
    a pure .net assembly or unmanaged win32 dll. Or does it have any other
    depedency assemblies whch is specfici to 32 bit environment?

    Sincerely,

    Steven Cheng

    Microsoft MSDN Online Support Lead


    Delighting our customers is our #1 priority. We welcome your comments and
    suggestions about how we can improve the support we provide to you. Please
    feel free to let my manager know what you think of the level of service
    provided. You can send feedback directly to my manager at:
    .

    ==================================================
    Get notification to my posts through email? Please refer to
    http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.

    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://support.microsoft.com/select/default.aspx?target=assistance&ln=en-us.
    ==================================================
    This posting is provided "AS IS" with no warranties, and confers no rights.




    --------------------
    >From: David Thielen <>
    >Subject: Re: Moving from IIS6 to IIS7 and it won't load
    >Date: Wed, 10 Sep 2008 14:37:22 -0600


    >
    >More on this - we got it working by doing the following:
    >
    >1) In the application pools right clicking and then selecting Set
    >Application Pool Defaults
    >
    >2) Setting Enable 32-bit Applications to True
    >
    >The thing is, we have all AnyCpu DLLs - why is this happening?
    >
    >thanks - dave
    >
    >
    >
    >On Wed, 10 Sep 2008 12:03:55 -0600, David Thielen
    ><> wrote:
    >
    >>So we have moved our app from .NET version 2.X in IIS6 to a Windows
    >>2008 Server running IIS7.
    >>
    >>We have copied all files to the Windwardreports\apps directory and
    >>that apps directory has been converted to an application running in
    >>.NET 2.X and Integrated mode.
    >>
    >>We copied over the DB and edited the web.config file to the DB
    >>username and password. I also added the NETWORK SERVICE user to the
    >>DB.
    >>
    >>We checked all DLL’s to make sure they are all AnyCpu and they are.
    >>
    >>We have added the below registry entry to get more info but none is
    >>given. These are the core DLLs the store is using to run and I think
    >>it just picked Apache.Crimson because it is the first of the 12 that
    >>it needs.
    >>
    >>This file does exist in both the store\lib and store\bin directories
    >>so I am not sure why it cannot find it.
    >>
    >>The trust level on the apps dir in IIS7 is set to Full Internal so
    >>that should not be an issue.
    >>
    >>Any idea why we get the below?
    >>
    >>thanks - dave

    >
    >
     
    Steven Cheng [MSFT], Sep 11, 2008
    #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. linkswanted
    Replies:
    0
    Views:
    1,270
    linkswanted
    Dec 21, 2007
  2. linkswanted
    Replies:
    0
    Views:
    1,601
    linkswanted
    Jan 6, 2008
  3. ADNT
    Replies:
    3
    Views:
    2,052
  4. Tedmond

    Upgrade from IIS6 to IIS7 on 2000 server

    Tedmond, Jul 18, 2009, in forum: ASP .Net Web Services
    Replies:
    1
    Views:
    907
    Mr. Arnold
    Jul 18, 2009
  5. Andrew Wan
    Replies:
    2
    Views:
    172
    David Wang
    Feb 16, 2007
Loading...

Share This Page