幾天前,我的Windows 10開發機器得到了瀑布創建者更新。Windows 10 Fall Creators更新後的ASP.NET HttpHandler錯誤
自此每嘗試註冊任何ASP.NET網站自定義的HttpHandler(不 Web應用程序)失敗,錯誤:
Failed to map the path '/App_GlobalResources/'.
堆棧跟蹤爲:
[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
我正在使用集成的IIS Express的Visual Studio 2015。我有一些舊的asp.net網站(.net版本2.0)曾經工作。現在,連下面的例子不工作:
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>
我實在不明白髮生什麼事,我已經用盡了想法和耐心。請幫忙。 TIA。
您可以選擇恢復跌倒創作者更新。做到這一點,並仔細檢查是否需要更新。 –
老實說,如果在接下來的幾個小時內沒有答案,我可能會這麼做!微軟... – dpant