How to profile a web service assembly using the Visual Studio 2010 profiler (instrumentation)?
I have an assembly which bel开发者_开发技巧ongs to a web service which I want to profile using Visual Studio 2010 Ultimate. What are the parameters to use for the wizard below. I know the first one is the assembly. Because IIS is hosting the assembly, I am not sure what to put for the executable path. w3wp.exe?
I guess you will have to do with Casini (the debugging webserver). I've tried searching for my dll's hosted in IIS using Process Explorer, but never could find them. Probably because IIS does some shadow copying so you can easily replace the dll whenever you want (it will never be "in-use").
Don't you have the option to attach to a running process?
The 'Executable path' parameter in the wizard above is the executable to use to launch with. In this case the text in the wizard is slightly misleading because while the DLL is hosted in w3wp.exe, the executable path should be for Internet Explorer (iexplore.exe).
Note that you may need to add a post-instrument step to re-sign your web service since the instrumentation process changes the binary and it may no longer load correctly if it was signed. See MSDN for more information.
As Louis notes, there is an attach option to attach to a running process, but unfortunately that is only available for sampling mode.
BTW, you will find a lot of extra information and tips for VS2010 profiling on our Profiling Blog
精彩评论