Silverlight host page for development and debugging


When you first get into Silverlight development using Visual Studio, you probably created a new project using the Visual Studio project wizard for Silverlight applications. During this process you are asked if you want to create a default host page for the Silverlight application.

If we let Visual Studio create a new web site to host the Silverlight app as shown in the previous screenshot, it is equivalent to selecting the following option later on in an existing web site.

Adding a Silverlight project to a web site will cause that project to be built and the .xap archive will be published to a ClientBin/ folder under the web site.

If we elect not to create a separate web site for the Silverlight application a test html page called TestPage.html is generated in the bin folder of the Silverlight project, and the web browser will be launched, referencing the file on the local filesystem rather than using a web server.

The consequences of the local file access are that web service calls will not work unless a ClientAccessPolicy file is set up on the service. See my previous posts on this for details.


No Responses Yet to “Silverlight host page for development and debugging”

  1. Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: