-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
Microsoft .NET Framework 4.5 Quickstart Cookbook
By :
ASP.NET 4.5 provides us with the full C# language features described previously in Chapter 2, Exploring the Top New Features of the CLR. Also, the additional methods and features make it easier for us to work with asynchronous language features.
This helps enormously in writing asynchronous HTTP modules and handlers.
Performance is also improved, as the model is asynchronous; it doesn't keep the thread blocked until the request is completed.
In order to use this recipe you should have Visual Studio 2012.
We are going to create an asynchronous HTTP module. An HTTP module allows us to intercept HTTP requests for modifying those requests so we can generate a response in a customized way.
Create a new class library project and name it AsyncHTTPModule.
Add a reference to the System.Web assembly.
Add a class and name it CustomModule. Note that we could as well add an item of type ASP.NET, which would do most of the following for us:
Add...
Change the font size
Change margin width
Change background colour