Skip to main content

Speedup Asp.net Project Initial Loading in debugging mode

I noticed the time was taken to startup IIS Express every time. I tried a lot of available solution on Internet but nothing worked. Finally I used Local IIS and it became super fast. Below are the steps:-

1. Go to Project--> Properties--> Web

2. Check "Apply server settings to all users"

3. Select Local IIS and save.



Now once you start using IIS instead of IIS Express you will miss Edit while debugging. This is not allowed by default. But good news is that we can allow this using below settings:-

1. Run Command Prompt as Administrator
2. Execute below command:-
C:\Windows\System32\inetsrv>appcmd set apppool "DefaultAppPool" /+environmentVariables.add[@start,name='COMPLUS_ForceEnC',value='1']
(replace DefaultAppPool with app pool name you use)
This will add tag
<environmentVariables> 
    <add name="COMPLUS_ForceEnC" value="1" /> 
</environmentVariables> 
into C:\Windows\System32\inetsrv\config\applicationHost.config for your app pool, so the app pool process always run in Edit and Continue mode.
I found this info on 
Now you are ready to enjoy your super fast debugging :)

Comments

Post a Comment