API
-
- Posts: 11
- Joined: Thu Apr 29, 2010 3:07 pm
Re: API
The service user ?
Sorry I'm not sure to understand. ynpagent.dll have read and execute rights for Administrators, System and the account is used to log in. I tried to grant access to IIS_WPG group but it doesn't change.
But why does it work for standalone applications if it's not loaded ?
Sorry I'm not sure to understand. ynpagent.dll have read and execute rights for Administrators, System and the account is used to log in. I tried to grant access to IIS_WPG group but it doesn't change.
But why does it work for standalone applications if it's not loaded ?
-
- Posts: 6172
- Joined: Wed Aug 11, 2004 8:37 am
Re: API
Please open Windows Task Manager and find IIS 6 process (w3wp.exe). The user which I mean should be shown in "User Name" column. If the column is not visible, please enable it via "View | Select Columns..."The service user ?
Sorry I'm not sure to understand. ynpagent.dll have read and execute rights for Administrators, System and the account is used to log in.
The simplest thing to do is to set ynpagent.dll's permissions "read" and "execute" to "Everyone": in ynpagent.dll's properties add user "Everyone" and check appropriate checkboxes. This will help to find out whether it's a problem with ynpagent.dll access rights or not.I tried to grant access to IIS_WPG group but it doesn't change.
-
- Posts: 11
- Joined: Thu Apr 29, 2010 3:07 pm
Re: API
There is no w3wp.exe in the task manager view (but there's inetinfo and aspnet_wp).Anton Katilin wrote: Please open Windows Task Manager and find IIS 6 process (w3wp.exe). The user which I mean should be shown in "User Name" column. If the column is not visible, please enable it via "View | Select Columns..."
I set ynpagent's permissions to "Everyone" but it doesn't change.Anton Katilin wrote: The simplest thing to do is to set ynpagent.dll's permissions "read" and "execute" to "Everyone": in ynpagent.dll's properties add user "Everyone" and check appropriate checkboxes. This will help to find out whether it's a problem with ynpagent.dll access rights or not.
I really don't understand, but i'm not the one who configured the remote machine (it's a test machine in an enterprise)
-
- Posts: 6172
- Joined: Wed Aug 11, 2004 8:37 am
Re: API
Have you accessed an ASP.NET page of the profiled site (not a static content) in browser?
-
- Posts: 24
- Joined: Fri Apr 13, 2012 1:20 pm
Re: API
Hello everyone,
I'm trying to attach another application using API, but I didn´t have sucess.
Seeing the code:
Controller controller = new Controller(@"ApplicationPath", 10002);
The error code is like this:
System.Net.Sockets.SocketExpetion
The Name requested is valid. But it was not found data of requested type.
I had already registered ynpagent.dll and seted environment variables.
Someone knows where are the problem here?
Thank You!
I'm trying to attach another application using API, but I didn´t have sucess.
Seeing the code:
Controller controller = new Controller(@"ApplicationPath", 10002);
The error code is like this:
System.Net.Sockets.SocketExpetion
The Name requested is valid. But it was not found data of requested type.
I had already registered ynpagent.dll and seted environment variables.
Someone knows where are the problem here?
Thank You!
-
- Posts: 6172
- Joined: Wed Aug 11, 2004 8:37 am
Re: API
What is the "ApplicationPath" ?
This parameter should be the host name or IP address of the machine where the profiled application is running.
In particular, if the profiled application is running on the same machine as where you use the controller, pass "localhost" as the parameter value.
This parameter should be the host name or IP address of the machine where the profiled application is running.
In particular, if the profiled application is running on the same machine as where you use the controller, pass "localhost" as the parameter value.
-
- Posts: 24
- Joined: Fri Apr 13, 2012 1:20 pm
Re: API
Hello Anton,
I am running in the same machine, but if I put "localhost", the API will attach the application where I'm running the Controller class. I want to profile another application in the same machine.
Then "ApplicationPath" is the path of application where I want to atach, like "C:\Windows\System32\calc.exe".
Another example, my Controller class is running into application "X", through of my application "X" I want to attach "Y" application, see an example:
Into application "X" classes:
Controller c = new Controller("path of Y", 10001);
Do you understand? I dont know if it is possible.
Thank You.
I am running in the same machine, but if I put "localhost", the API will attach the application where I'm running the Controller class. I want to profile another application in the same machine.
Then "ApplicationPath" is the path of application where I want to atach, like "C:\Windows\System32\calc.exe".
Another example, my Controller class is running into application "X", through of my application "X" I want to attach "Y" application, see an example:
Into application "X" classes:
Controller c = new Controller("path of Y", 10001);
Do you understand? I dont know if it is possible.
Thank You.
-
- Posts: 6172
- Joined: Wed Aug 11, 2004 8:37 am
Re: API
You should specify appropriate profiler agent port (2nd parameter) of that application to which you want to connect.
You can either specify the port explicitly via startup option "port":
http://www.yourkit.com/docs/net60/help/ ... ptions.jsp
...or learn it by analyzing that application's log file <user home>\.ynp\log\<PID>.log
The first approach is simpler and is more reliable.
You can either specify the port explicitly via startup option "port":
http://www.yourkit.com/docs/net60/help/ ... ptions.jsp
...or learn it by analyzing that application's log file <user home>\.ynp\log\<PID>.log
The first approach is simpler and is more reliable.
-
- Posts: 6172
- Joined: Wed Aug 11, 2004 8:37 am
Re: API
Is 1180 the port which you have specified via "port" option, i.e. does the startup options applied to the application which you want to profile contain text "port=1180"?
Please re-read my previous post. The controller needs the profiler agent's port. Not the port your application uses for other purposes.
Please re-read my previous post. The controller needs the profiler agent's port. Not the port your application uses for other purposes.
-
- Posts: 2
- Joined: Mon Apr 16, 2012 1:37 pm
Re: API
Mr. Anton, I'm facing the very same problems that Jabras have.
I would like to ask you a question about it, if you dont mind.
1 - I need to profile a .net application using the YourkitApi. This .net app doesnt have any reference to Yourkit API assembly. To me, seems be an obvoius question:if I'm a registered user and have yourkit installed in my computer,I should be able to perform this task. Is it possible or the target application needs to recefence the YourKit API assembly?
I do belive that I'm doing something wrong here, and I need your help in order to fix it.
Kind Regards
Christiano Coutinho
I would like to ask you a question about it, if you dont mind.
1 - I need to profile a .net application using the YourkitApi. This .net app doesnt have any reference to Yourkit API assembly. To me, seems be an obvoius question:if I'm a registered user and have yourkit installed in my computer,I should be able to perform this task. Is it possible or the target application needs to recefence the YourKit API assembly?
I do belive that I'm doing something wrong here, and I need your help in order to fix it.
Kind Regards
Christiano Coutinho
-
- Posts: 6172
- Joined: Wed Aug 11, 2004 8:37 am
Re: API
Hello Christiano
There are 2 application we are talking about:
1) the profiled application
2) the application which uses the controller to connect to the application #1
They can be the same application (the application profiles itself) or different applications (application #2 controls application #1).
Application #1 does not need to reference the API. It should start with the profiler instead:
http://www.yourkit.com/docs/net60/help/ ... _local.jsp
http://www.yourkit.com/docs/net60/help/ ... manual.jsp
Application #2 must reference YourKit.Profiler.Api.dll whose classes it uses.
If #1 and #2 are the same application, the combination of the requirements applies.
Best regards,
Anton
There are 2 application we are talking about:
1) the profiled application
2) the application which uses the controller to connect to the application #1
They can be the same application (the application profiles itself) or different applications (application #2 controls application #1).
Application #1 does not need to reference the API. It should start with the profiler instead:
http://www.yourkit.com/docs/net60/help/ ... _local.jsp
http://www.yourkit.com/docs/net60/help/ ... manual.jsp
Application #2 must reference YourKit.Profiler.Api.dll whose classes it uses.
If #1 and #2 are the same application, the combination of the requirements applies.
Best regards,
Anton
-
- Posts: 24
- Joined: Fri Apr 13, 2012 1:20 pm
Re: API
Anton,
When I call the GetSnapshot method, the application stop in this method e doesn´t return nothing. Then I stop by Visual Studio.
In the log, recorded this:
.NET\jre\bin\javaw.exe
[YourKit Profiler 6.0.1 for .NET] [0.001]: Reading startup options
[YourKit Profiler 6.0.1 for .NET] [0.001]: Environment variable YNP_STARTUP_OPTIONS: not defined
[YourKit Profiler 6.0.1 for .NET] [0.001]: File C:\Users\jarbas.carvalho\.ynp\config\startup-options.ini: disablealloc,port=10002
[YourKit Profiler 6.0.1 for .NET] [0.033]: error at ProfilerCore.cpp:302: Cannot start: cannot bind to port
What the value who have I to register to environment variable YNP_STARTUP_OPTIONS?
Thanks.
When I call the GetSnapshot method, the application stop in this method e doesn´t return nothing. Then I stop by Visual Studio.
In the log, recorded this:
.NET\jre\bin\javaw.exe
[YourKit Profiler 6.0.1 for .NET] [0.001]: Reading startup options
[YourKit Profiler 6.0.1 for .NET] [0.001]: Environment variable YNP_STARTUP_OPTIONS: not defined
[YourKit Profiler 6.0.1 for .NET] [0.001]: File C:\Users\jarbas.carvalho\.ynp\config\startup-options.ini: disablealloc,port=10002
[YourKit Profiler 6.0.1 for .NET] [0.033]: error at ProfilerCore.cpp:302: Cannot start: cannot bind to port
What the value who have I to register to environment variable YNP_STARTUP_OPTIONS?
Thanks.