无法在Web服务器上启动调试.操作超时 [英] Unable to start debugging on the web server. The operation timed out

查看:83
本文介绍了无法在Web服务器上启动调试.操作超时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的所有 ASP.NET 网站都存在此问题,我在Windows 10上,并且 IIS 应用程序池停止工作.谷歌搜索时,我已经找到了解决这个问题的更多和可能的解决方法,但是没有一个对我有用.这不是帐户问题,也不是临时文件中的故障,甚至不是 Visual Studio 中需要重新初始化项目的bug.

I had this problem with all my ASP.NET websites, I'm on Windows 10, and my IIS application pools stopped working. I have found many and more possible resolutions to this problem while googling, but none of them was working for me. 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.

此问题是在更新(确切地说是1607年)之后发生的,该更新包括其他联网功能已重新初始化了我的某些组件,例如 Microsoft .NET Core工具预览2 .我已经修好了,已经奏效了.只有一次.

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. I have repaired it, it has worked. Only once.

有什么想法吗?

推荐答案

运行 iisreset 命令为我解决了此问题,但是在我的情况下,这只是临时解决方法.

Running the iisreset command fixed this issue for me, however in my situation it was only a temporary fix.

在我的情况下,在逐步执行向其他端点进行localhost API调用的代码时,该错误仍然反复发生.运行 iisreset 后,应用程序将在短时间内正常运行,然后本地主机API调用将开始超时.如果调试会话随后结束并重新启动,则无法在Web服务器上启动调试.操作超时."错误就会被抛出.

In my situation the error kept recurring while stepping through code that was making localhost API calls to other endpoints. After running iisreset the application would function normally for a short amount of time before the localhost API calls would begin timing out. If the debugging session was then ended, and restarted, the "Unable to start debugging on the web server. The operation timed out." error would then be thrown.

最终导致该问题的根本原因是,有一个网页(作为UI的一部分)正在定期轮询另一个API.如果应用程序处于中断模式的时间足够长(取决于轮询频率,可能在几秒钟,几分钟或更长的时间内),而没有主动地执行任何新的代码行,则IIS将成为轮询的瓶颈,并且会在程序的非轮询" API调用中导致超时错误.因此,通过简单地阻止轮询的发生(即,关闭/退出进行轮询的网页),该问题就消除了;但是,更大的收获是,还要检查IIS流量,以查看是否存在由调试会话引起的流量瓶颈.

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. 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. 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.

这篇关于无法在Web服务器上启动调试.操作超时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆