Partager via


FAQ on NP .NET Profiler

 

NP .NET Profiler is designed to assist in troubleshooting performance, memory and first chance exception issues in .NET Applications. You can download the tool from here.

 

Which version of the profiler to use (x86 or x64) ?

If you are running x86 process on x64-bit machine, please use x86 profiler. If the IIS AppPool is configured to run 32-bit web applications, please use x86 profiler

Profiler is still “Waiting for process to start....”

Here are common causes :

  1. Folder permission
    Make sure the np.exe is at c:\temp\np and not in Desktop or My Document or User folder
    Give IIS apppool user account, permission to c:\temp\np folder
    Remove the read-only attribute from the c:\temp\np folder
  2. 32-bit or 64-bit
    If the AppPool is 64-bit, use the 64-bit np.exe. If the AppPool is configued to run 32-bit, please use x86 profiler
    If the process is x86, please use the x86 profiler
  3. Check the event log for errors from CLR runtime
  4. Collect DebugView Logs
    • Download DebugView
    • Close np.exe
    • Start DebugView.exe
    • Enable global win32 capture in DebugView
    • Start np.exe
    • Follow the wizard and click start profiling
    • Make a single request to the IIS application
    • Review the DebugView.exe output

 

“Failed to CoCreate profiler” in the event log

.NET CLR Runtime failed to create the COM object, make sure the profiler is running under admin privileges
Use x86 profiler for 32-bit process running on 64-bit machine

No logs files are created

Make sure IIS AppPool user account has write access to the output folder.
Make sure at least one request is submitted.

"Files in use" error message when reading the output files

Make sure the application is closed before reading the output files

Profiler crashes when reading large files

Use x64-bit profiler to read large log files captured using x86-bit profiler
Make sure there is enough free hard disk space

Profiler returns empty reports

Make sure the namespace settings during collection is correct, *.* is not a valid namespace option

When profiling Windows Azure process, the profiler is still “Waiting for process to start....”

Extract the NP_x64.zip file to local storage resource directory. It is usually C:\Resources\directory\f335471d5a5845aaa4e66d0359e69066.MyService_WebRole.localStoreOne\ , where the GUID like number is deployment ID and rest is the role name. Azure worker processes will have read/write access to this folder.

If NP.exe is executed from other locations, you may get following error in the event log

:.NET Runtime version 4.0.30319.551 - Loading profiler failed during CoCreateInstance.  Profiler CLSID: '{594203B3-BF17-4261-B362-F28A68185A0D}'.  HRESULT: 0x80070005.  Process ID (decimal): 3492.  Message ID: [0x2504].

Comments

  • Anonymous
    November 29, 2012
    In the list of application pools, why is 'DefaultAppPool' missing ?

  • Anonymous
    November 29, 2012
    Thank you for reporting this bug…it looks like a zero-based-index bug…it is always skipping the first AppPool name. It will be fixed in the next release.

  • Anonymous
    December 17, 2012
    How do you use this with the ASP.NET Development Server in Visual Studio 2010 Professional. I have my site running and selected "Web App Hosted in Visual Studio" from the Advanced Options but it just says "Waiting for process to start..."

  • Anonymous
    December 18, 2012
    There is a bug In the current release (4.9.3.0). Please follow this workaround blogs.msdn.com/.../profiling-visual-studio-development-web-server.aspx

  • Anonymous
    January 01, 2013
    I get comment 'Failed to cocreate Profiler".  How can I delete all of the np.net profiler from my system.  

  • Anonymous
    January 01, 2013
    My guess is you were trying to profiler a website and terminated the np.exe process before clicking on the "stop profiling" button or didn’t do the IIS reset after clicking on the "stop profiling" button. Please follow these steps :

    1. Open a cmd window, type set COR_ENABLE_PROFILING
    2. If the environment variable is not define, just do IISreset. This should resolve the problem
    3. If the environment variable is set to 1, goto Control Panel | System | Advanced tab | Environment Variables | System Variables and set the COR_ENABLE_PROFILING to 0 and do IIS reset Please let me know if the problem exists even after executing these steps. It could be another 3rd party profiler trying to enable profiling. You can get the profiler details from COR_PROFILER or COR_PROFILER_PATH environment variables
  • Anonymous
    January 10, 2013
    Hi Prashant,  after reading your answer, I decided to try step 3 ( although I skipped the IISreset, which I thought  would cause too many problems) and it worked.  The error message in the Event Viewer has disappeared.  Thanks so much.  Helga

  • Anonymous
    January 11, 2013
    Glad it got resolved.

  • Anonymous
    January 13, 2013
    Hi Prashant, I am trying to use your profiler in Server 2003, IIS 6. In profiler, I am unable to get past the "Waiting for process to start..." message. When I check Event Viewer, I am receiving the "Failed to CoCreate profiler" message. I have followed the steps outlined above, but no success. Using DebugView, I can confirm that the Cor_Enable_Profiling and Cor_Profiler variables are set. However, the first message I receive is: "wizardIIS7ReadThreadProc() : Failed to create IWbemLocator object. Err code = 80040154" I have confirmed that following the installation steps on an environment that utilizes IIS 7  results on a working profiler. Does this mean that this debugger is specifically looking for IIS 7? Do you have any other recomendations on troubleshooting this issue?

  • Anonymous
    January 14, 2013
    Hi Jasper, There was a bug in the NPProfiler.dll that impacts only 2003 machines. Can you please download this new version of the dll and let me know if it works for you. http://sdrv.ms/WXPljZ Note : this version of the dll is not signed

  • Anonymous
    March 04, 2013
    Hi Prashant, I am trying to profile a Windows Store App written in C++. The tool is stuck at “Waiting for profiler to load …”. Do you know what might be the cause? Thanks.

  • Anonymous
    March 05, 2013
    Hi Gokhan, NP .NET Profiler can profiler only managed Windows Store Apps (Apps developed using C#/VB.NET) For C++, please use PerfView, here is the link blogs.msdn.com/.../publication-of-the-perfview-performance-analysis-tool.aspx

  • Anonymous
    March 06, 2013
    Hi Prashant, It looks this tool does not support Windows Store Apps. Do you have any new version of it supporting Windows Store Apps? Thanks.

  • Anonymous
    March 07, 2013
    Hi Gokahan, To profile Windows Store App you need to use NPStoreApp.exe. Here are steps blogs.msdn.com/.../troubleshooting-performance-issues-in-windows-store-apps.aspx

  • Anonymous
    March 11, 2013
    Hi Prashant, Do I need to have visual studio in my machine? Also, wonder why do I need to give IIS apppool user account, permission to working folder? If my application talks to an app server instead of IIS, can't I use this tool for profiling? I'm new to performance engineering please help.

  • Anonymous
    March 11, 2013
    Hi Prasanna, You don’t need Visual Studio on the machine. Yes, you need to give AppPool user account write access to output folder. By default, the AppPool user account has write access to c:temp, so if you extract and run np.exe from to c:temp, you don’t have to give any additional permissions. If your application is talking to another service/server on same/remote machine,  you can still profile your application. You will get data only for your application. Here is the step-by-steps tutorial for troubleshooting performance issues in web applications : blogs.msdn.com/.../troubleshooting-performance-issues-in-web-application.aspx Please let me know if you have any questions

  • Anonymous
    May 08, 2013
    Hi Prashant. I'm using the 4.9.4.0 x86 version of the NPProfiler.dll on a Windows Server 2003 R2. Now I'm able to start and load the profiler, but I cannot see the results. I'm facing this error: CreateFile() failed for ReadOneNPFile(). Last error is 32. I'll need some help on this. Here is a link to log files: skydrive.live.com/redir

  • Anonymous
    May 08, 2013
    Hi Prashant. I'm using the 4.9.4.0 x86 version of the NPProfiler.dll on a Windows Server 2003 R2. Now I'm able to start and load the profiler, but I cannot see the results. I'm facing this error: CreateFile() failed for ReadOneNPFile(). Last error is 32. I'll need some help on this. Here is a link to log files: skydrive.live.com/redir

  • Anonymous
    May 09, 2013
    Hi Marcelo, The error code 32 is ERROR_SHARING_VIOLATION. Before opening the reports we need to end the process. Can you please retry to open the trace files again. I am able to open the trace files you shared in the skydrive without any errors. It looks like ToolStripMenuItem is taking time just before calling BevelControl::OnPaint()

  • Anonymous
    January 16, 2014
    ok

  • Anonymous
    April 17, 2014
    Prashant, We are having an issue using NP .Net Profiler in one of our environments. The profiler continues to stay at " Waiting for process to start....". We were able to get it to work in our sandbox environment but when we try it on our Dev environment it fails. We made sure we are using the right version. The only difference between the 2 environments is: In Sandbox the code for website is on the local hard drive, whereas in the Dev environment the code for the website is referenced from a network location. Do you think this is the cause of the issue? Please let me know. Thanks, -Ranjan

  • Anonymous
    April 18, 2014
    Prashant, We are having an issue using NP .Net Profiler in one of our environments. The profiler continues to stay at " Waiting for process to start....". We were able to get it to work in our sandbox environment but when we try it on our Dev environment it fails. We made sure we are using the right version. The only difference between the 2 environments is: In Sandbox the code for website is on the local hard drive, whereas in the Dev environment the code for the website is referenced from a network location. Do you think this is the cause of the issue? Please let me know. Thanks, -Ranjan

  • Anonymous
    September 05, 2014
    Hi Prashant, I am trying to use NP Profiler on Win XP SP3 and it is failing to profile the application. The NPProfiler.dll is failing to register using RegSvr32. You have posted a fix for Win 2003 but the link is no longer accessible. Can you please share it again.

  • Anonymous
    September 23, 2014
    .NET Profiler version 4.9.3.0 does not work on 32-bit Windows XP SP3. Dependecy walker for npprofiler.dll shows that it imports InitializeCriticalSectionEx from kernel32.dll which does not exist on the kernel32.dll version that's installed on my machine. Event Viewer shows this error when trying to profile: .NET Runtime version 4.0.30319.1008 - Loading profiler failed during CoCreateInstance.  Profiler CLSID: '{594203B3-BF17-4261-B362-F28A68185A0D}'.  HRESULT: 0x8007007f.  Process ID (decimal): 9212.  Message ID: [0x2504].

  • Anonymous
    May 23, 2016
    Hi Prashanth,When I run the profiler for asp.net, it shows Waiting for process to start. I have the exe in c:\temp\np. I can see that in the Even log it shows profiler loaded successfully. But I do not see profiler loaded in the profiling window.Any help?

  • Anonymous
    May 24, 2016
    Can I use this tool in production environment? What kind of overload this tool takes?