ASP.NET File Change Notifications, exactly which files and directories are monitored?

Perhaps one of the most loved and hated features of ASP.NET is the ability to detect file changes and automatically recompile or reconfigure the application.  In development scenarios it’s very nice because you can access the application in a browser at the same time you’re modifying ASPX, ASAX, DLL, CONFIG, and other application files, and…


Things you didn’t know (and perhaps don’t want to know) about ASP.NET Session State

I’ve uploaded a brief summary on the extensibility of ASP.NET Session State (see link to AspNetSessionState.pdf below).  Many people aren’t aware of how easy it is to implement a custom session state provider.  Having your very own disk based (file based) session state provider is just a few lines of code away. AspNetSessionState.pdf


Server.TransferRequest hangs or takes a long time to execute

Server.TransferRequest is a new API in the IIS 7.0 release of ASP.NET.  It is essentially a server-side redirect.  When invoked, a new request context is created, called the child request, and it goes through the entire IIS 7.0/ASP.NET integrated pipeline.  The child request can be mapped to any of the handlers configured in IIS, and…


IIS 7.0, ASP.NET, pipelines, modules, handlers, and preconditions

1.0 What is the IIS Pipeline Conceptually, the IIS pipeline is a state machine with the following states: BEGIN_REQUESTAUTHENTICATE_REQUESTAUTHORIZE_REQUESTRESOLVE_REQUEST_CACHEMAP_REQUEST_HANDLERACQUIRE_REQUEST_STATEPRE_EXECUTE_REQUEST_HANDLEREXECUTE_REQUEST_HANDLERRELEASE_REQUEST_STATEUPDATE_REQUEST_CACHELOG_REQUESTEND_REQUEST When a request is received, it moves through the state machine step-by-step until completion.  Beginning with IIS 7.0, users can register their own code to be executed within any or all of the steps.  This code…


IIS7 kernel-mode authentication

This appears to be undocumented. By default, IIS7 uses kernel-mode authentication, which happens to have a large performance benefit.  There is a bug in kernel-mode authentication where requests that send credentials will fail unless an anonymous request has been made first.  Once an anonymous request has been made, requests that send credentials will succeed (if…


An Ounce of Prevention: Using System.Threading.Timer in an ASP.NET Application

Using a timer in an ASP.NET application is not as simple as it seems.  There are three problems that commonly occur: ASP.NET applications shutdown for a number of reasons, and if the timer is not disposed before the AppDomain is unloaded, the timer may fire and crash the process with an unhandled AppDomainUnloadedException. The timer executes…


ASP.NET Thread Usage on IIS 7.5, IIS 7.0, and IIS 6.0

I’d like to briefly explain how ASP.NET uses threads when hosted on IIS 7.5, IIS 7.0 and IIS 6.0, as well as the configuration changes that you can make to alter the defaults. Please take a quick look at the “Threading Explained” section in Chapter 6 of “Improving .NET Application Performance and Scalability”. Prior to…


Some history on the ASP.NET cache memory limits

When v1.0 released, the only OS that ASP.NET supported was Win2k, the only process model was aspnet_wp, and the only architecture we supported was x86.  The aspnet_wp process model had a memory limit that was calculated at runtime during startup.  The limit was configurable (<processModel memoryLimit/>) as a percentage of physical RAM, and the default…


Orcas Beta 1 Visual Studio F5 Debugging on IIS 7 / Windows Vista

In Visual Studio Orcas Beta 1, the AJAX ScriptModule is listed in the web.config template used for version 3.5 web projects.  There is a known bug (DevDivBugs 78367) that prevents Visual Studio F5 debugging from working on IIS7 / Windows Vista when a module in the IIS/ASP.NET integrated pipeline has an event handler for PreSendRequestHeaders or…


The CLR Profiler

The ClrProfiler   1.0 Where can I get it?   2.0 Should I use it?   When running performance tests, if the CPU is maximized and % Time in GC is greater than 5%, you can improve throughput by reducing allocations.   Excessive garbage collection is often the culprit for low throughput.  The…