Red Gate forums :: View topic - Error profiling ASP.NET Web application
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
ANTS Performance Profiler 5
ANTS Performance Profiler 5 forum

Error profiling ASP.NET Web application

Search in ANTS Performance Profiler 5 forum
Post new topic   Reply to topic
Jump to:  
Author Message
Jon Sagara



Joined: 14 Jul 2009
Posts: 1

PostPosted: Tue Jul 14, 2009 9:17 pm    Post subject: Error profiling ASP.NET Web application Reply with quote

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
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6641

PostPosted: Wed Jul 15, 2009 4:27 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
bbirney



Joined: 08 Feb 2010
Posts: 8

PostPosted: Mon Feb 08, 2010 7:49 pm    Post subject: Why is this still an issue? Reply with quote

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
View user's profile Send private message
bbirney



Joined: 08 Feb 2010
Posts: 8

PostPosted: Tue Feb 09, 2010 3:01 pm    Post subject: Screenshots Reply with quote

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
View user's profile Send private message
bbirney



Joined: 08 Feb 2010
Posts: 8

PostPosted: Tue Feb 09, 2010 6:21 pm    Post subject: Solution Reply with quote

I spoke with Nick at Red Gate, and he directed me to a solution. Here it is:

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.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group