Page 288 - DCAP312_WEB_TECHNOLOGIES_II
P. 288
Web Technologies-II
Notes Caching.OutputCacheModule”/>
<add name= “Session” type= “System.Web.SessionState.
SessionStateModule”/>
<add name= “WindowsAuthentication” type= “Sys
tem.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”/>
</httpModules>
We can remove these default modules from our Web application by adding <remove> nodes
in our site’s web.config. For example:
<httpModules>
<!-- Remove unnecessary Http Modules for faster pipeline -->
<remove name= “Session”/>
<remove name= “WindowsAuthentication”/>
<remove name= “PassportAuthentication”/>
<remove name= “AnonymousIdentification”/>
<remove name= “UrlAuthorization”/>
<remove name= “FileAuthorization”/>
</httpModules>
The above configuration is suitable for websites that use database based Forms Authentication
and do not need any Session support. So, all these modules can safely be removed.
14.3.3 ASP.NET Process Configuration Optimization
ASP.NET Process Model configuration defines some process level properties like how many
number of threads ASP.NET uses, how long it blocks a thread before timing out, how many
requests to keep waiting for IO works to complete and so on. The default is in many cases too
limiting. Nowadays hardware has become quite cheap and dual core with gigabyte RAM servers
have become a very common choice. So, the process model configuration can be tweaked to make
ASP.NET process consume more system resources and provide better scalability from each server.
A regular ASP.NET installation will create machine.config with the
following configuration:
<system.web>
<processModel autoConfig= “true”/>
282 LOVELY PROFESSIONAL UNIVERSITY