Link to home
Start Free TrialLog in
Avatar of aatjan
aatjanFlag for Netherlands

asked on

deployment problem: web application runs on windows7/IIS 7, not on WIndows 2008/IIS7

HI,

I made an webapplication which runs fine on a windows 7 (64 bits) /IIS7 combination. App pool is asp.net 4, integrated, 32 bits apps allowed.

I want to deploy this app to windows 2008 r2 (64bits) /IIS7. Same app pool settings. So i copied the files from the WIndows 7 machine to the windows2008 r2 machine.

Now i'm facing with an error message like xxx.dll cannot be loaded, bad image format.

What could be the problem?
Avatar of Aaron Tomosky
Aaron Tomosky
Flag of United States of America image

.net version? Mvc? Something you installed included that dll it sounds like
Avatar of aatjan

ASKER

Asp.net 4.0, no mvc.
What is the xxx.dll? Usually a search for that tells you what's missing
Avatar of aatjan

ASKER

Hi,  the xxx.dll is not missing. It has a bad image frmat.
Let me try again:
Usually a search for whatever the error message is will give you insight to the solution. Can you please tell us the exact error message?
Avatar of aatjan

ASKER

Could not load file or assembly 'amzinet' 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 'amzinet' 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 'amzinet' 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 'amzinet' or one of its dependencies. An attempt was made to load a program with an incorrect format.]
   System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +0
   System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +39
   System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection, Boolean suppressSecurityChecks) +132
   System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +144
   System.Reflection.Assembly.Load(String assemblyString) +28
   System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +46

[ConfigurationErrorsException: Could not load file or assembly 'amzinet' 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) +618
   System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +209
   System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) +130
   System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +178
   System.Web.Compilation.BuildManager.GetPreStartInitMethodsFromReferencedAssemblies() +94
   System.Web.Compilation.BuildManager.CallPreStartInitMethods() +332
   System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +677

[HttpException (0x80004005): Could not load file or assembly 'amzinet' or one of its dependencies. An attempt was made to load a program with an incorrect format.]
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9106712
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +97
   System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +258

Thanks!
Did you follow these instructions:
http://www.amzi.com/manuals/kw4/runtime/aspnet_interface.html

It says you need to copy some files to windows/system32
Avatar of aatjan

ASKER

Hi. This is for asp.net 1...  
We are running on asp.net 4
I don't think so.
"Cannot find amzinet.dll or one of its dependencies
If you get the error that ASP.NET cannot find amzinet or one of its dependencies, it is likely because amzi.cfg, amzi.dll, aosutils.lsx and/or aodbc.lsx were not copied to the windows/system32 directory"

Try this and reboot.
ASKER CERTIFIED SOLUTION
Avatar of aatjan
aatjan
Flag of Netherlands image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of aatjan

ASKER

the fusion viewer showed that IIS was running in 32 bits. That does not work if the app itself is a 64 bits version.