IIS7 application errors with providex odbc driver

I have a Windows 2008 SBS x64.
Setting up in IIS7 an asp.net application in the default website.
My application access a providex data source with the providex 32bit odbc driver.
I set up the driver with the c:\Windows\SysWOW64\odbcad32.exe
I have tired using the default application pool and also created a new application pool set to run in 32bit.
I also set file permissions to everyone full control.
I also gave the nt authority access to the dot net framework directory and iis metabase via command C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis -ga "NT AUTHORITY\NETWORK SERVICE

The strange thing is my application runs fine on Windows server 2008 standard. I cannot find the differences in my configuration between the two OS.

Here are two error message. One with 32bit and other with 64bit application pool

x64 error
Server Error in '/AccountLink' Application.
--------------------------------------------------------------------------------

Could not load file or assembly 'AccountLink' 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 'AccountLink' 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 'AccountLink' 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 'AccountLink' 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 'AccountLink' 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) +11204104
   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.UI.WebServiceParser.GetCompiledType(String inputFile, HttpContext context) +77
   System.Web.Services.Protocols.WebServiceHandlerFactory.GetHandler(HttpContext context, String verb, String url, String filePath) +231
   System.Web.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +425
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +263

 


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.4200; ASP.NET Version:2.0.50727.4016

x32 error
Server Error in Application "DEFAULT WEB SITE/ACCOUNTLINK"Internet Information Services 7.0
Error Summary
HTTP Error 500.19 - Internal Server Error
The requested page cannot be accessed because the related configuration data for the page is invalid. Detailed Error Information
Module DynamicCompressionModule
Notification SendResponse
Handler StaticFile
Error Code 0x8007007e
Requested URL http://localhost:80/AccountLink 
Physical Path E:\data root\accountlink
Logon Method Anonymous
Logon User Anonymous
Failed Request Tracing Log Directory e:\data root\accountlink
 Most likely causes:
•The worker process is unable to read the applicationhost.config or web.config file.
•There is malformed XML in the applicationhost.config or web.config file.
•The server cannot access the applicationhost.config or web.config file because of incorrect NTFS permissions.
 Things you can try:
•Look in the event logs for information about why the configuration files are not readable.
•Make sure the user identity specified for the application pool, or the authenticated user, has the required permissions to access the web.config file.
 Links and More InformationThis error occurs when there is a problem reading the configuration file for the Web server or Web application. In some cases, the event logs may contain more information about what caused this error.
View more information »


Any thought on my dilemma.
If you want images of error message let me know and i can attach them.
hstulbergAsked:
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.

feenixCommented:
The x64 error is because of trying to run a 32bit application in a 64bit environment. So that's normal.

The 32bit error mentions DynamicCompressionModule. Have you tried disabling dynamic content compression for the site to see if that has anything to do with the problem? Though the rest of the error is about permissions. You could also run process monitor on the server and see if it is a permission problem.

I'd guess there really is some problem with the configuration data. Is the application pool using the same .NET version in the machine where it works and on this one?
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
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
Windows Server 2008

From novice to tech pro — start learning today.