Hosting a Silverlight application in a custom website

To create a Silverlight application and host it in a custom website, you could use the following steps:

a) Create a Silverlight project in Blend, and test it. We assume that you are now ready to publish the application on a website.

b) Open the solution in Visual Studio 2010

c) Right click on the solution node Add -> New Website (Existing Website if you already had one)

image

f) Right click on the website in Visual Studio, choose Property Pages, and in the dialog that opens up, choose Silverlight Applications

image

g) Choose Add.

image

h) In the dialog that shows up, choose "Add" and the choose OK in the website property pages dialog. Optionally, you can make a few changes - for example, you can uncheck the "Add a test page that references the control" if you wanted to author your webpage from scratch.

i) Right click on the website and set the site as the startup project (Set as Startup Project)

j) Right click on the page that was automatically added for you (SomethingTestPage.html) when you added the Silverlight project into the site and set it as the start page (Set as Start Page)

k) Hit F5 and you are all set!

You can now make arbitrary changes to the SomethingTestPage.html page, including renaming it to something meaningful like Default.html.