VS 2017 always times out debugging an MVC Core website on IIS Express profile

吃可爱长大的小学妹 提交于 2019-12-21 07:26:56

问题


On a plain vanilla, scaffolded ASP.NET Core MVC web app, with a DbContext registered in the DI container, whenever I hit F5 after 30-60 seconds, I get the error message:

Unable to start program 'http://localhost:60175/'. Operation timed out.

The home page in an index view, whose action gets all employees from a localhost SQL Server db. The project is already built, so the initial build for debug is quite quick, and doubtfully the cause of the delay.

If I run without debugging, I get the home page up in 30 - 40 seconds.

Just what is timing out, and can I set that timeout? Or is there anything else I can to to speed up this painfully slow debugging setup, compared to MVC 5, where the home page opens after only a few seconds.


回答1:


It is hard to say if it is the same issue, but I had same symptoms when I was starting my current project. In my case, I found I either had to:

  • Turn off Browser Link; or
  • Use a browser other than Chrome as the startup browser.

It wasn't until I selected Microsoft Edge as the browser in the debug button of the toolbar and it worked fine that I realised what it might be, and I disabled Browser Link. It all starts up fine now.

If it is yet another issue, then best of luck.



来源:https://stackoverflow.com/questions/42186361/vs-2017-always-times-out-debugging-an-mvc-core-website-on-iis-express-profile

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!