ASP.NET configuration tool is looking for a file I deleted
OK, so I thought I was solving a problem and I created an even bigger one. I was trying to get rid of a lingering reference to MySql
and deleted a bunch of files from the Temporary ASP.NET files directory. Now, when I try to run the ASP.NET configuration tool I get this, reprinted in its full glory:
System.InvalidCastException: [A]System.Web.Administration.WebAdminRemotingManager cannot be cast to [B]System.Web.Administration.WebAdminRemotingManager. Type A originates fro开发者_如何学Pythonm 'App_Code.eyfytrpm, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' in the context 'Default' at location 'C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\asp.netwebadminfiles\1f61ecce\354a2473\App_Code.eyfytrpm.dll'. Type B originates from 'App_Code.y-perhho, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' in the context 'Default' at location 'C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\asp.netwebadminfiles\1f61ecce\354a2473\App_Code.y-perhho.dll'. at System.Web.Administration.WebAdminPage.get_RemotingManager() at System.Web.Administration.WebAdminPage.SaveConfig(Configuration config) at System.Web.Administration.WebAdminPage.VerifyAppValid()
Apparently those temporary files weren't as temporary as I thought they were. Is there any way to regenerate those files, or any other way to work around this.
I really shot myself in the foot this time.. :(
Have you tried doing an iisreset from a command line?
The web application is probably still trying to access the auto generated assemblies that you have deleted.
Recycling the application pool or resetting IIS should resolve the problem.
They are temporary. However deleting some files and keeping others throws off the internal heuristics in ASP.NET. If you clear the entire folder and recycle your app pool it will start working again.
精彩评论