A couple of days ago my Windows 10 development machine got the Falls Creators Update.
Since then every attempt to register a custom HttpHandler in any ASP.NET Web Site (not web application) fails with error:
Failed to map the path '/App_GlobalResources/'.
The stack trace is:
[InvalidOperationException: Failed to map the path '/App_GlobalResources/'.]
System.Web.Hosting.HostingEnvironment.MapPathActual(VirtualPath virtualPath,
Boolean permitNull) +8965114
System.Web.Hosting.HostingEnvironment.MapPathInternal(VirtualPath virtualPath) +42
System.Web.Compilation.BuildManager.CheckTopLevelFilesUpToDate2
(StandardDiskBuildResultCache diskCache) +295
System.Web.Compilation.BuildManager.CheckTopLevelFilesUpToDate
(StandardDiskBuildResultCache diskCache) +55
System.Web.Compilation.BuildManager.RegularAppRuntimeModeInitialize() +174
System.Web.Compilation.BuildManager.Initialize() +238
System.Web.Compilation.BuildManager.InitializeBuildManager() +267
System.Web.HttpRuntime.HostingInit(HostingEnvironmentFlags hostingFlags) +224
[HttpException (0x80004005): Failed to map the path '/App_GlobalResources/'.]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9002835
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +85
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +333
I am using Visual Studio 2015 with the integrated IIS express. I have some old asp.net web sites (.net version 2.0) that used to work. Now, even the following example does not work:
App_Code/MyHandler.cs:
public class MyHandler : IHttpHandler
{
public MyHandler()
{
//
// TODO: Add constructor logic here
//
}
public bool IsReusable
{
get
{
return false;
}
}
public void ProcessRequest(HttpContext context)
{
context.Response.ContentType = "text/html";
context.Response.Write("Hello");
}
}
web.config:
<?xml version="1.0"?>
<configuration>
<system.webServer>
<handlers>
<add name="MyHandler" verb="*" path="*.htm" type="MyHandler"/>
</handlers>
</system.webServer>
</configuration>
I really cannot understand what is happening and I've run out of ideas and patience. Please, help. TIA.
I've decided to follow @Hamlet Hakobyan's suggestion and uninstall Windows 10 Fall Creators Update.
Let me tell you right away that the problem is now fixed.
Here is my development setup in case someone faces the same situation:
IHttpHandler
implementation in .cs
file in App_Code
folder.If your http handler(s) stopped working after having installed the Windows 10 Fall Creators Update and you receive the not-so-useful error below:
Failed to map the path '/App_GlobalResources/'.
then go ahead and revert to previous Windows 10 build (1703).
Hope it helps.