Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ASP.NET Core - Starting the web server is taking longer than expected

I'm attempting to debug a ASP.NET Core web app using either the Web API or Web Application templates:

enter image description here enter image description here

without adding additional code, etc. to the project.

I use IIS Express to debug the application and the following message is displayed

Starting the web server is taking longer than expected.

enter image description here

After about 10 minutes of waiting, my processor utilization is less than 10%. It looks like the web server is not going to start with any more waiting, and so debugging is not going to start either. How do I get the web server to start so that I can proceed with debugging a .NET Core web app?

My machine environment is as follows

Microsoft Visual Studio Enterprise 2015
Version 14.0.25123.00 Update 2
Microsoft .NET Framework
Version 4.6.01055

.NET Command Line Tools (1.0.0-preview1-002702)

Product Information:
 Version:     1.0.0-preview1-002702
 Commit Sha:  6cde21225e

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.10240
 OS Platform: Windows
 RID:         win10-x64
like image 279
T. Webster Avatar asked May 28 '16 01:05

T. Webster


3 Answers

For me the issue was the self signed SSL certificate install popup on start wasn't getting completed.

This is what resolved the issue for me.

My Setup:

win10 VS 2015 community user is running as non admin .NET core asp.net framework site/app project configured to default to https using localhost startup Default browser on startup - Chrome

Steps to resolve.

Start VS debug with IISExpress VS hangs with popup stating "starting the web server is taking longer than expected"

Right click on icon tray in lower right main window move mouse over IISExpress Icon and right click Under the View Sites context menu that pops up select your https enabled site This will open the window to your site and a popup menu asking you to trust your self signed SSL certificate will ask you to install the cert as a trusted SSL cert.

From that point on I didn't receive the startup hang

like image 127
john Avatar answered Nov 17 '22 04:11

john


For me the issue was just a port number, changed it and all was well.

Right click on your project in the solution explorer, and hit properties. On the left hit the Debug section and change the port number in the app url ie: http://localhost:4998. Save and debug again.

like image 25
Ian Mackie Avatar answered Nov 17 '22 05:11

Ian Mackie


In addition to the above answer, if you were previously running .NET Core RC1, make sure you're not running into the problem outlined in Could not load file or assembly 'Microsoft.AspNet.Security.DataProtection' (try executing dotnet run from PowerShell). Then make sure you restart Visual Studio and it should all be working again.

like image 2
lc. Avatar answered Nov 17 '22 04:11

lc.