Options

Performance Profiler is not working at all

I am completely new to Performance Profiler, and maybe I am doing something silly that is wrong.
Even so it looks so easy in the video.
I open up the application and the first page I get is the Settings page. I select ASP.NET web application IIS, and in the url I put in http://localhost:2558/.
I click on the button Start Profiling and my application is launched. However on performance counter data screen I see nothing.
I click on "Select All" just for something to do and I get the message "No results to display".
This is not how it looks in the video. What am I doing wrong?
Make the impossible possible, the possible easy, and the easy elegant. — Moshe Feldenkrais

Comments

  • Options
    Is that the actual binding in IISadmin of your website? If not please use the same url as is configured in IISadmin.

    If it is, can you check with task manager to see that your process is indeed launched?
  • Options
    I didn't do anything with IIS to set up my MVC 2 application on my local machine which runs on XP and IIS 5.1.
    So I decided to set it up, having to fix 403 errors long the way until I got
    "Server Application Unavailable
    The web application you are attempting to access on this web server is currently unavailable. Please hit the "Refresh" button in your web browser to retry your request.

    Administrator Note: An error message detailing the cause of this specific request failure can be found in the application event log of the web server. Please review this log entry to discover what caused this error to occur.
    "
    The event viewer is NOT helpful.
    Now I feel like giving up.
    Make the impossible possible, the possible easy, and the easy elegant. — Moshe Feldenkrais
  • Options
    Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    Profiling on IIS 5 is pretty simple, but the web app has to be configured in IIS first. So if you have set up a binding for port 2258 on the default website in IIS Administrator, and added the MVC app's directory as an application in IIS, and it works in IIS without the profiler, you should be able to profile it.

    If you have the binding to port 2258 set up, all you should need to do is set up the MVC app's folder as an application by right-clicking it in Windows Explorer and using the item to add it to IIS (I think it's called Web sharing in XP) and I think there is an option to make it an application rather than a "virtual directory".

    After doing this, you should be able to open a web browser and go to http://localhost:2258/yourapp and if that works, you should be able to profile it.
  • Options
    Currently the default web site is binding to port 80.
    I changed it to 2258 but that didn't work.
    Make the impossible possible, the possible easy, and the easy elegant. — Moshe Feldenkrais
  • Options
    Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    Nope, that won't work, for sure. The interface doesn't explain very well, but the address textbox is where you put the URL that the website normally answers on. This way Profiler can go through the website's bindings to work out which website is bound to that address and create the appropriate configuration.

    On XP, there is no unused port option and you effectively have to restart IIS, if I remember correctly.
  • Options
    I can't find the address textbox.
    If I could, is that where I type http://localhost:2258/yourapp?
    Make the impossible possible, the possible easy, and the easy elegant. — Moshe Feldenkrais
  • Options
    Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    In the web application URL box, you enter the normal URL, ie http://localhost
  • Options
    I am looking at the properties of the virtual directory in IIS and I cannot see such a box.
    Make the impossible possible, the possible easy, and the easy elegant. — Moshe Feldenkrais
  • Options
    Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    I was talking about the ANTS Profiler URL box, which leads me suspiciously back to the first question - is the website already configured and working in IIS or not?
  • Options
    I don't think it is properly set up in IIS.
    Lets go back to the beginning. I am happily running my application whilst I develop it on my local machine.
    Then I download the profiler and I try to run the app. The path to my local host does not work. It seems as though I have to set up my application in IIS in order to get a pathname that will work. That is what I am now trying to do.
    Maybe I do not have to do that? However the url for localhost - the default IIS settings that I do not see in the IIS manager - that I am currently using does not work.
    Make the impossible possible, the possible easy, and the easy elegant. — Moshe Feldenkrais
  • Options
    Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    If you are on the development computer you probably have "Development Webserver" as this is what Visual Studio uses to launch the website. If you use the development webserver option in ANTS Profiler, all you have to do is point it at the folder where the website files are and this saves you the inconvenience of having to install the website in IIS.

    Otherwise you have to go through the IIS Administrator tool and set up a virtual application to host your website.
  • Options
    So instead of using the IIS option I use the "Web application" option? The problem is that I cannot get that to work either. I am using a MVC application and for the path it wants me to enter an ASPX page. Not sure about that, but I put in the login.aspx as that is the first page I navigate to in my application.
    Then in the server settings I put in /http://localhost:2258/myapp and for the port number I put in 2258. I select .Net4.

    I try running that and it does not work.
    Make the impossible possible, the possible easy, and the easy elegant. — Moshe Feldenkrais
  • Options
    Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    What happens at this point? A 403 error? Because then it's probably just a matter of using the correct virtual directory/start page in the browser.
  • Options
    I get an error message; "Failed to connect to target process because an exception occurred: Could not launch the task to be profiled. Please check your settings and try again"
    When I look on the details I get;

    "Cannot profile web application on port 2258: the port is already in use - please select a different port"
    Make the impossible possible, the possible easy, and the easy elegant. — Moshe Feldenkrais
  • Options
    Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    If you open a command prompt and run netstat -a -b this should tell you which program is already listening on the port. Then you can close that program. Or choose a different port.
  • Options
    I am surprised that I have to do that.
    Anyway I did what you suggested.
    In the virtual directory I put /http://localhost:2558/
    For the Port to bind web server I put in one of the port numbers that came back from that command you gave me.
    Now I get a launch. The error message on the launched web page is; HTTP Error 400 - Bad Request.
    Make the impossible possible, the possible easy, and the easy elegant. — Moshe Feldenkrais
  • Options
    Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    In the settings for "profile hosted in development webserver", the virtual directory specification is the part after the server and port. Usually just a forward-slash / is good enough.
  • Options
    I do not know what you mean by "profile hosted in development webserver".
    I tried putting a forward slash in the Web Server virtual directory, but that did not work.
    Make the impossible possible, the possible easy, and the easy elegant. — Moshe Feldenkrais
  • Options
    Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    There are two ways to profile a web application in the profiler project settings. Hosted in IIS and Hosted in development web server. The one that has the box for virtual directory is development webserver. So I assume you're using that.

    And now what does it do? It should not be a bad request. It did that because you seem to have put an entire URL in the virtual directory box.
  • Options
    According to my previous message, I put in /http://localhost:2558/
    Is that wrong?
    Make the impossible possible, the possible easy, and the easy elegant. — Moshe Feldenkrais
  • Options
    Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    Please send another screenshot. If you follow the instructions I have been giving, it should work.
Sign In or Register to comment.