Can any body please tell me what might be wrong here and how I may go about fixing it?
Thanks
Could not load file or assembly 'FrameProcessor_dll' 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 'FrameProcessor_dll' 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 'FrameProcessor_dll' could not be loaded.
=== Pre-bind state information === LOG: DisplayName = FrameProcessor_dll (Partial) WRN: Partial binding information was
supplied for an assembly: WRN: Assembly Name: FrameProcessor_dll |
Domain ID: 2 WRN: A partial bind occurs when only part of the assembly
display name is provided. WRN: This might result in the binder loading
an incorrect assembly. WRN: It is recommended to provide a fully
specified textual identity for the assembly, WRN: that consists of the
simple name, version, culture, and public key token. WRN: See
whitepaper http://go.microsoft.com/fwlink/?LinkId=109270 for more
information and common solutions to this issue. LOG: Appbase =
file:///C:/Users/Administrator/Downloads/Syncre/Syncre/SyncreWebServices/Syncre_LayerAB_WebService/
LOG: Initial PrivatePath =
C:\Users\Administrator\Downloads\Syncre\Syncre\SyncreWebServices\Syncre_LayerAB_WebService\bin
Calling assembly : (Unknown).
=== LOG: This bind starts in default load context. LOG: Using application configuration file:
C:\Users\Administrator\Downloads\Syncre\Syncre\SyncreWebServices\Syncre_LayerAB_WebService\web.config
LOG: Using host configuration file:
C:\Users\Administrator\Documents\IISExpress\config\aspnet.config LOG:
Using machine configuration file from
C:\Windows\Microsoft.NET\Framework\v4.0.30319\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:/Windows/Microsoft.NET/Framework/v4.0.30319/Temporary
ASP.NET Files/root/90b7448e/a25f12e1/FrameProcessor_dll.DLL. LOG:
Attempting download of new URL
file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/Temporary
ASP.NET
Files/root/90b7448e/a25f12e1/FrameProcessor_dll/FrameProcessor_dll.DLL.
LOG: Attempting download of new URL
file:///C:/Users/Administrator/Downloads/Syncre/Syncre/SyncreWebServices/Syncre_LayerAB_WebService/bin/FrameProcessor_dll.DLL.
ERR: Failed to complete setup of assembly (hr = 0x8007000b). Probing
terminated.
Stack Trace:
[BadImageFormatException: Could not load file or assembly
'FrameProcessor_dll' 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, 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
'FrameProcessor_dll' 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) +736
System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory()
+217 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) +284
System.Web.Compilation.BuildManager.ExecutePreAppStart() +153
System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager
appManager, IApplicationHost appHost, IConfigMapPathFactory
configMapPathFactory, HostingEnvironmentParameters hostingParameters,
PolicyLevel policyLevel, Exception appDomainCreationException) +521
[HttpException (0x80004005): Could not load file or assembly
'FrameProcessor_dll' or one of its dependencies. An attempt was made
to load a program with an incorrect format.]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9955652
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context)
+101 System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest
wr, HttpContext context) +254
Dependency Walker reveals that DLLS are intact.
check your IIS and ASP.NET set-up, and make sure that everything is running on target .net version. Check your application pool configuration too. It's not completely clear to detect the problem.
Also it may be fixed by Trying to clean Debug and Release folders in your solution.
Related
I've encountered this error message in my ASP.NET projects, but this latest instance really baffles me because nowhere in my project can I find any references to ReportViewer. Looking for any suggestions on how to figure out where this is coming from. Below is the stack trace info:
[FileNotFoundException: Could not load file or assembly 'Microsoft.ReportViewer.WebForms, Version=14.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The system cannot find the file specified.]
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.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +457
System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean forIntrospection) +110
System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +22
System.Reflection.Assembly.Load(String assemblyString) +34
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +48
[ConfigurationErrorsException: Could not load file or assembly 'Microsoft.ReportViewer.WebForms, Version=14.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The system cannot find the file specified.]
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +729
System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) +69
System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +226
System.Web.Compilation.BuildManager.GetPreStartInitMethodsFromReferencedAssemblies() +73
System.Web.Compilation.BuildManager.CallPreStartInitMethods(String preStartInitListPath, Boolean& isRefAssemblyLoaded) +321
System.Web.Compilation.BuildManager.ExecutePreAppStart() +170
System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +878
[HttpException (0x80004005): Could not load file or assembly 'Microsoft.ReportViewer.WebForms, Version=14.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The system cannot find the file specified.]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +525
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +124
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +700
Many of the Asp.Net controls require support from report viewer library to render the output. So, Try to install the package Microsoft Report Viewer Redistributable and then try to compile the solution. You might have removed this in your installation process or later inadvertently.
You could also try to go and check if you have the [Microsoft.ReportViewer.WebForms] and related assemblies listed in the GAC [C:\Windows\assembly] folder. If not it is not found there , then it is a clear indication that the implicit dependencies are not available in your workstation.
While I was never able to determine why I was getting the error described above, I discovered a workaround by copying a bunch of assemblies into the project's \bin folder from one of my other working applications on this server. These assemblies included:
Microsoft.ReportViewer.*
Microsoft.AI.Web
Microsoft.ApplicationInsights
Microsoft.AspNet.*
... and several others. It's still troubling me why this was even necessary since the code worked fine on not only my dev machine, but another test web server to which I first deployed it. If my project has no verifiable references to these things, yet still depends on them, then I would expect the publish tool should ensure that these dependencies are being deployed along with the rest of my code.
I have a solution with severals projects i use for learning purpose. Recently i added a new class library project. I somehow accidently named it NinjaDomain,Classes instead of the intended NinjaDomain.Classes (dot instead of comma)
Before i realised it i had done som coding in this project and referenced it from other projects.
I renamed the folder manualy to NinjaDomain.Classes which was not a smart thing to do. So i have searched through every proj and the sln file and all the files that can be searchable through Visual Studios advanced find.
I have deleted and readded the references. Ive checked their properties and seen that they point to the correctly spelled path folder.
I can build the project without errors at this point and i find no more misspellings but when i try to run the solutions MVC WebApi project i get this error:
Could not load file or assembly 'NinjaDomain\,Classes' or one of its dependencies. The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)
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.IO.FileLoadException: Could not load file or
assembly 'NinjaDomain\,Classes' or one of its dependencies. The given
assembly name or codebase was invalid. (Exception from HRESULT:
0x80131047)
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.
Stack Trace:
[FileLoadException: Could not load file or assembly
'NinjaDomain\,Classes' or one of its dependencies. The given assembly
name or codebase was invalid. (Exception from HRESULT: 0x80131047)]
System.Reflection.AssemblyName.nInit(RuntimeAssembly& assembly,
Boolean forIntrospection, Boolean raiseResolveEvent) +0
System.Reflection.RuntimeAssembly.CreateAssemblyName(String
assemblyString, Boolean forIntrospection, RuntimeAssembly&
assemblyFromResolveEvent) +113
System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString,
Evidence assemblySecurity, StackCrawlMark& stackMark, IntPtr
pPrivHostBinder, Boolean forIntrospection) +33
System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString,
Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean
forIntrospection) +21 System.Reflection.Assembly.Load(String
assemblyString) +28
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String
assemblyName, Boolean starDirective) +38
[ConfigurationErrorsException: Could not load file or assembly
'NinjaDomain\,Classes' or one of its dependencies. The given assembly
name or codebase was invalid. (Exception from HRESULT: 0x80131047)]
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String
assemblyName, Boolean starDirective) +726
System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory()
+196 System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo
ai) +45
System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection
compConfig) +172
System.Web.Compilation.BuildManager.GetPreStartInitMethodsFromReferencedAssemblies()
+91 System.Web.Compilation.BuildManager.CallPreStartInitMethods(String
preStartInitListPath, Boolean& isRefAssemblyLoaded) +111
System.Web.Compilation.BuildManager.ExecutePreAppStart() +156
System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager
appManager, IApplicationHost appHost, IConfigMapPathFactory
configMapPathFactory, HostingEnvironmentParameters hostingParameters,
PolicyLevel policyLevel, Exception appDomainCreationException) +674
[HttpException (0x80004005): Could not load file or assembly
'NinjaDomain\,Classes' or one of its dependencies. The given assembly
name or codebase was invalid. (Exception from HRESULT: 0x80131047)]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +772
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +95
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest
wr, HttpContext context) +195
I'm getting a FileNotFoundException while loading GraphicsMagick.NET-x64 from my web app. The error I get is this one:
[FileNotFoundException: Could not load file or assembly 'GraphicsMagick.NET-x64.DLL' or one of its dependencies. The specified module could not be found.]
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.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +210
System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean forIntrospection) +242
System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +17
System.Reflection.Assembly.Load(String assemblyString) +35
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +122
[ConfigurationErrorsException: Could not load file or assembly 'GraphicsMagick.NET-x64.DLL' or one of its dependencies. The specified module could not be found.]
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +12760614
System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +503
System.Web.Configuration.AssemblyInfo.get_AssemblyInternal() +142
System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +334
System.Web.Compilation.BuildManager.CallPreStartInitMethods(String preStartInitListPath) +203
System.Web.Compilation.BuildManager.ExecutePreAppStart() +152
System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +1151
[HttpException (0x80004005): Could not load file or assembly 'GraphicsMagick.NET-x64.DLL' or one of its dependencies. The specified module could not be found.]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +12880948
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +159
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +12722137
Until here it seemed as a typical missing reference. Enabling FusionLog says that the loading was correct:
*** Assembly Binder Log Entry (5/4/2015 # 1:59:21 PM) ***
The operation was successful.
Bind result: hr = 0x0. The operation completed successfully.
Assembly manager loaded from: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll
Running under executable c:\windows\system32\inetsrv\w3wp.exe
--- A detailed error log follows.
=== Pre-bind state information ===
LOG: User = MYDOMAIN\myuser
LOG: DisplayName = GraphicsMagick.NET-x64
(Partial)
WRN: Partial binding information was supplied for an assembly:
WRN: Assembly Name: GraphicsMagick.NET-x64 | Domain ID: 2
WRN: A partial bind occurs when only part of the assembly display name is provided.
WRN: This might result in the binder loading an incorrect assembly.
WRN: It is recommended to provide a fully specified textual identity for the assembly,
WRN: that consists of the simple name, version, culture, and public key token.
WRN: See whitepaper http://go.microsoft.com/fwlink/?LinkId=109270 for more information and common solutions to this issue.
LOG: Appbase = file:///D:/Inetpub/64bit/contentmanagement/
LOG: Initial PrivatePath = D:\Inetpub\64bit\contentmanagement\bin
LOG: Dynamic Base = C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\contentmanagement\74df6702
LOG: Cache Base = C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\contentmanagement\74df6702
LOG: AppName = 31019969
Calling assembly : (Unknown).
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: D:\Inetpub\64bit\contentmanagement\web.config
LOG: Using host configuration file: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet.config
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\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:/Windows/Microsoft.NET/Framework64/v4.0.30319/Temporary ASP.NET Files/contentmanagement/74df6702/31019969/GraphicsMagick.NET-x64.DLL.
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/Temporary ASP.NET Files/contentmanagement/74df6702/31019969/GraphicsMagick.NET-x64/GraphicsMagick.NET-x64.DLL.
LOG: Attempting download of new URL file:///D:/Inetpub/64bit/contentmanagement/bin/GraphicsMagick.NET-x64.DLL.
LOG: Assembly download was successful. Attempting setup of file: D:\Inetpub\64bit\contentmanagement\bin\GraphicsMagick.NET-x64.dll
LOG: Entering download cache setup phase.
LOG: Assembly Name is: GraphicsMagick.NET-x64, Version=1.0.0.0, Culture=neutral, PublicKeyToken=ee2094eb40f5ea47
LOG: A partially-specified assembly bind succeeded from the application directory. Need to re-apply policy.
LOG: Using application configuration file: D:\Inetpub\64bit\contentmanagement\web.config
LOG: Using host configuration file: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet.config
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config.
LOG: Post-policy reference: GraphicsMagick.NET-x64, Version=1.0.0.0, Culture=neutral, PublicKeyToken=ee2094eb40f5ea47
LOG: GAC Lookup was unsuccessful.
LOG: Binding succeeds. Returns assembly from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\contentmanagement\74df6702\31019969\assembly\dl3\978ebf9e\8e04cef5_4b86d001\GraphicsMagick.NET-x64.dll.
LOG: Assembly is loaded in default load context.
I'm not really sure what am I missing here, or if there is any way to get more/better logs.
The odd thing is that this GraphicsMagick error just happens on my Production environment (Development and Pre-production work OK). I compared (IIS mostly) configurations, side by side, feature by feature and saw now difference.
Whenever I launch the site from VS2013 (64-bit IIS Express), it also works well.
Environment
Application Pool:
Framework: v4
Enable 32-Bit Applications: false
IIS: 7.5
Ok, the problem was that we had not installed Visual C++ Redistributable for Visual Studio as GraphicsMagick's codeplex page clearly indicates... Thanks ProcessMonitor for your help!
BTW, I would have expected that Fusion logs produce all assembly loading related traces/errors, but that is not the case.
I am trying to work with the MS Lync UCMA 4.0 sdk and just switched to using Visual Studio 2012 (becuase .NET 4.5 Framework is required). I can't figure out what is going on here, I've set the Target CPU to x64 and the Target Framework to .Net Framework 4.5 because I was getting the error:
"Could not load file or assembly 'SIPEPS, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified."
Now that I've made these changes I get the below error.
Server Error in '/' Application.
--------------------------------------------------------------------------------
Could not load file or assembly 'Azure' 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 'Azure' 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 'Azure' could not be loaded.
=== Pre-bind state information ===
LOG: User = CREATIVE\kielhowell
LOG: DisplayName = Azure
(Partial)
WRN: Partial binding information was supplied for an assembly:
WRN: Assembly Name: Azure | Domain ID: 2
WRN: A partial bind occurs when only part of the assembly display name is provided.
WRN: This might result in the binder loading an incorrect assembly.
WRN: It is recommended to provide a fully specified textual identity for the assembly,
WRN: that consists of the simple name, version, culture, and public key token.
WRN: See whitepaper http://go.microsoft.com/fwlink/?LinkId=109270 for more information and common solutions to this issue.
LOG: Appbase = file:///C:/Visual Studio Projects/TPL/
LOG: Initial PrivatePath = C:\Visual Studio Projects\TPL\bin
Calling assembly : (Unknown).
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\Visual Studio Projects\TPL\web.config
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\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/kielhowell/AppData/Local/Temp/Temporary ASP.NET Files/root/186577b4/cde0def/Azure.DLL.
LOG: Attempting download of new URL file:///C:/Users/kielhowell/AppData/Local/Temp/Temporary ASP.NET Files/root/186577b4/cde0def/Azure/Azure.DLL.
LOG: Attempting download of new URL file:///C:/Visual Studio Projects/TPL/bin/Azure.DLL.
ERR: Failed to complete setup of assembly (hr = 0x8007000b). Probing terminated.
Stack Trace:
[BadImageFormatException: Could not load file or assembly 'Azure' 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, 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 'Azure' 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) +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) +258
System.Web.Compilation.BuildManager.ExecutePreAppStart() +135
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 'Azure' or one of its dependencies. An attempt was made to load a program with an incorrect format.]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9873912
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +101
System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +456
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.17929
I had a very similar problem. I found the problem was that it couldn't find the dependency, and I was able to find out which one by using a dependency walker.
Link
You can open your .exe here, and it'll point out what you're missing in your project. For me it was the Microsoft C++ redist.
I had a similar issue after I copied my test code from my local machine to the trusted application server. I had to remove the Microsoft.Rtc.Collaboration dll reference from the project and browsed it in the application server and re-linked it.
In my asp project throw error at the time running.
Yesterday it works nicely. But today morning it self it gives below message.
Could not load file or assembly 'file:///C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\bd6e4bde\6cbdacc0\App_global.asax.j5j-uxp-.dll' or one of its dependencies. The system cannot find the file specified.
Pls Any one tell me why it happnens and how to solve this issue.
Full Error is
Assembly Load Trace: The following information can be helpful to
determine why the assembly
'file:///C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary
ASP.NET Files\root\bd6e4bde\6cbdacc0\App_global.asax.j5j-uxp-.dll'
could not be loaded.
=== Pre-bind state information === LOG: User = HOME-PC\HOME LOG: Where-ref bind. Location =
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET
Files\root\bd6e4bde\6cbdacc0\App_global.asax.j5j-uxp-.dll LOG: Appbase
= file:///G:/Jagadeeswaran/Test Project/MobileApp/MobileApp/MobileApp/ LOG: Initial PrivatePath = G:\Jagadeeswaran\Test
Project\MobileApp\MobileApp\MobileApp\bin Calling assembly :
(Unknown).
=== LOG: This bind starts in LoadFrom load context. WRN: Native image will not be probed in LoadFrom context. Native image will only be
probed in default load context, like with Assembly.Load(). LOG: Using
application configuration file: G:\Jagadeeswaran\Test
Project\MobileApp\MobileApp\MobileApp\web.config LOG: Using host
configuration file: LOG: Using machine configuration file from
C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Attempting download of new URL
file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/Temporary
ASP.NET Files/root/bd6e4bde/6cbdacc0/App_global.asax.j5j-uxp-.dll.
Stack Trace:
[FileNotFoundException: Could not load file or assembly 'file:///C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary
ASP.NET Files\root\bd6e4bde\6cbdacc0\App_global.asax.j5j-uxp-.dll' or
one of its dependencies. The system cannot find the file specified.]
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.Assembly.Load(AssemblyName assemblyRef, Evidence assemblySecurity) +28
System.CodeDom.Compiler.CompilerResults.get_CompiledAssembly() +93
System.Web.Compilation.BuildProvider.CreateBuildResult(CompilerResults
results) +65
System.Web.Compilation.BuildProvider.GetBuildResult(CompilerResults
results) +16
System.Web.Compilation.ApplicationBuildProvider.GetGlobalAsaxBuildResult(Boolean
isPrecompiledApp) +8999743
System.Web.Compilation.BuildManager.CompileGlobalAsax() +50
System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +265
[HttpException (0x80004005): Could not load file or assembly 'file:///C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary
ASP.NET Files\root\bd6e4bde\6cbdacc0\App_global.asax.j5j-uxp-.dll' or
one of its dependencies. The system cannot find the file specified.]
System.Web.Compilation.BuildManager.ReportTopLevelCompilationException()
+62
System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +421
System.Web.Compilation.BuildManager.CallAppInitializeMethod() +31
System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager
appManager, IApplicationHost appHost, IConfigMapPathFactory
configMapPathFactory, HostingEnvironmentParameters hostingParameters,
PolicyLevel policyLevel, Exception appDomainCreationException) +691
[HttpException (0x80004005): Could not load file or assembly 'file:///C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary
ASP.NET Files\root\bd6e4bde\6cbdacc0\App_global.asax.j5j-uxp-.dll' or
one of its dependencies. The system cannot find the file specified.]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +8972180
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +97
System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +258
So I re install the Vs 2010 also But Same error repeat.
Please Help me to solve this issue.
Check if you have disabled CopyLocal in Visual Studio project and enable it. It seems some assembly dependencies are not copied to temp folder and you get the run-time binding error.