Skip to Main Content

ODP.NET

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Deployment problem between odp.net and iis 7.5

Tony DunsworthMay 22 2014 — edited May 29 2014

I have a feeling that this is in the wrong area, but I'm going to post to see if I can get some direction to the right area..... I was referred this way by folks at the asp.net website forums because they are convinced the problem is in odp.net and I am not in agreement, but if I can get some direction or close off an avenue of attack, I would like to do so.

I apologize in advance for the long post. I've been working on a fairly simple ASP.NET MVC 5 site (Simple CRUD) using EF 5.0 and Oracle's ODP.NET 4.112.4.0. I am using VS2013 on an 64 bit machine and it is to deploy to IIS 7.5 running on a Windows 2008 r2 Server. I set my build status to x86 as that is what is registered in the C:\Windows\Assembly on the target machine. I ensured that the version of Oracle.DataAccess.dll is also a 32 bit version and that it matches version number to what is registered on the target server. (You can tell I've been stumbling around this awhile.) When I build it, I can run it on my local machine's IIS Express installation with no problems. Every page renders, it looks fantastic, it all works as designed. If only I could leave it running on my dev machine and point the users to that....

When I deploy it over to the production server. I use Web Deploy and I copy over all of the files. The Oracle.DataAccess.dll is set to Copy Local="True" just to be safe. It builds and publishes correctly, but the site gives me the following error:

Could not load file or assembly 'Oracle.DataAccess, Version=4.112.4.0, Culture=neutral, PublicKeyToken=89b483f429c47342'. This assembly was compiled for a different processor.

Exception Details: System.BadImageFormatException: Could not load file or assembly 'Oracle.DataAccess, Version=4.112.4.0, Culture=neutral, PublicKeyToken=89b483f429c47342'. This assembly was compiled for a different processor.

Stack Trace: [BadImageFormatException: Could not load file or assembly 'Oracle.DataAccess, Version=4.112.4.0, Culture=neutral, PublicKeyToken=89b483f429c47342'. This assembly was compiled for a different processor.] System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +0 System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +34 System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +152 System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean forIntrospection) +77 System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +16 System.Reflection.Assembly.Load(String assemblyString) +28 System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +38 [ConfigurationErrorsException: Could not load file or assembly 'Oracle.DataAccess, Version=4.112.4.0, Culture=neutral, PublicKeyToken=89b483f429c47342'. This assembly was compiled for a different processor.] System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +752 System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +218 System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) +130 System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +170 System.Web.Compilation.BuildManager.GetPreStartInitMethodsFromReferencedAssemblies() +91 System.Web.Compilation.BuildManager.CallPreStartInitMethods(String preStartInitListPath, Boolean& isRefAssemblyLoaded) +285 System.Web.Compilation.BuildManager.ExecutePreAppStart() +153 System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +516 [HttpException (0x80004005): Could not load file or assembly 'Oracle.DataAccess, Version=4.112.4.0, Culture=neutral, PublicKeyToken=89b483f429c47342'. This assembly was compiled for a different processor.] System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9913572 System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +101 System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +254

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.184

I have the application in its own file and as its own site. The Application Pool is version 4.0.30319 and pipeline mode is Integrated. I've also enabled 32-bit applications on this pool. I've been researching in vain trying to determine what else I need to do to get this situated, so I'm coming here and to asp.net to see if someone else can help me see what I've been missing.

Cheers,

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 26 2014
Added on May 22 2014
5 comments
3,411 views