w3wp not showing up in the list of remote apps

Questions about YourKit .NET Profiler
Post Reply
sandeep
Posts: 24
Joined: Wed May 16, 2012 3:08 pm

w3wp not showing up in the list of remote apps

Post by sandeep »

I'm trying to profile IIS applications on a remote machine but the system has more than 10 other .NET applications running. When I try to connect to the remote machine from w3wp does not show up in the list of remote applications
sandeep
Posts: 24
Joined: Wed May 16, 2012 3:08 pm

Re: w3wp not showing up in the list of remote apps

Post by sandeep »

When I try to connect to the w3wp.exe application with the process id using Yourkit .NET API, I get the following exception

Code: Select all

Unhandled Exception: System.Exception: Process 5128 has not been started with th
e profiler, or has a different user home: C:\Users\Administrator\.ynp\log\
5128.log does not exist ---> System.IO.FileNotFoundException: Could not find fil
e 'C:\Users\Administrator\.ynp\log\5128.log'.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, I
nt32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions o
ptions, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolea
n useLongPath)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access,
FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean
bFromProxy)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access,
FileShare share)
   at YourKit.Profiler.Api.AgentPortRetriever.getAgentPortByPID(Int32 pid, Strin
g userHome)
   --- End of inner exception stack trace ---
   at YourKit.Profiler.Api.AgentPortRetriever.getAgentPortByPID(Int32 pid, Strin
g userHome)
   at YourKit.Profiler.Api.Controller..ctor(Int32 pid)
sandeep
Posts: 24
Joined: Wed May 16, 2012 3:08 pm

Re: w3wp not showing up in the list of remote apps

Post by sandeep »

sandeep wrote:When I try to connect to the w3wp.exe application with the process id using Yourkit .NET API, I get the following exception

Code: Select all

Unhandled Exception: System.Exception: Process 5128 has not been started with th
e profiler, or has a different user home: C:\Users\Administrator\.ynp\log\
5128.log does not exist ---> System.IO.FileNotFoundException: Could not find fil
e 'C:\Users\Administrator\.ynp\log\5128.log'.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, I
nt32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions o
ptions, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolea
n useLongPath)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access,
FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean
bFromProxy)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access,
FileShare share)
   at YourKit.Profiler.Api.AgentPortRetriever.getAgentPortByPID(Int32 pid, Strin
g userHome)
   --- End of inner exception stack trace ---
   at YourKit.Profiler.Api.AgentPortRetriever.getAgentPortByPID(Int32 pid, Strin
g userHome)
   at YourKit.Profiler.Api.Controller..ctor(Int32 pid)

Fixed this issue by setting YOURKIT_HOME. I find it funny that this feature is not specified in any of the docs for .NET profiler. Or did I miss it :?:
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Re: w3wp not showing up in the list of remote apps

Post by Anton Katilin »

It was mentioned in the change list for version 11:
http://www.yourkit.com/dotnet/changes/index.jsp
We'll add this to the help.

Alternatively, you could use another constructor of YourKit.Profiler.Api.Controller which takes the user home directory as a parameter in addition to the PID. But I would prefer the approach of setting the YOURKIT_HOME because finding the user home of a server user can be a difficult task.
Post Reply