| Author |
Message |
Jon Sagara
Joined: 14 Jul 2009 Posts: 1
|
Posted: Tue Jul 14, 2009 9:17 pm Post subject: Error profiling ASP.NET Web application |
|
|
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:
| Quote: |
---------------------------
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:
| Quote: |
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 |
|
| Back to top |
|
 |
Brian Donahue
Joined: 23 Aug 2004 Posts: 6341 Location: Red Gate Software
|
Posted: Wed Jul 15, 2009 4:27 pm Post subject: |
|
|
Hi Jon,
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. _________________ Brian Donahue
Technical Support
Red Gate Software Ltd.
44 (0)870 160 0037 ext 8521
US and CAN 1-866-RED GATE ext 8521 |
|
| Back to top |
|
 |
bbirney
Joined: 08 Feb 2010 Posts: 8
|
Posted: Mon Feb 08, 2010 7:49 pm Post subject: Why is this still an issue? |
|
|
This seems like a good candidate for a fix. As a prospective user, I was very discouraged when my first experience with the software was an unhandled exception, followed by 45 minutes of monkeying around with VS and IIS, trying to get past the first step of the tutorial.
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. |
|
| Back to top |
|
 |
bbirney
Joined: 08 Feb 2010 Posts: 8
|
Posted: Tue Feb 09, 2010 3:01 pm Post subject: Screenshots |
|
|
Here are two screenshots: One illustrating the issue, and the other with my current project settings for the web app in question. As you can see in the second screenshot, I have set a valid URL in the "Use Custom Server" text box. The error occurs regardless of whether the radio button for Use Custom Server or the radio button for Use Visual Studio Development Server is selected.
Please assist.
 |
|
| Back to top |
|
 |
bbirney
Joined: 08 Feb 2010 Posts: 8
|
|
| Back to top |
|
 |
|