ASP.NET CORE 2.1调试时服务器超时 [英] ASP.NET CORE 2.1 Server timeout while debugging
问题描述
'错误:服务器超时时间未收到来自服务器的消息 服务器."
我正在尝试调试一些服务器端代码,而这样做的同时,客户端在不到一分钟的时间内就断开了连接.
我仅使用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 >
以下是增加Javascript客户端超时的方法
hubConnection.serverTimeoutInMilliseconds = 100000; // 100 second
此处有更多详细信息=> https://github.com/aspnet/Docs/issues/6885
'Error: Server timeout elapsed without receiving a message from the server.'.
I'm trying to debug some server-side code and while I do that the client gets disconnected in less than a minute.
I'm only using SignalR to communicate to clients, without controllers yet.
Is there any setting that can disable timeout or at least make it way longer than it is now?
my 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"
}
}
}
}
Thanks to @Arhire Ionut
Here is how to increase Javascript client timeout
hubConnection.serverTimeoutInMilliseconds = 100000; // 100 second
More details here => https://github.com/aspnet/Docs/issues/6885
这篇关于ASP.NET CORE 2.1调试时服务器超时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!