【发布时间】:2017-06-14 14:28:01
【问题描述】:
web.config 页面有什么问题吗。
<?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 上它工作正常,但服务器收到以下错误。
你能帮帮我吗?如何解决这个问题。
【问题讨论】:
-
您必须更改您的 connectionString 以便它具有您的服务器的 ip 和端口地址。像这样stackoverflow.com/a/33145684/2946329
-
也会在 IIS 无法解析 Visual Studio 生成的 Web 配置时发生。
-
您好 Akbari 感谢您的回复。此连接字符串正在工作。如果我删除此行“
”此代码是代码正在工作 -
嗨 Akbari 没有这个“
”如果我执行我的代码它正在工作但几分钟后我们收到类似“System.Web.HttpException: Request timed”的错误出去。”这就是我添加此代码的原因 -
httpRuntime似乎在system.web元素中声明了两次,请尝试将它们合并为一个元素:<httpRuntime executionTimeout="5" targetFramework="4.5" />。