如何解决此错误“HTTP错误500.19 - 内部服务器错误”

问题描述:

web.config页面是否有任何错误?如何解决此错误“HTTP错误500.19 - 内部服务器错误”

<?xml version="1.0" encoding="utf-8"?> 
<!-- 
    For more information on how to configure your ASP.NET application, please visit 
    http://go.microsoft.com/fwlink/?LinkId=169433 
    --> 
<configuration> 
    <system.web> 
     <httpRuntime executionTimeout="5"/> 
     <compilation targetFramework="4.5" /> 
    <httpRuntime targetFramework="4.5" /> 

    </system.web> 

    <appSettings> 

    <add key="dsn" value="Data Source=184.14.14.239;Initial Catalog=Testing;User ID=sa;Password=June28241234"/> 
    <add key="ReportServer" value="http://184.14.14.239/ReportServer/"/> 
    <add key="SSRSViewerPath" value="Pages/ReportViewer.aspx"/> 
    <add key="ReportLocation" value="ArvindLapserReports/"/> 
    <add key="aspnet:MaxJsonDeserializerMembers" value="200000000"/> 
    </appSettings> 

</configuration> 

在PC工作正常,但服务器得到这个错误。

enter image description here

请你帮助我。如何解决这个问题。

+0

您必须更改您的connectionString,以便它具有您的服务器的IP地址和端口地址。像这样https://stackoverflow.com/a/33145684/2946329 –

+0

也会在由Visual Studio生成的web配置无法被IIS解析时发生。 –

+0

嗨Akbari感谢您的回复。这个连接字符串正在工作。如果我删除这行“”此代码是代码正在工作 –

正如预期的那样在你的样品,你有system.web元素2个httpRuntime元素,您应将其更改为这样一个元素:

<system.web> 
    <httpRuntime executionTimeout="5" targetFramework="4.5"/> 
    <compilation targetFramework="4.5" /> 
</system.web> 

注:配置文件约定只允许单个子每个父元素具有特定名称的元素。