Could not load file or assembly 'file:///C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\ asp.net vs2010
Try performing a full solution build. If that doesn't work, click Build -> Clean Solution
. If the error persists, delete everything in the C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\parktms
folder and repeat.
![skhurams](https://i.stack.imgur.com/P4xvU.jpg?s=256&g=1)
skhurams
I have devleoped professional projects in Asp.net , dotnet v2 to dotnet Core v3.1, Sqlserver,SSRS ,DotnetNuke, jquerymobile ,cordova/Phonegap,,Crystal Reports, C# and Vb.net etc im still learning Xamarin
Updated on June 28, 2022Comments
-
skhurams almost 2 years
Yesterday my project was running smoothly but today I'm facing an error. Here are the details:
Could not load file or assembly 'file:///C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\parktms\c8392404\1ba3bab5\App_Web_login.aspx.6cc23264.lmj8uym6.dll' or one of its dependencies. The handle is invalid. (Exception from HRESULT: 0x80070006 (E_HANDLE)) 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 'file:///C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\parktms\c8392404\1ba3bab5\App_Web_login.aspx.6cc23264.lmj8uym6.dll' or one of its dependencies. The handle is invalid. (Exception from HRESULT: 0x80070006 (E_HANDLE))
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 'file:///C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\parktms\c8392404\1ba3bab5\App_Web_login.aspx.6cc23264.lmj8uym6.dll' or one of its dependencies. The handle is invalid. (Exception from HRESULT: 0x80070006 (E_HANDLE))] 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.TemplateControlBuildProvider.CreateBuildResult(CompilerResults results) +36 System.Web.Compilation.BuildProvider.GetBuildResult(CompilerResults results) +16 System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath) +8967378 System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate) +320 System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate) +111 System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean throwIfNotFound) +125 System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp) +52 System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) +31 System.Web.UI.PageHandlerFactory.System.Web.IHttpHandlerFactory2.GetHandler(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) +40 System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig) +167 System.Web.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +128 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +184
Version Information:
Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.225
why am I having this problem and how do I get rid of it?
-
skhurams about 12 yearsthanks it worked but can you tell me what went wrong to avoid future mishaps
-
Chris Gessler about 12 yearsThe compiler was unable to copy one of the output files to the temp folder. File might have been in-use at time. Hard to say without seeing your build or system logs.
-
skhurams about 12 yearsim using mygeneration in my project now its saying Error 1 The type or namespace name 'SqlClientEntity' could not be found (are you missing a using directive or an assembly reference?) E:\Projects\parkingticket\Projects Application\ParkTMS\App_Code\Generated_vw_Tickets.cs 22 38 E:\...\ParkTMS\ while i have added doodads reference
-
Chris Gessler about 12 yearsThis might get you started... mygenerationsoftware.com/phpBB3/viewtopic.php?f=8&t=1104
-
Иво Недев over 6 years@ChrisGessler God I hope you're still active. Any suggestions about a WinForms WebSite and not a project. I do still have the Build Project and Build Website buttons (VS17, so no "Clearn") But the site is run off of IIS and is copied and not deployed ?
-
Chris Gessler over 6 yearsThe only thing "Clean Solution" does is delete the output files from the bin folder. You can do that step manually.