Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Slow startup with IIS Express

I have a problem with my MVC application and startup.

Every time I make a change and one the app its take a long time to start up.

I have about 100 lines with ''iisexpress.exe' (CLR v4.0.30319:'

Do I have to start iisexpress every time I run my application?

like image 477
Jakobbbb Avatar asked May 27 '14 04:05

Jakobbbb


People also ask

How do I disable IIS Express in Windows 10?

click control panel. click programs. search for Internet Information Services (IIS). uncheck the box.

What is the difference between IIS and IIS Express?

An important difference is the way worker processes are managed. In IIS, the Windows Process Activation Service (WAS) silently activates and deactivates Web applications and the user has no direct control. In IIS Express, there is no WAS and the user has full control of application activation and deactivation.


2 Answers

I found significant improvement after disabling logging.

Locate the IIS config for your project or machine, typically found in:

  • %userprofile%\documents\iisexpress\config\applicationhost.config
  • .\.vs\config\applicationhost.config
  • VS2019: $(solutionDir)\.vs\{projectName}\config\applicationhost.config

And comment out or delete the following two nodes (found somewhere in the document)

<add name="HttpLoggingModule" image="%IIS_BIN%\loghttp.dll" /> <add name="HttpLoggingModule" lockItem="true" /> 
like image 57
Korayem Avatar answered Sep 20 '22 03:09

Korayem


I had this same problem, tested with VS2010 and VS2015. Symptom: VS was quick, compiled, loaded symbols and opened browser within a second but then browser just hung for 5 to 20 minutes. My projects are huge but my laptop is 16GB RAM, i7 and SSD so definitely not a size problem. I tried all the answers on this question and also here Visual Studio debugging/loading very slow.

In the end I found the solution here https://social.msdn.microsoft.com/Forums/en-US/394f3100-bac2-4b1c-8f8c-731226b905d4/painfully-slow-starting-a-web-application-in-visual-studio?forum=visualstudiogeneral

Exclude the directory "C:\Windows\Microsoft.NET\Framework" from antivirus scanning

Hopefully this will save someone else so much wasted time :)

like image 20
Martin Belcher - AtWrk Avatar answered Sep 20 '22 03:09

Martin Belcher - AtWrk