Error loading assembly after renaming path - asp.net

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

Related

Server Error in '/' Application. While accessing web site which is hosted on a shared network path (filer)

I am getting below error while accessing a web sites ,which is hosted on network filer. see i am using .net 2 application pool for application resources. under the same .net application pool i deployed two web sites . Let say web 1 and web 2 as an example. here web 1 config files and assemblies i deployed on a local systems C:\inetpub\wwwroot\folderx. For Web2 i hosted the resources on a network filer \share.test.com\test$\folderx and these content are the copied from the systems location C:\inetpub\wwwroot\folderx (copied folderx folder from system C:\inetpub\wwwroot) and i used a domain account frdomain\iisaccount to grant control on IIS to access these resources. My case the web site Web 1 which is hosted on local system is working fine . But i am agetting below mentioned error when i am accessing the web site which hosted on the network filer. Any thoughts .Filer side access are fine . tested and worked .But ASP.net2 is throwing erros . this is i hosted on windows 2012 server (IIS.8)
Server Error in '/' Application.
Required permissions cannot be acquired.
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.Security.Policy.PolicyException: Required permissions cannot be acquired.
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:
[PolicyException: Required permissions cannot be acquired.]
System.Security.SecurityManager.ResolvePolicy(Evidence evidence, PermissionSet reqdPset, PermissionSet optPset, PermissionSet denyPset, PermissionSet& denied, Boolean checkExecutionPermission) +7614163
System.Security.SecurityManager.ResolvePolicy(Evidence evidence, PermissionSet reqdPset, PermissionSet optPset, PermissionSet denyPset, PermissionSet& denied, Int32& securitySpecialFlags, Boolean checkExecutionPermission) +57
[FileLoadException: Could not load file or assembly 'ChilkatDotNet2, Version=8.7.0.0, Culture=neutral, PublicKeyToken=eb5fc1fc52ef09bd' or one of its dependencies. Failed to grant minimum permission requests. (Exception from HRESULT: 0x80131417)]
System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +0
System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +43
System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +127
System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +142
System.Reflection.Assembly.Load(String assemblyString) +28
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +46
[ConfigurationErrorsException: Could not load file or assembly 'ChilkatDotNet2, Version=8.7.0.0, Culture=neutral, PublicKeyToken=eb5fc1fc52ef09bd' or one of its dependencies. Failed to grant minimum permission requests. (Exception from HRESULT: 0x80131417)]
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +613
System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +203
System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) +105
System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +178
System.Web.Compilation.BuildProvidersCompiler..ctor(VirtualPath configPath, Boolean supportLocalization, String outputAssemblyName) +54
System.Web.Compilation.ApplicationBuildProvider.GetGlobalAsaxBuildResult(Boolean isPrecompiledApp) +232
System.Web.Compilation.BuildManager.CompileGlobalAsax() +51
System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +337
[HttpException (0x80004005): Could not load file or assembly 'ChilkatDotNet2, Version=8.7.0.0, Culture=neutral, PublicKeyToken=eb5fc1fc52ef09bd' or one of its dependencies. Failed to grant minimum permission requests. (Exception from HRESULT: 0x80131417)]
System.Web.Compilation.BuildManager.ReportTopLevelCompilationException() +58
System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +512
System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters) +729
[HttpException (0x80004005): Could not load file or assembly 'ChilkatDotNet2, Version=8.7.0.0, Culture=neutral, PublicKeyToken=eb5fc1fc52ef09bd' or one of its dependencies. Failed to grant minimum permission requests. (Exception from HRESULT: 0x80131417)]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +8999027
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +85
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +333
Version Information: Microsoft .NET Framework Version:2.0.50727.6421; ASP.NET Version:2.0.50727.6427
Download and Run ProcessMonitor a microsecond before you (F5) compile, stop trace, filter by 'file system' (ie turn off real time registry, process activity) and export just the HDD activity as csv. Open the csv in excel > data tab > in the results column Filter by 'path not found'.
You need to know where VS is looking for the ChilkatDotNet2 dll and either put the dll in that location or fix the assembly ref

Server Error in '/' Application - Could not load file or assembly

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.

asp.net within a hosted environment and Castle.Windsor -> Required permissions cannot be acquired

I am developing an asp.net 3.5 web application which is running perfectly on my local IIS server but gets me into a lot of trouble when publishing it to a hosted (1and1) environment.
When the web.config is loaded an "System.Security.Policy.PolicyException: Required permissions cannot be acquired." exception is thrown. The stack trace indicates that this is caused by my using of the Castle.Windsor framework:
[PolicyException: Required permissions cannot be acquired.]
System.Security.SecurityManager.ResolvePolicy(Evidence evidence,
PermissionSet reqdPset, PermissionSet optPset, PermissionSet denyPset,
PermissionSet& denied, Boolean checkExecutionPermission) +7606231
System.Security.SecurityManager.ResolvePolicy(Evidence evidence,
PermissionSet reqdPset, PermissionSet optPset, PermissionSet denyPset,
PermissionSet& denied, Int32& securitySpecialFlags, Boolean
checkExecutionPermission) +57
[FileLoadException: Could not load file or assembly 'Castle.Windsor,
Version=3.0.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc' or
one of its dependencies. Failed to grant minimum permission requests.
(Exception from HRESULT: 0x80131417)]
System.Reflection.Assembly._nLoad(AssemblyName fileName, String
codeBase, Evidence assemblySecurity, Assembly locationHint,
StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean
forIntrospection) +0 System.Reflection.Assembly.nLoad(AssemblyName
fileName, String codeBase, Evidence assemblySecurity, Assembly
locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound,
Boolean forIntrospection) +43
System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef,
Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean
forIntrospection) +127
System.Reflection.Assembly.InternalLoad(String assemblyString,
Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean
forIntrospection) +142 System.Reflection.Assembly.Load(String
assemblyString) +28
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String
assemblyName, Boolean starDirective) +46
[ConfigurationErrorsException: Could not load file or assembly
'Castle.Windsor, Version=3.0.0.0, Culture=neutral,
PublicKeyToken=407dd0808d44fbdc' or one of its dependencies. Failed to
grant minimum permission requests. (Exception from HRESULT:
0x80131417)]
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String
assemblyName, Boolean starDirective) +613
System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory()
+203 System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo
ai) +105
System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection
compConfig) +178
System.Web.Compilation.BuildProvidersCompiler..ctor(VirtualPath
configPath, Boolean supportLocalization, String outputAssemblyName)
+54 System.Web.Compilation.ApplicationBuildProvider.GetGlobalAsaxBuildResult(Boolean
isPrecompiledApp) +232
System.Web.Compilation.BuildManager.CompileGlobalAsax() +51
System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +337
[HttpException (0x80004005): Could not load file or assembly
'Castle.Windsor, Version=3.0.0.0, Culture=neutral,
PublicKeyToken=407dd0808d44fbdc' or one of its dependencies. Failed to
grant minimum permission requests. (Exception from HRESULT:
0x80131417)]
System.Web.Compilation.BuildManager.ReportTopLevelCompilationException()
+58 System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +512
System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager
appManager, IApplicationHost appHost, IConfigMapPathFactory
configMapPathFactory, HostingEnvironmentParameters hostingParameters)
+729
[HttpException (0x80004005): Could not load file or assembly
'Castle.Windsor, Version=3.0.0.0, Culture=neutral,
PublicKeyToken=407dd0808d44fbdc' or one of its dependencies. Failed to
grant minimum permission requests. (Exception from HRESULT:
0x80131417)] System.Web.HttpRuntime.FirstRequestInit(HttpContext
context) +8921851
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +85
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest
wr, HttpContext context) +333
I am pretty limited in investigate this problem due to the hosted environment restrictions - specifically I am unable to review the the machine.config and the IIS configuration. The one fact I know for sure is that it is running on a 2.0.50727.5456 framework... The hosters customer service is neither competent nor willing to help so I have to do it on my own.
Any suggestions how to take a deeper look into the causes or how to simply resolve this is really appreciated.
I found out that 1&1 uses a general medium trust-level for all hosted asp.net applications. It strongly seems that Castle Windsor is not able to run under such an permission-restricted environment (for instance reflection is not available there).
Fortunately there are a lot of alternatives (see which-ioc-runs-in-medium-trust) which can be used under such circumstances. I simply used simple injector which is a tiny (but for my purposes powerful-enough) IoC container and it does a great job and solved all my permission-problems.

Temporary ASP.NET Files Missing

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.

ASP.NET application developed in 32 bit environment not working in 64 bit environment

We have developed an ASP.NET website on a Windows 7 - 32 bit platform using Visual Studio 2008. This website is being hosted at a hosting company where we share a server with hundreds of other ASP.NET websites.
We are in the process of changing our hosting to a dedicated Windows 2008 - 64 bit server.
We have installed Visual Studio on this new server in order to debug our application.
If we try to start the application on this new server using Visual Studios 2008's own web server (not IIS 7) we get the error below.
We have tried to compile the application in both 32 as well as 64 bit mode. We also tried to compile to "Any CPU". But nothing helps. We also tried running Visual Studio as an administrator but without success.
We get the following error:
Server Error in '/' Application.
The specified module could not be found. (Exception from HRESULT: 0x8007007E)
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.FileNotFoundException: The specified module could not be found. (Exception from HRESULT: 0x8007007E)
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:
[FileNotFoundException: The specified module could not be found. (Exception from HRESULT: 0x8007007E)]
System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +0
System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +43
System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +127
System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +142
System.Reflection.Assembly.Load(String assemblyString) +28
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +46
[ConfigurationErrorsException: The specified module could not be found. (Exception from HRESULT: 0x8007007E)]
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +613
System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +203
System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) +105
System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +178
System.Web.Compilation.BuildProvidersCompiler..ctor(VirtualPath configPath, Boolean supportLocalization, String outputAssemblyName) +54
System.Web.Compilation.ApplicationBuildProvider.GetGlobalAsaxBuildResult(Boolean isPrecompiledApp) +232
System.Web.Compilation.BuildManager.CompileGlobalAsax() +51
System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +337
[HttpException (0x80004005): The specified module could not be found. (Exception from HRESULT: 0x8007007E)]
System.Web.Compilation.BuildManager.ReportTopLevelCompilationException() +58
System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +512
System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters) +729
[HttpException (0x80004005): The specified module could not be found. (Exception from HRESULT: 0x8007007E)]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +8897659
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +85
System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +259
Does anyone know why this error appears and how to solve it?
First of all, the error you are getting relates to a missing file, hence the FileNotFoundException. However, you are also getting HRESULT 0x8007007E, which points to a missing unmanaged DLL.
Here's how I would tackle this problem:
Step through the code to find where this exception occurs. With that HRESULT, I'm pretty sure you'll find the exception to be on a line where an unmanaged DLL function is called.
Identify what unmanaged DLL you're trying to use.
Check to see that it's there. First, you should check that any ones you are using are in their right places and are referenced correctly. If that is all OK, make sure that any dependencies they themselves have are there, too.
Also, after you complete step 2, we might be able to help you more if you tell us what type of unmanaged code you're using (i.e., what it might require to run, in terms of its own dependencies).
Hope I helped! :)
The error is not anything to do with processor-specific stuff. It is clearly a missing file that is causing this error. Have you double checked that you have all the required files and assemblies installed on the new dedicated server?
Does anyone of the error information indicate what module could not be found?
If not, verify the deployed bin directory has everything your site has when its working on your test server. Then go through the web.config and make sure all referenced modules are on the target server.

Resources