How to configure ants to profile an out of browser silv app?

Code profiling for .NET Developers

Moderators: Luke Jefferson, StephenC, Alex.Davies, AndrewH, melvyn.harbour, Laura Morley

How to configure ants to profile an out of browser silv app?

Postby alexgoaga » Thu Mar 03, 2011 5:06 pm

Hi,

Currently, I am evaluating the software and I want to know how to configure ants to profile silverlight application.
I manage to run the silverlight application but when specifying only the path to xap file(For Silverlight Out-of-Browser applications, specify the path to the XAP file (prefixed by file:///). This is normally found in %LOCALAPPDATA%\\Microsoft\\Silverlight\\OutOfBrowser\\.) it starts the "out of browser" application with the silverlight host set to xaml file.
App.Current.Host.Source.AbsoluteUri="pointing to xaml file, as specified in ant"

How can I specify the origin, the uri to server? Ex:http://localhost/test/test.aspx.

Also, how do you run sllauncher from ants?

Kind Regards,
Alexandru.
alexgoaga
 
Posts: 2
Joined: Thu Mar 03, 2011 4:57 pm
Location: Cyprus

Postby dom.smith » Thu Mar 03, 2011 6:54 pm

Hi Alexandru,

I am currently in the process of rewriting this part of the documentation. Sorry it is a bit unclear at present.

Silverlight applications can either be in-browser, or out-of-browser. You choose which type of Silverlight application you want to build in the Visual Studio project.

The settings you enter in ANTS Performance Profiler depend on the type of Silverlight application that you are profiling.

If your Silverlight 4 application is a Silverlight out-of-browser application, you are correct:
(1) For the Silverlight application URL, enter the file path to the XAP file.
(2) Your Silverlight application launches inside sllauncher.exe (the out-of-browser launcher) automatically. You do not need to run sllauncher.exe separately.
This will not work if your Silverlight application is an in-browser application.

If your Silverlight 4 application is a Silverlight in-browser application, you need the Silverlight plugin in Internet Explorer. To profile the application:
(1) Close all running instances of Internet Explorer.
(2) For the Silverlight application URL, enter either:
* the file path to the HTML page that embeds the Silverlight application or
* the localhost URL of the HTML or ASPX page that embeds the Silverlight application (eg: http://localhost/test/test.aspx)
(3) Internet Explorer starts and loads your Silverlight application automatically.
This will not work if your application is a Silverlight out-of-browser application.

From your post, it sounds like your application has been built as a Silverlight out-of-browser application. If so, to profile it by specifying the address on the server, you need to rebuild it as a Silverlight in-browser application first.

I hope this helps,

Dom.
Dominic Smith,
Project Manager,
Red Gate Software.
dom.smith
 
Posts: 94
Joined: Thu Jun 03, 2010 5:54 pm
Location: Cambridge, UK

Postby alexgoaga » Fri Mar 04, 2011 8:51 am

Hi,

I want to profile the silverlight application in out of browser and the problem that I encounter is the following:

Ants starts the silverlight application out of browser but instead of specifying as host source the URL to WEB SERVER, it specifies the source as
file:///path to xap. (App.Current.Host.Source)

The problem is that some of my services(RIA service, authentication service) used by the silverlight application are based on this source and they fail because file://path to xap is not a valid URL.
In order for this process to work properly we need to way to specify the URL to web server otherwise we will have this type of error message when trying to connect to server: "the provided uri scheme 'file' is invalid expected 'http'" http://social.msdn.microsoft.com/Forums ... fa7083e51f

Kind Regards,
Alexandru.
alexgoaga
 
Posts: 2
Joined: Thu Mar 03, 2011 4:57 pm
Location: Cyprus

Postby Chris.Allen » Fri Mar 04, 2011 12:06 pm

It sounds to me that if you have other processes needing an http url, you need to configure your silverlight application as a web application first.

Doesn't your link help, when followed through:

http://forums.silverlight.net/forums/p/ ... spx#187521

?
Chris.Allen
 
Posts: 594
Joined: Thu Mar 12, 2009 4:17 pm


Return to ANTS Performance Profiler 6

Who is online

Users browsing this forum: No registered users and 0 guests