[英]Unable to start debugging on the web server. The operation timed out
I had this problem with all my ASP.NET
websites, I'm on Windows 10, and my IIS
application pools stopped working. 我的所有
ASP.NET
网站都存在这个问题,我在Windows 10上,我的IIS
应用程序池停止工作。 I have found many and more possible resolutions to this problem while googling, but none of them was working for me. 我在google搜索时发现了很多可能解决这个问题的方法,但是没有一个能为我工作。 That was not an account problem, or a glich in temp files, not even a bug in Visual Studio that needed to reinitialize the project.
这不是帐户问题,也不是临时文件中的陈词滥调,甚至不是Visual Studio中需要重新初始化项目的错误。
This problem has occured after an update (to be exact, the 1607'th), that amongs other networking things, has reinitialized some of my components, like Microsoft .NET Core tooling preview 2
. 在更新(确切地说,1607')之后,这个问题已经发生,在其他网络事物中,已经重新初始化了我的一些组件,如
Microsoft .NET Core tooling preview 2
。 I have repaired it, it has worked. 我修好了,它有用了。 Only once.
只有一次。
Any ideas? 有任何想法吗?
So instead of doing like me and loose your time to know why it breaks, simply do it the hard way, with no compromises: 因此,不要像我一样浪费你的时间来了解它为什么会破裂,而是简单地做到这一点,毫不妥协:
Oh, you will probably get the error that it cannot download from windows update (error code 0x800F081F). 哦,您可能会收到无法从Windows更新下载的错误(错误代码0x800F081F)。 That is .NET 3.5.
那是.NET 3.5。 you can safely install it from offline sources or, if you have Windows installation media, go to powershell in admin mode and type:
您可以安全地从脱机源安装它,或者,如果您有Windows安装媒体,请在管理模式下转到PowerShell并键入:
DISM /Online /Enable-Feature /FeatureName:NetFx3 /All /LimitAccess /Source:DRIVE_OF_YOUR_WINDOWS_DISK:\sources\sxs
replace "DRIVE_OF_YOUR_WINDOWS_DISK", with the correct one. 用正确的替换“DRIVE_OF_YOUR_WINDOWS_DISK”。
Hope this will help. 希望这会有所帮助。
I had the same issue and I fixed it by doing a DNS flush: ipconfig/flushdns
in command prompt. 我遇到了同样的问题,我通过执行DNS刷新来修复它:命令提示符下的
ipconfig/flushdns
。 I was using localhost to test my applications and somehow the IP changed but the reference was still there for them so I just did a DNS flush to update all IPs. 我正在使用localhost来测试我的应用程序,不知何故IP已经改变但是引用仍然存在,所以我只是做了一次DNS刷新来更新所有IP。
You can also reboot your computer. 您也可以重新启动计算机。 Turning it off and back on again is usually the quick fix to all IT problems.
将其关闭并重新打开通常可以快速解决所有IT问题。
Running the iisreset
command fixed this issue for me, however in my situation it was only a temporary fix. 运行
iisreset
命令为我修复了这个问题,但在我的情况下,这只是一个临时修复。
In my situation the error kept recurring while stepping through code that was making localhost API calls to other endpoints. 在我的情况下,在逐步执行使localhost API调用到其他端点的代码时,错误不断出现。 After running
iisreset
the application would function normally for a short amount of time before the localhost API calls would begin timing out. 在运行
iisreset
,应用程序将在localhost API调用开始超时之前正常运行一小段时间。 If the debugging session was then ended, and restarted, the "Unable to start debugging on the web server. The operation timed out." 如果调试会话结束并重新启动,则“无法在Web服务器上启动调试。操作超时”。 error would then be thrown.
然后会抛出错误。
What appeared to end up being the root cause of the issue, is that there was a web page (as part of the UI) that was polling another API on regular intervals. 似乎最终成为问题的根本原因的是,有一个网页(作为UI的一部分)定期轮询另一个API。 If the application was in break mode for a long enough period of time (could range from seconds, to minutes, or longer depending on the polling frequency), without actively stepping through any new lines of code, IIS would become bottlenecked by the polling and would cause timeout errors in the "non-polling" API calls that were part of the program.
如果应用程序处于中断模式一段足够长的时间(可能从几秒到几分钟或更长,具体取决于轮询频率),而无需主动逐步执行任何新的代码行,IIS将因轮询而陷入瓶颈。会导致作为程序一部分的“非轮询”API调用出现超时错误。 So, by simply preventing the polling from occurring (ie., closing out / backing out of the webpage doing the polling) this issue went away;
因此,通过简单地防止轮询发生(即,关闭/退出进行轮询的网页),这个问题就消失了; however the larger takeaway, is to also examine the IIS traffic to see if you have a traffic bottleneck, possibly caused by a debugging session.
然而,更大的问题是,还要检查IIS流量,看看是否有流量瓶颈,可能是由调试会话引起的。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.