Skip to Content
0
Former Member
Feb 28, 2010 at 06:41 PM

Problems running VS2008 ASP.NET Web Application on 64-bit OS

14 Views

Hi,

I have a working Visual Studio 2008 ASP.NET Web Application that uses SQL Server 2005 and the full version of Crystal Reports 2008 (12.2.0.290) which I integrated into Visual Studio using the Visual Studio Integration Manager. The application is currently running on Windows 2003 Server (32 Bit) with IIS 6.0. The application is complied to run as an x86 application (Advanced Complier Settings). My production server is running Windows 2003 Server (64 bit) and also has Visual Studio 2008 and the same version of Crystal Reports installed. When I move the application over to the 64 bit server and run it on the server I receive the error shown below. I have also tried to configure IIS to Run 32-bit applications but backed this change out as I didnu2019t know if it was needed. If anyone can help me I would sincerely appreciated it!

Thanks in advance -> Glenn

Server Error in '/Test2' Application.

-


Could not load file or assembly 'WebAppTemplate2' 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 'WebAppTemplate2' 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 'WebAppTemplate2' could not be loaded.

WRN: Assembly binding logging is turned OFF.

To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.

Note: There is some performance penalty associated with assembly bind failure logging.

To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

Stack Trace:

[BadImageFormatException: Could not load file or assembly 'WebAppTemplate2' 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) +416

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

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

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

[ConfigurationErrorsException: Could not load file or assembly 'WebAppTemplate2' 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) +11195528

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

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

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

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

System.Web.Compilation.WebDirectoryBatchCompiler..ctor(VirtualDirectory vdir) +191

System.Web.Compilation.BuildManager.BatchCompileWebDirectoryInternal(VirtualDirectory vdir, Boolean ignoreErrors) +54

System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath) +295

System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) +476

System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) +116

System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean noAssert) +175

System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp, Boolean noAssert) +52

System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) +50

System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig) +503

System.Web.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +142

System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +263

-


Version Information: Microsoft .NET Framework Version:2.0.50727.3053; ASP.NET Version:2.0.50727.3053