How can we help you today? How can we help you today?

Can't start ASP.NET Profiling

Hi there!

I get the following error when trying to profile an ASP.NET application
that sits on IIS 6:
Could not start IIS.
RedGate.Profiler.Engine.Exceptions.CannotStartIisSessionException
at br.Launch()
at RedGate.Profiler.Session.ProfilerSession.g()

Caused by:

Could not start IIS.
RedGate.Profiler.Engine.Exceptions.CannotStartIisSessionException
at br.Launch()

Caused by:

Timed out waiting for port 8013 on 146.254.189.105 to become available
RedGate.Profiler.Engine.Startup.IIS.PortTimeoutException
at RedGate.Profiler.Engine.Startup.IIS.IISUtilities.WaitForPort(IPAddress address, Int32 port, Int32 timeout)
at RedGate.Profiler.Engine.Startup.IIS.IISUtilities.WaitForPort(String hostname, Int32 port, Int32 timeout)
at br.StartProfilingIIS(String currentUserName, Uri& url)
at br.Launch()

The error occurs after ANTS 4.0 tested (successfully) that the given port
is available, when it tries to start a W3WP worker process.
I'm running this on a Windows 2003 server as a member of the Administrators group. IE is configured to use a proxy.
What might be causing the timeout?

Thanx in advance

Manfred
ManfredRBihy
0

Comments

6 comments

  • Andrew H
    Is the IP address 146.254.189.105 assigned to your local machine or a remote machine? ANTS 4 only supports profiling websites hosted on a local machine.

    This error will result when you try to profile a website hosted on another machine, as ANTS will start profiling a local instance of IIS and then wait for it to start on the remote machine (which won't ever happen, so it times out). The text of this error is fairly unhelpful, so we're going to look at improving it.
    Andrew H
    0
  • ManfredRBihy
    Thank you for your fast reply Andrew.

    No IIS is running on the same machine.
    The website is configured to listen to the
    IP given in the error message:
    erlm5gca.ww001.siemens.net -> 146.254.189.105
    but it also listens to localhost -> 127.0.0.1
    which I also tried with the same result.

    Is there some logfile ANTS 4 writes I coul send you?
    As you already said the message isn't really that helpful.
    It would be better to know why the w3wp start failed.

    Another thing: Is it possible to display the measured time instead of
    the percentage values?

    UPDATE: Error persists in RC0!!!

    Best Regards

    Manfred
    ManfredRBihy
    0
  • Andrew H
    ANTS puts logging data into the Local Settings\Application Data\Red Gate\ANTS Performance Profiler 4 directory. I'm not sure if this will contain any helpful information in your case, though.

    The system log may contain information written by the w3wp process giving more information on why it failed. Something that does occur to me now is that the process being profiled does require a location to which it can write data. Normally we use the same directory as above, but IIS typically can't write there so we use the local settings directory that belongs to whichever user w3wp is launched as. On my system, this is at C:\Documents And Settings\A\Local Settings. If the process can't write there it won't be able to start profiling and will fail to start properly. With the default security settings this isn't a problem, but it can be if they've been changed.

    As to your other question: it is possible to change the format ANTS displays the times in - you can find the options in the view menu.
    Andrew H
    0
  • ManfredRBihy
    If I try to profile using IIS 6 as which user does the w3wp process get
    started? How can I find out? Why can't one change the directory ANTS
    writes to?

    I also disovered this the application log:
    EventID: 1022
    Category: None
    Source: .NET Runtime

    .NET Runtime version 2.0.50727.1433 - Profiling flag set, but required environment (COR_PROFILER) was not set.

    For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
    Greetings

    Manfred
    ManfredRBihy
    0
  • Andrew H
    If the ANTS service is enabled, it will start as whichever user the ANTS service is running as; if not it will try to start it using the account it is running under. The worker process changes its credentials as set in the IIS security settings. If you're an administrator and not on Vista this will produce nearly identical behaviour: on Vista if the service isn't installed the worker process probably won't start.

    For most cases, you can change where the profiler writes its data to by setting the RGTEMP environment variable to whichever directory you want to use; as the default behaviour doesn't work on IIS we use a different directory. We could change this behaviour, but you would then need to set up the security settings for the RGTEMP directory appropriately before you could profile IIS tasks.

    The application log error message could explain why profiling isn't starting, though I'm at a bit of a loss to work out why this is happening: both the COR_PROFILER and the profiler flag variable are set in the same place in our code, so it's odd that one would get passed through and not the other. I'll pass this on to our testers to see if they can find a way of reproducing this.
    Andrew H
    0
  • ManfredRBihy
    I checked on the services "Ants Performance Profiler 4 Service" and "Ants Memory Profiler 4 Service". The performance profler service can be started but the memory profiler brings "Error 1067: The process terminated unexpectedly".

    I also saw the "Ants Prfiler 3.0 Service" which is running.
    "Ants Profiler 3.2" works and I can do profiling of the IIS hosted ASP.NET application, but it won't give me the wallclock time which I need in our case to see where the waiting takes place (There's a lot of connectivity
    going on in our application like webservices and database access)

    So if profiling on IIS in 3.2 works, what happend to it in Version 4.0? Do I have to uninstall 3.0 for 4.0 to work, or is it that I need to stop the Ants Profiler 3.0 Service? What's the reason Ants Memory Profiler 4.0 can't start.

    I know I'm asking a lot of questions, but I still think it's better to discover
    "bugs" early than later after the product is released.

    Cheers

    Manfred
    ManfredRBihy
    0

Add comment

Please sign in to leave a comment.