Runtime Flow can monitor a .NET application running in IIS, but currently it requires manual configuration and only one IIS worker process (w3wp.exe) can be monitored. Below are the steps I used to monitor a sample ASP.NET MVC2 application configured to use local IIS Web server, created in Visual Studio 2010 and running on Windows 7:
1. Enable profiling for w3wp.exe.
a) Find the application pool for the app.
Check IIS Manager, Sites – Default Web Site – MvcApplication1, Basic Settings. In my case the pool is DefaultAppPool:
b) Enable user profile loading for the pool.
IIS Manager, Application Pools, DefaultAppPool, Advanced Settings, Process Model – Load User Profile, set to True:
c) Find SID of the pool account.
From the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList key find ProfileImagePath with DefaultAppPool. In my case the SID is S-1-5-82-3006700770-424185619-1745488364-794895919-4004696415:
d) Set environment variables to invoke Runtime Flow profiler.
Using the found SID, add two string values to HKEY_USERS\S-1-5-82-3006700770-424185619-1745488364-794895919-4004696415\Environment:
Cor_Enable_Profiling=1 COR_PROFILER={C967CF3F-79BF-49a5-A10F-D5B269DB9E54}
Note that if you use IntelliTrace it can overwrite these registry values.
2. Close all running w3wp.exe processes.
In IIS Manager restart server.
3. Run monitoring.
In Runtime Flow – Customized Run, uncheck Stop monitoring when the command completes. Set Command to “C:\Program Files\Internet Explorer\iexplore.exe”. Set Command arguments to “http://localhost/MvcApplication1”. Optionally set Options – Monitoring Filter to “Module == MvcApplication1.dll”:
After you click Run, you will see how your application runs:
Update (July 28, 2018): For Windows 7 SP1 you may need to additionally edit the applicationHost.config file. See How to configure environment variables in an IIS 7 application? for details.