2017-06-14 158 views
1

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感謝您的回覆。這個連接字符串正在工作。如果我刪除這行「」此代碼是代碼正在工作 –

回答

1

正如預期的那樣在你的樣品,你有system.web元素2個httpRuntime元素,您應將其更改爲這樣一個元素:

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

注:配置文件約定只允許單個子每個父元素具有特定名稱的元素。

相關問題