Hi,
I'm trying to run a solution on Azure. I'm using the latest DO RC2 release dlls. As soon as I add the Xtensive assemblies as references to the Services role project, upon debugging and navigating to http://127.0.0.1:8091/MyService.svc, I get the below exception.
I'm guessing it has something to do with the fact that I'm running Windows 7 x64 and the Oracle dll isn't present in x64 format (note the bad image format message in the error)...but my question is why is simply referencing the Xtensive dlls causing my services role to try to load the Oracle dll(s)? I'm not even referencing the Oracle specific Xtensive dlls. I've created an x86 build configuration but then I get a message from Visual Studio telling me that Azure tools only supports AnyCPU and x64.
Thanks in advance for your assistance.
Server Error in '/' Application.
--------------------------------------------------------------------------------
Could not load file or assembly 'Oracle.DataAccess' 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 'Oracle.DataAccess' 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 'Oracle.DataAccess' could not be loaded.
=== Pre-bind state information ===
LOG: User = sd39p2\Administrator
LOG: DisplayName = Oracle.DataAccess
(Partial)
LOG: Appbase = file:///D:/Development/Soaf/Soaf/bin/Debug/Soaf.csx/roles/Soaf.Services/approot/
LOG: Initial PrivatePath = D:\Development\Soaf\Soaf\bin\Debug\Soaf.csx\roles\Soaf.Services\approot\bin
Calling assembly : System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: D:\Development\Soaf\Soaf\bin\Debug\Soaf.csx\roles\Soaf.Services\approot\web.config
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v2.0.50727\config\machine.config.
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Attempting download of new URL file:///C:/Users/Administrator/AppData/Local/dftmp/s0/deployment(35)/res/deployment(35).Soaf.Soaf.Services.0/aspNetTemp/aspNetTemp/root/5e783598/8912df93/Oracle.DataAccess.DLL.
LOG: Attempting download of new URL file:///C:/Users/Administrator/AppData/Local/dftmp/s0/deployment(35)/res/deployment(35).Soaf.Soaf.Services.0/aspNetTemp/aspNetTemp/root/5e783598/8912df93/Oracle.DataAccess/Oracle.DataAccess.DLL.
LOG: Attempting download of new URL file:///D:/Development/Soaf/Soaf/bin/Debug/Soaf.csx/roles/Soaf.Services/approot/bin/Oracle.DataAccess.DLL.
ERR: Failed to complete setup of assembly (hr = 0x8007000b). Probing terminated.
Stack Trace:
[BadImageFormatException: Could not load file or assembly 'Oracle.DataAccess' 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) +147
[ConfigurationErrorsException: Could not load file or assembly 'Oracle.DataAccess' 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) +1413
System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +673
System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) +131
System.Web.Configuration.AssemblyInfo.get_AssemblyInternal() +92
System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +293
System.Web.Compilation.WebDirectoryBatchCompiler..ctor(VirtualDirectory vdir) +342
System.Web.Compilation.BuildManager.BatchCompileWebDirectoryInternal(VirtualDirectory vdir, Boolean ignoreErrors) +94
System.Web.Compilation.BuildManager.BatchCompileWebDirectory(VirtualDirectory vdir, VirtualPath virtualDir, Boolean ignoreErrors) +513
System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath) +245
System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) +885
System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) +162
System.Web.Compilation.BuildManager.GetVPathBuildResult(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) +103
System.Web.Compilation.BuildManager.GetVPathBuildResult(VirtualPath virtualPath) +58
System.Web.Compilation.BuildManager.GetCompiledCustomString(String virtualPath) +73
System.ServiceModel.HostingManager.GetCompiledCustomString(String normalizedVirtualPath) +278
System.ServiceModel.HostingManager.CreateService(String normalizedVirtualPath) +202
System.ServiceModel.HostingManager.ActivateService(String normalizedVirtualPath) +67
System.ServiceModel.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath) +1004
[ServiceActivationException: The service '/DataService.svc' cannot be activated due to an exception during compilation. The exception message is: Could not load file or assembly 'Oracle.DataAccess' or one of its dependencies. An attempt was made to load a program with an incorrect format..]
System.ServiceModel.AsyncResult.End(IAsyncResult result) +758
System.ServiceModel.Activation.HostedHttpRequestAsyncResult.End(IAsyncResult result) +490
System.ServiceModel.Activation.ServiceHttpModule.EndProcessRequest(IAsyncResult ar) +78
System.Web.AsyncEventExecutionStep.OnAsyncEventCompletion(IAsyncResult ar) +202
Updated at 01.03.2010 3:58:00
Ok, nevermind, I figured it out. It was caused by referencing Xtensive.Storage.All, which seems to include all your storage providers...
Is there any documentation on what dlls I should be referencing for my solution? I've been just guessing/copying from some of your sample projects. There are a bunch of dlls and it's not clear to me what's necessary and what's not...especialling with those Indexing and Modeling dlls...
A list of each dll, what it's responsible for and whether or not it's required would be really helpful.
Thank you.
This thread was imported from our support forum. The original discussion may contain more detailed answer.
Original topic by JeffN.
asked
Mar 01 '10 at 03:47
Editor
46●156●156●157