Moving from IIS6 to IIS7 and it won't load

  • Thread starter Thread starter David Thielen
  • Start date Start date
D

David Thielen

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@[email protected]
Windward Reports -- http://www.WindwardReports.com
me -- http://dave.thielen.com

Cubicle Wars - http://www.windwardreports.com/film.htm
 
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



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@[email protected]
Windward Reports -- http://www.WindwardReports.com
me -- http://dave.thielen.com

Cubicle Wars - http://www.windwardreports.com/film.htm
 
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:
(e-mail address removed).

==================================================
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.




--------------------
 
Back
Top