Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/asp.net-mvc/16.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Asp.net mvc HTTP错误500.19-内部服务器错误-system.webServer/httpErrors缺少节声明_Asp.net Mvc_Asp.net Mvc 4_Iis 7.5_Asp.net Mvc 5 - Fatal编程技术网

Asp.net mvc HTTP错误500.19-内部服务器错误-system.webServer/httpErrors缺少节声明

Asp.net mvc HTTP错误500.19-内部服务器错误-system.webServer/httpErrors缺少节声明,asp.net-mvc,asp.net-mvc-4,iis-7.5,asp.net-mvc-5,Asp.net Mvc,Asp.net Mvc 4,Iis 7.5,Asp.net Mvc 5,我有以下资料: <system.web> <compilation debug="true" targetFramework="4.5"/> <httpRuntime targetFramework="4.5"/> <customErrors mode="Off"/> </system.web> 有人能帮我解释一下吗 我认为我不需要自定义错误页面。然而,我读到的每一篇文章都告诉我,解决方法是添加一个自定

我有以下资料:

  <system.web>
    <compilation debug="true" targetFramework="4.5"/>
    <httpRuntime targetFramework="4.5"/>
    <customErrors mode="Off"/>   </system.web>
有人能帮我解释一下吗


我认为我不需要自定义错误页面。然而,我读到的每一篇文章都告诉我,解决方法是添加一个自定义错误页。

希望下面的答案能帮助以后的人,我将分享我在这个问题上的经验

由于各种原因,可能会出现此错误。最近,由于以下原因,我遇到了错误:

  • 缺少URL重写模块
My Web.config文件包含一个
部分,该部分要求安装IIS URL重写模块(可以使用Web平台安装程序完成)

  • 升级Azure SDK
My 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
),因为在我的情况下,依赖于最新的程序集版本是可以的。

我必须从我的web项目中删除WindowsAzure.Diagnostics引用(还包含一个感叹号)并将其再次添加到2.7版本中。在此之后,问题没有出现

这个答案可能会有所帮助:您的应用程序部署在哪个池上?试着操纵它,它可能会帮助你!相同但不同。我的引用指向2.1.0.0,其中我的web.config已更新为2.4.0.0。只是更新了引用(在IIS重新安装后尝试其他操作大约4小时后)。引用两个不同版本的Microsoft.WindowsAzure.ServiceRuntime dll导致此问题并中断了我的服务。重定向版本的运行时配置没有帮助。必须从各种解决方案中删除旧版本的依赖项,并重建整个堆栈来修复它。我的版本为2.7.0.0,删除它解决了问题。这个答案与问题无关。
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
<system.diagnostics>
  <sharedListeners>
    <add type="Microsoft.WindowsAzure.Diagnostics.DiagnosticMonitorTraceListener,
               Microsoft.WindowsAzure.Diagnostics,
               Version=2.3.0.0,
               Culture=...
               PublicKeyToken=...">