At the time of this writing, Beta 2 is not yet legally available on the outside AFAIK, so I hope I'm not jumping the gun here - but the more eyeballs and user feedback you can help us get, the better. So consider this a work in progress that will get updated as time goes on, if you have anything to add please throw it in the comments section and I will update as appropriate!
What's expected to work:
What's not expected to work (sorry):
We burned the midnight oil getting basic scenarios for ASP.NET profiling going in Beta 2, but alas we are talking beta software here and there are a lot of known bugs that we are working on fixing but didn't make it in before this milestone. These are the main ones I'm driving to get fixed. If you know of any other bugs not listed here, please, please, please let me know (that's the joy of beta, so I'm really interested in hearing from you):
OK, now that you've seen all the dirty laundry, here's the good news:
Open your web application or web service in the IDE, then select:
Tools->Performance Tools->Performance Wizard ...
The wizard makes it easy to create a performance session which has all the information about how you want to profile it (in sampling mode, instrumentation mode, and a multitude of other options you can set in property pages). You can arrive at the same result by choosing
Tools->Performance Tools->New Performance Session
but then you have to add the target project yourself. 6 to one, half a dozen to the other.
The trick to launching this is to select the Green arrow in the Performance Explorer toolbar, the one that gives you the 'Launch' tooltip when you hover over it. OK, if you must, just right click on the node in and use the context menu instead of using the pretty toolbar icon that a graphic designer made especially for you. However you decide to do it, once you trigger the launch, behind the scenes Visual Studio will set up the environment and IIS with everything it needs to do the type of profiling you are doing. Environment variables in the case of sampling, and some web.config information in the case of instrumentation. Instrumentation is done as part of a post-JIT compile step by ASP.NET, so that's why special web.config information needs to be added there - it gives ASP.NET the information needed to instrument the binaries.
IE will start up and then you will be able to perform any requests (from inside or outside the IE window) while that browser window is still open. When the browser process exits, the IDE will shut down the profiling and start collecting the data.
Note: If you are using Cassini and need Cassini to launch with a pre-specified port number under the profiler (for example running load testing against the site) you can ovveride the default port number used by the profiling tools by finding the registry key under the VS key which contains a string value named “PORT” with the decimal number representing the port # that we will launch cassini with. For example, HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0\AspNetHelper[PORT=”234”] should launch cassini on port 234.
At this point you can view the performance results similar to any other application that was profiled. The analysis view automatically starts rendering in the IDE.
My experience is that there are things being done without progress indicators between when profiling is finished and when the performance view is displayed, at least in Beta 2 builds. You may think your IDE is unresponsive when it actually is doing something, if so and you're willing to send me a note telling me what point you thought it was unresponsive it will help me put the pressure on to fix those spots.