Saturday, February 21, 2009

ASP.Net 3.5 Performance Boost with Pipeline Optimization

Hi Friends,

Now a days we all are building web sites and forums for increase our popularity or revenue through the advertise.

Now what is in our site that cause a user to visit our site and what is the factor that users are ignoring our site to visit often?

The main factor is functionality and user experience. But even if your site have the best user experience but not the speed, user will slowly dislike your site due to the speed.

So here is a suggestion to optimize your performance of ASP.Net sites with optimizing your pipeline of the execution.

There are several ASP.NET default HttpModules which sit in the request pipeline and intercept each and every request.
for Example Following are default Modules.

  <add name="OutputCache" type="System.Web.Caching.OutputCacheModule" />
  <add name="Session" type="System.Web.SessionState.SessionStateModule" />
  <add name="WindowsAuthentication" 
        type="System.Web.Security.WindowsAuthenticationModule" />
  <add name="FormsAuthentication" 
        type="System.Web.Security.FormsAuthenticationModule" />
  <add name="PassportAuthentication" 
        type="System.Web.Security.PassportAuthenticationModule" />
  <add name="UrlAuthorization" type="System.Web.Security.UrlAuthorizationModule" />
  <add name="FileAuthorization" type="System.Web.Security.FileAuthorizationModule" />
  <add name="ErrorHandlerModule" type="System.Web.Mobile.ErrorHandlerModule, 
                             System.Web.Mobile, Version=1.0.5000.0, 
                             Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />

Now if you want To bust site performance you can Remove Unnecessary modules from pipeline in Web.Config.
For Exam
If we are Using only FormAuthentication we can remove  following Modules.

         <!-- Remove unnecessary Http Modules for faster pipeline -->
         <remove name="WindowsAuthentication" />
         <remove name="PassportAuthentication" />
         <remove name="AnonymousIdentification" />
         <remove name="UrlAuthorization" />
         <remove name="FileAuthorization" />

Try this and let me know your review on the performance change. Also please suggest your suggestions which can optimize the performance of the ASP.Net site.

1 comment:

  1. Dear Sir,

    I have a launched new web site for .NET programming resources. I would like to invite to the as author and supporter. I hope you will joins with us soon.

    Thank You


Comments posted on ASP.Net Ajax Tutorials Blog are moderated and will be approved only if they are on-topic and not abusive. Please email me or my team for tech-support or blogging related questions. Avoid including website URLs in your comments - Thanks Author