Category Archives: ASP.NET

ASP.NET Internals Spelunking

When I wrote the ASP.NET book I pretty much lived in Reflector 24/7 to figure out all the gory implementation details. Back then it would have been great to be able to simply set breakpoints in some of the low … Continue reading

Posted in ASP.NET | Leave a comment

HTTP Basic Authentication against Non-Windows Accounts in IIS7

The last posts (here, here, here and here) show how to build an HTTP Basic Authentication module using a membership provider (and including WCF support). Moving this code to IIS7 is technically not very difficult – but the mindset changes. … Continue reading

Posted in ASP.NET, WCF | 3 Comments

HTTP Basic Authentication against Non-Windows Accounts in IIS/ASP.NET (Part 3 – Adding WCF Support)

Taking this post as a starting point, we now have a working HTTP module that implements HTTP Basic Authentication against a membership provider. This is fine for ASP.NET applications and content, but to integrate a WCF service, there is some … Continue reading

Posted in ASP.NET, WCF | Leave a comment

HTTP Basic Authentication against Non-Windows Accounts in IIS/ASP.NET (Part 3 – Setting up IIS6/ASP.NET)

In the previous post I explained how the authentication module works. Now which steps are required to get the demo app included in the download to work? IIS Create a vdir in IIS that points to the sample site. Mark … Continue reading

Posted in ASP.NET, WCF | Leave a comment

HTTP Basic Authentication against Non-Windows Accounts in IIS/ASP.NET (Part 2 – The HTTP Module)

An HTTP module is one of the main extensibility points in ASP.NET/IIS7. Modules subscribe to notifications of certain stages in the HTTP request/response processing. Inside of the event handlers you can then inject your custom code and logic. To allow … Continue reading

Posted in ASP.NET, WCF | Leave a comment

HTTP Basic Authentication against Non-Windows Accounts in IIS/ASP.NET (Part 1 – Basic Authentication)

The first step in implementing an authentication module for IIS/ASP.NET is to understand the authentication protocol (doh ;) It turns out the Basic Authentication is quite simple. Whenever the server wants to start the authentication handshake, he sends a 401 … Continue reading

Posted in ASP.NET, WCF | Leave a comment

HTTP Basic Authentication against Non-Windows Accounts in IIS/ASP.NET (Part 0 – Intro)

Imagine this (quite common) scenario: You have some web content/resources (e.g. static files, aspx pages, asmx or WCF services) in IIS that you want to protect using HTTP Basic Authentication. The problem is, that when you enable Basic Authentication in … Continue reading

Posted in ASP.NET, WCF | Leave a comment

Some new IIS7 Resources

List of registry keys affecting IIS7 behavior (Kanwaljeet Singla) Enhance Your Apps with the Integrated ASP.NET Pipeline (Mike Voldarsky) Breaking Changes for ASP.NET 2.0 applications running in Integrated mode on IIS 7.0 (Mike Volodarsky) Internet Information Services (IIS) 7.0 TechRef … Continue reading

Posted in ASP.NET | Leave a comment

Extension Methods for AntiXss

Playing around with some C# 3.0 language features, I came up with something which is quite useful if you are doing a lot of web in/output encoding. The following extension methods wrap the AntiXss library: public static class Extensions { … Continue reading

Posted in ASP.NET | Leave a comment

ValidateRequest does not mitigate XSS completely

I often mentioned that to customers and students. Here is the “official” word.  

Posted in ASP.NET | Leave a comment