'错误:服务器超时,但未收到来自服务器的消息
服务器。'。
我正在尝试调试一些服务器端代码,当我这样做时,客户端会在不到一分钟的时间内断开连接。
我只使用 SignalR 与客户端通信,还没有控制器。
是否有任何设置可以禁用超时或至少使其比现在更长?
我的 launchSettings.json:
{
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:26793",
"sslPort": 44386
}
},
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development",
"ASPNETCORE_HTTPS_PORT": "44386"
}
},
"Api": {
"commandName": "Project",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development",
"ASPNETCORE_URLS": "https://localhost:5001;http://localhost:5000"
}
}
}
}
谢谢@Arhire Ionut https://stackoverflow.com/users/7766563/arhire-ionut
以下是增加 Javascript 客户端超时的方法
hubConnection.serverTimeoutInMilliseconds = 100000; // 100 second
更多详情请点击这里=>https://github.com/aspnet/Docs/issues/6885 https://github.com/aspnet/Docs/issues/6885
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)