Error profiling ASP.NET Web application
Jon Sagara
Posts: 2
Hello,
I just downloaded the trial, and I am unable to start profiling an ASP.NET Web application.
Here are my particulars:
* OS: Windows Server 2008 SP2
* Visual Studio 2008 SP1 (.NET Framework 3.5 SP1)
My application uses a Web site that is defined in IIS7. The URL (myurl.example.com) is defined in my HOSTS file, and is not a DNS entry.
So what happens is this: in Visual Studio, I select ANTS 5 -> Profile Performance, and I get the following error message:
I tried opening Profiler itself (ANTS 5 -> Launch ANTS Performance Profiler), which brought up the Settings dialog. I selected the following options:
* Choose application type to profile: ASP.NET web application (hosted in IIS)
* ASP.NET web application (URL): http://myurl.example.com:80/
* Profiling mode: Line-level and method-level timings; all methods (most detailed)
* Default timing display: CPU
* Profile child processes: checked
* Profile on: (I tried both; I get the same exception either way)
When I clicked the Start Profiling button, I got the following exception:
Any ideas?
Thanks,
Jon
I just downloaded the trial, and I am unable to start profiling an ASP.NET Web application.
Here are my particulars:
* OS: Windows Server 2008 SP2
* Visual Studio 2008 SP1 (.NET Framework 3.5 SP1)
My application uses a Web site that is defined in IIS7. The URL (myurl.example.com) is defined in my HOSTS file, and is not a DNS entry.
So what happens is this: in Visual Studio, I select ANTS 5 -> Profile Performance, and I get the following error message:
Exception while performing Profile &Performance
System.UriFormatException: Invalid URI: The URI is empty.
at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind)
at System.Uri..ctor(String uriString)
at RedGate.Profiler.AddIn.Commands.ProfileCommand.get_LaunchArguments()
at RedGate.Profiler.AddIn.Commands.ProfileCommand.RunCommand()
at RedGate.Profiler.AddIn.Five.Connect.Exec(String commandName, vsCommandExecOption executeOption, Object& varIn, Object& varOut, Boolean& handled)
OK
I tried opening Profiler itself (ANTS 5 -> Launch ANTS Performance Profiler), which brought up the Settings dialog. I selected the following options:
* Choose application type to profile: ASP.NET web application (hosted in IIS)
* ASP.NET web application (URL): http://myurl.example.com:80/
* Profiling mode: Line-level and method-level timings; all methods (most detailed)
* Default timing display: CPU
* Profile child processes: checked
* Profile on: (I tried both; I get the same exception either way)
When I clicked the Start Profiling button, I got the following exception:
Couldn't determine the IIS Site associated with URL 'http://myurl.example.com/'. Please check that the URL is serviced by the instance of IIS running on this machine
RedGate.Profiler.Engine.Exceptions.CannotStartSessionException
at bJ.Launch()
at RedGate.Profiler.Session.ProfilerSession.j()
Caused by:
Couldn't determine the IIS Site associated with URL 'http://myurl.example.com/'. Please check that the URL is serviced by the instance of IIS running on this machine
RedGate.Profiler.Engine.Exceptions.CannotStartIisSessionException
at bQ.PerformLaunch()
at bJ.Launch()
Caused by:
Couldn't determine the IIS Site associated with URL 'http://myurl.example.com/'. Please check that the URL is serviced by the instance of IIS running on this machine
RedGate.Profiler.Engine.Startup.IIS.IISException
stack trace:
at RedGate.Profiler.Engine.Startup.IIS.IIS7Utilities.a(String , Uri , Boolean , Int32 )
at RedGate.Profiler.Engine.Startup.IIS.IIS7Utilities.GetW3wpArgs(Uri url, Boolean profileOnNewPort, Int32 newPort)
at bp.StartProfilingIIS(String currentUserName, String subprocessVariableValue)
at RedGate.Profiler.Engine.Startup.IIS.IISStarter`1.StartProfilingIIS(String currentUserName, String subprocessVariableValue)
at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.PrivateProcessMessage(RuntimeMethodHandle md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg, Int32 methodPtr, Boolean fExecuteInContext)
rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at RedGate.Profiler.Engine.Startup.IIISActuator`1.StartProfilingIIS(String currentUserName, String subprocessVariableValue)
at bQ.PerformLaunch()
Any ideas?
Thanks,
Jon
Comments
This is a well-known issue with the Profiler add-in. When you use the add-in, it checks the debugging settings for the current project to determine which URL to launch in the web server. If you put a valid url in by right-clicking the project in VS, then selecting properties, and on start options, enter a valid URL in the "use custom server" textbox.
ANTS Profiler will only profile websites running on the local computer, so any URL that you enter here (or in the regular ANTS Profiler UI) has to be resolved to the local computer by hosts, DNS, and IIS itself.
I am attempting to work around this limitation - it appears that you cannot use ANTS with the development web server, since providing this value in "Use Custom Server" precludes the possibility of selecting "Use Visual Studio Development Server". Have any other users found a way to use ANTS with the VS development server? I am attempting to install my site onto my local machine's stand-alone IIS and run it that way, but that breaks the normal workflow for developing in Visual Studio.
Please assist.
1) Download this file: ftp://support.red-gate.com/patches/ants_profiler/RedGate.Profiler.Five.AddIn.dll
2) Put it in your ANTS install directory, replacing a file with the same name.
3) Restart Visual Studio.