2

I try to make simple profiler for ASP.NET application using .net profiling API and all that I've founded that need to restart IIS with required parameters for profiling(such way have used in Microsoft's CLR Profiler). As result, profiling was enabled for all managed websites, which works on this IIS.

Is there a possibility to run it for concrete website and all other websites will work in normal state?

casperOne
  • 73,706
  • 19
  • 184
  • 253
Igor
  • 255
  • 1
  • 2
  • 6

1 Answers1

1

How are you getting the profiler to run in the IIS process; I assume by setting the correct environment variables? If so then one option is to run the IIS application under it's own app pool with it's own identity and then set the environment variables for that identity using the registry. Then only that app-pool/worker process should load the profiler.

Alternatively depending on what you are profiling then you may be able to use the profiler Attach technique

Community
  • 1
  • 1
Shaun Wilde
  • 8,228
  • 4
  • 36
  • 56
  • I've enabled a profiler through environment variables for iis and restart it, I didn't found other way to make this. But in such way each website, which running on IIS will be runned with profiler, right? Thanks for idea about profiler attach, it can be useful, I hope it can give enough information. – Igor Aug 29 '11 at 06:21
  • Seems attaching a profiler doesn't give a possibility to track function call operations, which required for me... – Igor Aug 29 '11 at 06:27
  • That is why I said add then to the identity of the app-pool - it should only then get picked up by the worker process. As for attach method - I thought you could attach but detaching would be an issue. – Shaun Wilde Aug 29 '11 at 09:46