ASP.NET Profiling

  • Thread starter Thread starter Mark Fox
  • Start date Start date
M

Mark Fox

Hello,

In the VS.NET documentation

http://msdn.microsoft.com/library/default.asp?
url=/library/en-us/cpguide/html/cpconenablingprofiling.asp

it says that in order to profile an application you have
to have its CLSID. I am new to profiling and looking to
profile my ASP.NET application, but don't know how to
find its CLSID. Also, it says that "The profiler must
implement the ICorProfilerCallback" Does this mean I
have to develop my own program to do the profiling? I
thought VS.NET would have a built in profiler that would
log each time a function is entered or exited. Any help
would be appreciated! Thanks!
 
Hello Mark,

Thanks for your post. I'd like to share the following information with you:

1. The COR_PROFILER refers to either the GUID of Profiler object or its
ProgID, which implements the interface ICorProfilerCallback. There are
several examples of the profilers:

The .NET Profiling API and the DNProfiler Tool
http://msdn.microsoft.com/msdnmag/issues/01/12/Hood/default.aspx

Hot Spot Profiler
<Program Files>\Microsoft Visual Studio .NET\FrameworkSDK\Tool Developers
Guide\Samples\profiler\gcp_profiler

General Purpose
<Program Files>\Microsoft Visual Studio .NET\FrameworkSDK\Tool Developers
Guide\Samples\profiler\hst_profiler

2. If you try to profile a web application, you will need to inject the
environment variables into the aspnet_wp. I recommend you the following
thread which discusses this issue:

http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&threadm=098d01c2
ecb1%246477bb10%24a601280a%40phx.gbl&rnum=3&prev=/groups%3Fq%3DCor_Profiler%
26hl%3Den%26lr%3D%26ie%3DUTF-8%26oe%3DUTF-8%26selm%3D098d01c2ecb1%25246477bb
10%2524a601280a%2540phx.gbl%26rnum%3D3

Please feel free to let me know if you have any problems or concerns.

Have a nice day!

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! ¨C www.microsoft.com/security
This posting is provided ¡°as is¡± with no warranties and confers no rights.
 
Huang,

Thank you for the articles. They were great, but
they were just slightly over my head. I have some
background in C++ but I am by no means an expert and I
don't know about programming COM, MFC, ATL, etc. in C++.
So I have two questions:

1) Is it possible to develop a profiler using C#? I
could try to modify the samples you linked to, but I'm
not sure how well that would go.

2) The google thread you referenced is great, but at one
point Andre says

You can use the attached program to find out the SID of
ASPNET account. Here is how to call it:
qlookup -name aspnet

But of course there is no attached file. Do you know
what program he was attaching? Or what other program
could I use to find the SID (I'm on WinXP Pro)?

Also, I am not sure about Andre's third step. I am not
sure what profiling variables to add. Sorry about being
such a newbie. I really appreciate all of your help!
Thanks so much!


-----Original Message-----
Hello Mark,

Thanks for your post. I'd like to share the following information with you:

1. The COR_PROFILER refers to either the GUID of Profiler object or its
ProgID, which implements the interface
ICorProfilerCallback. There are
several examples of the profilers:

The .NET Profiling API and the DNProfiler Tool
http://msdn.microsoft.com/msdnmag/issues/01/12/Hood/defau lt.aspx

Hot Spot Profiler
<Program Files>\Microsoft Visual
Studio .NET\FrameworkSDK\Tool Developers
Guide\Samples\profiler\gcp_profiler

General Purpose
<Program Files>\Microsoft Visual
Studio .NET\FrameworkSDK\Tool Developers
 
Back
Top