Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ASP.NET 3.5 Web Application Project takes excessively long time to initially load

Tags:

I have started work at a new company and the main project I work on (an ASP.NET 3.5 Web Application Project) takes an excessively long time to initially load (Around 1.5 minutes)

I am aware that this is generally the nature of web app projects but my issue is this seems way too long.

Ive tried several things to try and pinpoint what might be causing this lag including Replacing the web.config with a fresh one created from a new project cleared everything from my app_start in my web.config deleted all weppart dlls from my bin folder (which leaves me with 19 dlls in my bin directory including 6 from the MS enterprise library)

and still it takes a very long time to load.

I was wondering if anyone had any pointers as to how I may go about finding out what causes such a huge load time or of any tools that would help me see what my app is doing when it starts

thanks -Kris

like image 847
Lightweight Avatar asked May 14 '09 00:05

Lightweight


1 Answers

There is another gotcha in .NET 2.0 onwards. If you have any signed assemblies in you bin folder, then CLR tries connect to a VeriSign URL and fetches a revocation list of the certificates to see if they are valid.

This could eat up some of your startup time as well. If you think this could be contributing to your problem then you can have a look at the following to MS articles:

http://digital.ni.com/public.nsf/allkb/18E25101F0839C6286256F960061B282
http://support.microsoft.com/kb/936707

To deal with this on a per-application basis you can add the following settings under the config section in your app.config/web.config.

<?xml version="1.0" encoding="utf-8"?>
<configuration>
    <runtime>
       <generatePublisherEvidence enabled="false" />
    </runtime>
</configuration>

Of course, if you add this setting, the signed DLLs will not be verified for their validity anymore!

like image 147
Raghu Avatar answered Oct 13 '22 02:10

Raghu