MSDN Magazine: Enhance Your Applications with ASP.NET Integrated Pipeline!

This month, the Enhance Your Apps With the Integrated ASP.NET Pipeline article is finally out in MSDN Magazine.  I just got several copies in the mail (thanks Howard!).

****** UPDATE: Scott Hanselman presents the demos from this article at CodeMash 2008 ******

To be honest, I am VERY excited about this article.  I’ve been talking and writing about the ASP.NET Integrated pipeline in IIS 7.0 for a long time, but I feel that this is really the first in-depth look at how it can be used to add value to existing applications.  I think this article really nails the two big bottom-line benefits of the platform: the ability to use ready-made ASP.NET features to improve existing apps right away, and the ability to develop custom modules with ASP.NET to enhance those apps.

Enhance Your Apps with the Integrated ASP.NET Pipeline
(be sure to click on Figure links when reading the article, because most of the code samples and the performance data isnt shown in the main text)

This article also gave me a chance to show off my other baby, the FastCGI support in IIS 7.0.  The demo app that gets spruced up is a PHP image gallery, set up to work using FastCGI and the latest php.net binaries with Windows enhancements. 

But, even though the article uses a PHP application, it is really not about PHP.  In fact, I don’t show or change a single line of PHP code in the whole article (for my foray into PHP development that ties into the Integrated pipeline extensibility, see my IIS authentication plugin for Wordpress).

Instead, the article shows off how the ASP.NET Integrated pipeline can be used to apply the richness of the .NET Framework and ASP.NET services to any application framework technology.  It really doesn’t matter what the front-end application framework technology is.  You can keep your existing applications, be they written with ASP, PHP, Perl, or Ruby on Rails, and continue to leverage existing developer know-how with those technologies.

To recap without spoiling the article, here are some highlights:

·         Deploy the PHP app using FastCGI.  No-brainer, FastCGI is built-in in Windows Server 2008 and Windows Vista SP1.

·         Secure the PHP gallery using the super-famous ASP.NET access control trio: Login controls, Forms Authentication, and Membership backend using a portable Sql Express database.  The whole thing is done in just a few steps, all from the new IIS Manager console.  Gotta love the integration!

·         Write a custom URL rewriting module to support Search Engine Friendly (SEF) URLs for the image gallery, instead of the built-in “ugly” querystring URLs.

·         Write a custom response filter to on-the-fly replace the hyperlinks to use SEF URLs. After this, the app is now using SEF urls through-and-through, without a single change in PHP code.

·         Throw in a custom module that sets up a custom output caching scheme that boosts performance from 93 RPS for the stock app with FastCGI, to 1386 RPS with all the feature fixins.  So, basically after adding all the features the app is 14X times faster.

Be sure to read the article and download the attached source code. Be sure to click on figure links because most code samples and performance results are not shown on the article page.

When you are done, come back to read about:

- building your own modules and handlers to enhance your applications using ASP.NET Integrated pipeline.

- breaking changes your existing ASP.NET applications may experience in Integrated mode, and how to work around them.

Thanks,

Mike

Published 20 December 07 03:29 by Mike Volodarsky
Filed under: , , , ,

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

# MVolo's Blog said on December 20, 2007 3:58 PM:

At last, my MSDN article about using the ASP.NET Integrated Pipeline is out in MSDN Magazine. This article

# Noticias externas said on December 20, 2007 4:07 PM:

At last, my MSDN article about using the ASP.NET Integrated Pipeline is out in MSDN Magazine. This article

# The Next Web Blog said on December 25, 2007 10:13 AM:

В последнее время я большу пишу в другой блог . Однако, подумал и решил сюда публиковать абсолютно технологические

# There and Back Again said on December 27, 2007 12:45 PM:

One of the coolest things about working at MSDN Magazine is the exposure I get to all the different technologies

# MSDN Magazine said on December 27, 2007 12:47 PM:

One of the coolest things about working at MSDN Magazine is the exposure I get to all the different technologies

# Noticias externas said on December 27, 2007 1:45 PM:

One of the coolest things about working at MSDN Magazine is the exposure I get to all the different technologies

# Greg McCarty said on January 3, 2008 1:30 PM:
I'm trying to work through the article. I get to the point where I've modified the web.config and created the login.aspx file, but when I access the site, no redirection to the login page. Any suggestions for debugging?
# Mike Volodarsky said on January 3, 2008 4:09 PM:

Hi Greg,

You may have missed the following note: "In actuality, I only need to allow anonymous access to the login page and require authentication for the rest of the content. I can do this by configuring declarative authorization rules in configuration. The complete configuration in my web.config file is shown in Figure 3."

Be sure to either disable anonymous authentication for your website (except for login page) using  InetMgr, or use the authorization rules shown in Figure 3 to deny access to anonymous users (the latter requires that you install the IIS URL Authorization feature from Windows Setup). See Figure 3 for complete web.config using the latter approach.

Thanks,

Mike

# Greg McCarty said on January 4, 2008 8:10 AM:
Ok, I'm not getting it. I'm using Win2008 - build 6001. I run INetMgr, select my site, select Authentication, and see where I can disable anonymous authentication. I don't understand the part about 'except for login page'. Additionally, my web.config looks exactly like the one in Figure 3. I don't know how to determine if IIS URL Authorization is installed, or how to install it if it isn't. Any suggestions? Thanks, GregM
# Mike Volodarsky said on January 4, 2008 11:44 AM:

Greg,

Go to Server Manager, Web Server(IIS) role, add role services, and make sure that "Security \ URL Authorization" is installed.

If you are using the web.config in figure 3, you do not need to change authentication settings separately.

Thanks,

Mike

# Greg McCarty said on January 7, 2008 7:39 AM:
Thanks! Works like a champ. GregM
# Scott Hanselman's Computer Zen said on January 14, 2008 8:31 PM:
# IIS 7.0 Server-Side said on May 14, 2008 2:52 PM:

After almost 5 years at the company, I am both sad and excited to say that I’ll be leaving the

# IIS 7.0 Server-Side said on May 14, 2008 6:04 PM:

After almost 5 years at the company, I am both sad and excited to say that I’ll be leaving the

# MVolo's Blog said on May 14, 2008 7:33 PM:

After almost 5 years at the company, I am both sad and excited to say that I’ll be leaving the IIS team and Microsoft at the end of this week. Looking back, I can say that my experience at Microsoft has been truly amazing

# Cibi said on July 8, 2008 10:20 AM:
Hi I am new to asp.net. I am creating an intranet application which needs the windows loginname. I have unchecked the Anonymous login in inetmgr and in web.config, identity impersonate="true". I got the login name from System.Security.Principal.WindowsIdentity.GetCurrent.Name. It worked fine in my localhost machine. But the problem is that when I am trying to access the site from another machine, it requests for windows login. Then I checked the Anonymous login in inetmgr. At that time the login was not there but the windows login user name is not getting properly. It is showing the anonymous access's username. How can I solve this problem? How can I get the windows login username while accessing the site from another machine? Please help me.. Thanks in advance. Cibi Jacob cibi.jacob@gmail.com

Leave a Comment

(required) 
(optional)
(required) 
Enter the code you see below


About Mike Volodarsky

For the past 5 years, I was the core Program Manager for Microsoft ASP.NET 2.0 and IIS 7.0 products. I drove the design and development of the IIS 7.0 web server core, the IIS FastCGI support, the AppCmd command line tool, the ASP.NET Integrated pipeline, and other special projects around server security, performance, and scalability. Now, I am working on my own on cutting edge web server tech on top of the Microsoft IIS platform, and continue blogging about it here.

About me



For the past 5 years, I was the core server Program Manager for the IIS 7.0 and ASP.NET 2.0 products at Microsoft.
Now, I work on advanced web server tech using IIS 7.0, .NET, and Windows Server 2008 and write about it in this blog.

View Michael Volodarsky's profile on LinkedIn

Writings



TechNet Magazine
>Top 10 Performance Improvements in IIS 7.0

MSDN Magazine
>IIS 7.0: Build Web Server Solutions with End-To-End Extensibility
>IIS 7.0: Enhance Your Apps with the Integrated ASP.NET Pipeline
>IIS 7.0: Explore The Web Server For Windows Vista And Beyond
>Design and Deploy Secure Web Apps with ASP.NET 2.0 and IIS 6.0
>Fast, Scalable, and Secure Session State Management for Your Web Applications


Tools and Modules

LeechGuard
IconHandler 2.0
DirectoryListing
HttpRedirection
IIS Auth for Wordpress
iisschema.exe
PortCheck.exe v2.0

Popular Posts

- ASP.NET 2.0 Breaking Changes on IIS 7.0
- Develop IIS7 modules and handlers with .NET
- Troubleshoot IIS7 errors like a pro
- Troubleshooting 503 / "service unavailable" errors
- Troubleshooting "server not found" errors
- Create IIS7 sites, applications, and virtual directories
- Run Ruby on Rails with IIS FastCGI
- VS Debugging of ASP.NET applications on Windows Vista
- Stop hot-linking with IIS and ASP.NET

Tags

Search

Go

This Blog

Archives

Good IIS Blogs

Disclaimer

These postings are provided as is with no warranties, and confer no rights. The views expressed in this blog are entirely my own.

Syndication