我有以下内容:
<system.web> <compilation debug="true" targetFramework="4.5"/> <httpRuntime targetFramework="4.5"/> <customErrors mode="Off"/> </system.web>
并且:
<system.webServer> <handlers> <remove name="ExtensionlessUrlHandler-ISAPI-4.0_32bit"/> <remove name="ExtensionlessUrlHandler-ISAPI-4.0_64bit"/> <remove name="ExtensionlessUrlHandler-Integrated-4.0"/> <remove name="OPTIONSVerbHandler"/> <remove name="TRACEVerbHandler"/> <add name="ExtensionlessUrlHandler-ISAPI-4.0_32bit" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" 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="GET,OPTIONS" 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="GET,OPTIONS" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0"/> </handlers> </system.webServer>
HTTP Error 500.19 - Internal Server Error The requested page cannot be accessed because the related configuration data for the page is invalid. Detailed Error Information: Module CustomErrorModule Notification SendResponse Handler Not yet determined Error Code 0x80070490 Config Error The configuration section 'system.webServer/httpErrors' cannot be read because it is missing a section declaration
有人可以帮我解释一下.
解决方法
希望以下答案对以后的人有所帮助,我将分享我对这个问题的经验.
由于各种原因可能会出现此错误.最近,由于以下原因,我遇到了错误:
>缺少URL重写模块.
我的Web.config文件包含< rewrite>< / rewrite>需要安装IIS URL重写模块的部分(可以使用Web平台安装程序完成).
> Azure SDK的升级.
我的Web.config文件包含以下条目:
<system.diagnostics> <sharedListeners> <add type="Microsoft.WindowsAzure.Diagnostics.DiagnosticMonitorTraceListener,Microsoft.WindowsAzure.Diagnostics,Version=2.3.0.0,Culture=... PublicKeyToken=...">
升级Azure SDK(2.3.x – > 2.6.x)后,无法解决2.3.x版本的这种“硬”依赖性.为了解决这个问题,我完全删除了Version元素(包括Culture和PublicKeyToken),因为在我的情况下,对最新程序集版本的依赖很好.