Slow first Time in ASP.NET applications

19. March 2013 12:19 by Mrojas in ASP.NET  //  Tags: , , , , , ,   //   Comments (0)

Well, this is a recurrent topic with ASP.NET:Why is the first page load always so slowjQuery152032498610322363675_1363786231988?

I don't think there is a definite answer but I can think on some explanations:

  • ASP.NET applications by nature exhibit some degree of delay upon initial access to the site. This can be due to JIT compilation, caching, etc. 
  • Note that it is also a common effect on some sharepoint sites. 
  • Some people on StackExchange attribute this slowness to: " The IIS application pool is shut down after 30 minutes of inactivity. After that, when you make a request IIS basically has to start the website up again, which leads to the behavior you are describing. You can change the idle time of your website in iis though to avoid it." 
There are some workarounds for this situation:
For some years there has been a warmup script that you can use on pre-vs2010 apps:

ASP.NET Site Warm up on GitHub

And there is  even an IIS addin for that, the following blog provides some references about this addin:

ASP .NET Pre heating and the App Warmup Addin for IIS

These problem is so common that now in VS 2010 there is even an auto-start feature that you can use:

Auto Start Feature in ASP.NET 4

 I hope this links help and I'll add more explanations as I find them. Please feel free to comment.

IE Compatibility issues

21. September 2012 20:42 by Mrojas in General, HTML5  //  Tags: , ,   //   Comments (0)

It happen to me that I had a website working perfectly in my IIS and when I went to publish it it looked completely distortionated.

Why !! The eternal why.

I ended finding that it had something to do with the compatibility mode of IE, but why was it changing. It looks like it has some relation with the IIS version. Not sure why.

But the fix is to do something like:

    <validation validateIntegratedModeConfiguration="false" />
    <modules runAllManagedModulesForAllRequests="true" />
    <httpProtocol>       <customHeaders>         <add name="X-UA-Compatible" value="IE=edge" />       </customHeaders>     </httpProtocol>
This meta tag instructs the IE to set the compatibility mode to the highest value. 
You can use other values as IE7 or IE8So just put that and your site will look nice again :)



IIS targetFramework not supported

31. January 2011 10:55 by Mrojas in General  //  Tags: , , ,   //   Comments (0)


I had a situation where the IIS reported that the targetFramework=4.0 attribute
was not supported.

I’m not sure why it started reporting it, but I fixed it with this:

%windir%\Microsoft.NET\Framework\v4.0.21006\aspnet_regiis.exe -i

Could not load file or assembly ‘App_Web_ ….

16. December 2010 04:53 by Mrojas in General  //  Tags: , , , ,   //   Comments (0)

If you ever get an error like, it is an annoying situation where the web server is trying to use and old compilation of your aspx files.

The workaround I have is: rename web.config to stopweb.config.

Browse to the offending page URL it will return an error. After you receive the error rename stopweb.config to web.config

Browse to the offending page. This will force the server to compile the web pages.

And if it work the problem will now go away.

IIS 6 Metabase and IIS 6 Configuration Compatibility

11. November 2010 04:38 by Mrojas in General  //  Tags: , , , ,   //   Comments (0)


I have a silverlight application that I was trying to publish from Visual Studio to my local IIS and I got this problem:

For the record I have Windows 7.



So you can write on the Search program and Files “ Turn Windows Features on or off”




And then select