Quantcast
Channel: Configuration and Deployment
Viewing all articles
Browse latest Browse all 3561

Problem with trying to deploy mvc 5 site to iis 7.5

$
0
0
<div>

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,

</div>

Viewing all articles
Browse latest Browse all 3561


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>