December 2007
M T W T F S S
« Nov   Jan »
 12
3456789
10111213141516
17181920212223
24252627282930
31  

18
Dec
07

Web References and Debugging.

I ran into a problem today with a friend who runs a few sites like PhoneDog.com and ButterflyEffects.com. He had an issue with page loads being very very slow for no reason at all. We must have spent two hours looking into firewall, vpn, network and server issues. None of them were found to be the issue. All we knew was that it ran like greased lightning when we were on the local network of the host server. A little more tested showed that it seemed to be the cached files not being cached. Even though IE and FF were set to cache the files, it seemed like they were being downloaded every time.

Well I finally discovered that when a .NET site is set to debug, the web reference files are set to private. And because of that they are re-downloaded every time. This is no big deal, but when you use a lot of controls like Rad Grid and compiled images they load the server up horribly. You can see over 1 MB being downloaded on every page. And NONE of that shows up in the source code. You see you have a 80k source code size, but if you open you temp files you will find a Meg of files downloaded every time.

Well, in a 2.0 site, just open the web.config, find the debug section and set it to false. That will mark the web references are public and cacheable.

<compilation debug=”false”>

Enjoy


1 Response to “Web References and Debugging.”


  1. 1 Michael Penman May 27th, 2008 at 10:45 pm

    Far cry from the ‘ol restaurant business eh?
    Road of life takes you down many paths. Enjoy the ride.