我正试图让一个开发人员的应用程序在我的机器上工作.解决方案是使用Web API在VS 2015中构建的,我使用64位IIS Express运行它.每个请求都返回500.0错误.请求跟踪日志说明了这一点:
1517. -MODULE_SET_RESPONSE_ERROR_STATUS ModuleName ManagedPipelineHandler Notification EXECUTE_REQUEST_HANDLER HttpStatus 500 HttpReason Internal Server Error HttpSubStatus 0 ErrorCode Recursion too deep; the stack overflowed. (0x800703e9) ConfigExceptionInfo
相关的配置部分如下所示:
<system.webServer> <handlers> <remove name="OPTIONS" /> <remove name="OPTIONSVerbHandler" /> <remove name="TRACEVerbHandler" /> <remove name="ExtensionlessUrlHandler-Integrated-4.0" /> <remove name="ExtensionlessUrlHandler-ISAPI-4.0_32bit" /> <remove name="ExtensionlessUrlHandler-ISAPI-4.0_64bit" /> <add name="ExtensionlessUrlHandler-ISAPI-4.0_32bit" path="*" verb="*" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness32" responseBufferLimit="0" /> <add name="ExtensionlessUrlHandler-ISAPI-4.0_64bit" path="*" verb="*" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,bitness64" responseBufferLimit="0" /> <add name="ExtensionlessUrlHandler-Integrated-4.0" path="*" verb="*" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" /> </handlers> </system.webServer>
其他可能相关的事实:
>之前这台机器还没有用于网络托管,但我一直在做很多VS2013开发,上周只安装了2015年来运行这个项目.
>该项目确实包含一些C#6.0功能,即新的字符串插值功能.
我怎么会开始调试这个?我在Google上获得了相关的点击率.
解决方法
将path =“*”更改为path =“*.”在您列出的每个处理程序中.
<add name="ExtensionlessUrlHandler-ISAPI-4.0_32bit" path="*." verb="*" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,bitness32" responseBufferLimit="0" /> <add name="ExtensionlessUrlHandler-ISAPI-4.0_64bit" path="*." verb="*" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,bitness64" responseBufferLimit="0" /> <add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="*" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" />
我相信有一种方法可以使用path =“”但我还没弄清楚它是什么.我只是遇到了这个问题,因为我试图使用path =“”而且当“递归太深……”错误被抛出时.