views:

68

answers:

2

Hi,

I'm developing a small web application using Microsoft Silverlight 3. I'm using Microsoft Expressin Blend 3 for UI development and Visual Studio 2008 for "code-behind". When debugging the project from Blen 3, it all works well. The Silverlight is automatically embedded into an TestPage and loaded from

http://localhost/TestPage.html

However, when starting the debugger from Visual Studio 2008, the silverlight app is automatically embedded in a TestPage.html, but know loaded from file:// , as in:

file:///C:/Documents%20and%20Settings/JadaJada/My%20Documents/Expression/Blend%203/Projects/JadaJada/JadaJada/Bin/Debug/TestPage.html

And as a result, the application does not work (which might be because the app makes a few HTTP requests to http://localhost/ using a WebClient).

Do anyone know how to make Visual Studio load the TestPage.html from http://localhost/ instead of file:///C:/JadaJada/ ?

Thankful for any help!

A: 

IN VS... Try right click web site and select property pages. Then select start options tab Then pick start url and enter the url you require

MikeG
A: 

Solved by adding an ASP.NET Web Application project project to my silverlight solution. Then by going into the properties of my new ASP.NET Web Application project and then going to the Silverlight Applications tab and adding my Silverlight app to this project. Then I choose the TestPage.aspx in solution explorer and then start debugging. It worked!

So the steps:

  1. Add a ASP.NET Web Application project to your Silverlight application solution.
  2. Go into the properties of your new project.
  3. Go to the Silverlight Applications tab.
  4. Add you Silverlight project.
  5. Select the TestPage.aspx and hit Start debug (F5).

That should do it.

Clean