Optimizing the HTTP Pipeline ASP.NET

There are some HTTP Modules that sit in the ASP.NET request pipeline by default that you may not need. You can remove those modules and eliminate some extra processing. For example, in web. config, these modules can be removed as shown in Example. This is a very easy way to get a small boost on request processing.

Remove unnecessary HTTP Modules from the ASP. NET request pipeline for faster request processing


<remove name="Session" />

<remove name="WindowsAuthentication"/>

<remove name="PassportAuthentication"/>

<remove name="UrlAuthorization"/>

<remove name="FileAuthorization"/>

In this example, Session has been removed from the modules. ASP.NET Membership uses a cookie to store the current username, and Profile provider loads its data from SQL Server continually. So, there’s no need to store the user state in Session. Moreover, you need Session to be on a web farm or web garden (multiple processes per application pool) with SQL Server. So, there’s no need for ASP.NET default Session support when you are using Profile provider. Windows and Passport authentication is not needed because ASP.NET Membership provider is being used.

UrlAuthorization might be useful to protect administrative folders by defining roles in web.config.

FileAuthorization uses Windows Access Control List (ACL) on files. There’s no need for using Windows file access permissions to authenticate or authorize here because we aren’t using Windows authentication.

Face Book Twitter Google Plus Instagram Youtube Linkedin Myspace Pinterest Soundcloud Wikipedia

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

ASP.NET Topics