【发布时间】:2017-08-22 09:27:54
【问题描述】:
我从我的 asp.net 核心应用程序 [long requests] 和答案中收到 502.3 错误:Timeouts with long running ASP.NET MVC Core Controller HTTPPost Method 和Request timeout from ASP.NET Core app on IIS 我看到我需要延长超时时间,但每个答案都包含在 webconfig xml 文件中设置超时时间,并且我正在使用 json 文件进行配置。
{
"AppConfig": {
"Name": "...",
"ConnectionString": "Server=localhost;User Id=root;Password=....;Database=....",
}
我也有一个launchSettings.json
{
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:53573/",
"sslPort": 0
}
},
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"SPS.Services": {
"commandName": "Project"
}
}
}
xml 中的等价物应该是怎样的:
<system.webServer>
<handlers>
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified"/>
</handlers>
<aspNetCore requestTimeout="00:20:00" processPath="%LAUNCHER_PATH%" arguments="%LAUNCHER_ARGS%" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" forwardWindowsAuthToken="false"/>
</system.webServer>
我应该把它放在哪里?
我使用的是 AspNetCore 1.1.2
【问题讨论】:
标签: asp.net json asp.net-core