I am using IIS7 on Windows Vista dual core cpu. The first time hit on a WCF service or an ASP.NET webform sometimes takes way longer than a minute which is not really acceptable for me.

I configured the application to use the Classic .NET application pool and tried playing with the Maximum worker processes, first setting it to 4 but put it back to 1 as it did not have the expected result. Are there any other things that I can try?

4 Answers 4


Check your web.config file for compilation mode. While you're developing, you should run your site in debug mode. If you're running in release mode, every aspx and ascx will be compiled into temporary assemblies, not only the pages and controls you hit. Also, set batch to false.

         <compilation debug="true" batch="false" ...>

Of course, these are not recommended for production environments, which will be slowed down by these changes.

Also, check this forum thread, where you can find some interesting tips, like resetting the permissions of the ASP.NET temporary files folder:

I had the same problem and made all of the adjustments as mentioned in this forum but it didn't help. I began to suspect that the slow loading time of the dlls had to do with security settings. It appears that access to the dlls goes through security checking that is part of the operating system and not part of VIsual Studio. The dlls are located in a directory for your application under:

C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\

In order to speed up the security checking, you need to remove all of the security settings on the root folder of your application in the above mentioned directory, or on the directory "Temporary ASP.NET Files" if you want to have it apply to all web applications you develop.

You right mouse click the folder and select Properties -> Security

Remove all users and groups. Some will not be allowed to be removed because they inherit their permissions from their parent folder. You must first remove the inheritance by clicking on the Advanced button and then uncheck the "Inherit from parent..." checkbox. Then remove the user or group. There must not be any users or groups where the checkboxes for their permissions are greyed out. If they are greyed out, it means that you didn't remove the inheritance from their parent.

After you have removed all users and groups from the folder, you then need to add the following users and groups:

Administrators Users ASPNET Network Network Service Local Service

Give each of these accounts full permission. Click on the Advanced button again and check off the "Replace permission entries on all child objects..."

  • I will try this out next week at work. Hopefully it does what I hope for. Jan 1, 2010 at 15:36
  • this saved my life. The additional part is the solution. Instead of v2.0 folder, you need to do the same thing for v4.0 folder for .NET 4.0 and later
    – Shinigamae
    Feb 1, 2018 at 8:30

This could be as simple as a DNS issue. Try using instead of localhost when accessing. If this works, then just add a to your hosts file and/or always access via your localhost IP.

  • 1
    its been mentioned that the windows 7 hosts file has the localhost entries commented out, so it seems likely. Jan 2, 2010 at 8:24
  • Where can I find that hosts file and what do I have to put in it? Jan 2, 2010 at 13:30
  • %WINDIR%\System32\drivers\etc\hosts, remove the "#" before [see wagnerdanda.me/2009/12/… ]
    – jasonpenny
    Feb 2, 2010 at 16:41

Is this just the first time you access an application after it is built? This is not unusual, as the web application needs to compile things from the DLL's etc, and will be faster on subsequent loads.

  • I know of the first time hit on ASP.NET being slow but it is every successive call also. Since I am using ASP.NET and WCF and jQuery. The first time hit on the page takes almost 2 minutes and then I have a call in document ready for a call to my WCF service, which also takes almost 2 minutes. Not really fun to test my applications. Jan 1, 2010 at 15:24

If this is happening on application startup, turning off the idle timeout setting should help, at least until you reboot or IIS restarts for some other reason. That would still leave a question of why your application is taking so long to start, though.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.