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?
aatjanAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Aaron TomoskySD-WAN SimplifiedCommented:
.net version? Mvc? Something you installed included that dll it sounds like
0
aatjanAuthor Commented:
Asp.net 4.0, no mvc.
0
Aaron TomoskySD-WAN SimplifiedCommented:
What is the xxx.dll? Usually a search for that tells you what's missing
0
Has Powershell sent you back into the Stone Age?

If managing Active Directory using Windows Powershell® is making you feel like you stepped back in time, you are not alone.  For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why.

aatjanAuthor Commented:
Hi,  the xxx.dll is not missing. It has a bad image frmat.
0
Aaron TomoskySD-WAN SimplifiedCommented:
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?
0
aatjanAuthor Commented:
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!
0
Aaron TomoskySD-WAN SimplifiedCommented:
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
0
aatjanAuthor Commented:
Hi. This is for asp.net 1...  
We are running on asp.net 4
0
Aaron TomoskySD-WAN SimplifiedCommented:
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.
0
aatjanAuthor Commented:
Hi,

I did: no result.

Then i read the message carefully;-
WRN: Assembly binding logging is turned OFF.

I turned it on and discovered that IIS was running its 32 bits version, despite of the fact that the app is a 64 bits version. So i changed the apppool settings. This changed the world.

Problem solved.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
aatjanAuthor Commented:
the fusion viewer showed that IIS was running in 32 bits. That does not work if the app itself is a 64 bits version.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft IIS Web Server

From novice to tech pro — start learning today.