Reputation: 9679
I have created an silverlight application (i have not selected my application to be hosted from another web application).
Now I created a simple hello world page.
I created virtual directory of my silverlight project in IIS for application hosting.
4. When I browse MainPage.xaml in loaclhost, it is not running.
>>I think I shoul run the .xap file to host my application but I dont know haw??? OR Is it necessary to host a silverlight application from a .aspx page??
Upvotes: 2
Views: 2683
Reputation: 189535
If you haven't created a web host project along with your silverlight application then when you debug the Silverlight application it creates a TestPage.html
file in the bin\debug directory under you project directory.
This page hosts the XAP and is what the IDE specifies as the page to open by the browser instance it creates when you start debugging.
Hence to host this in your IIS 5.1 server you can create a virtual directory pointing at the bin\debug folder in your project. Navigating to TestPage.html in that virtual directory (for example http://localhost/myvirtualdir/testpage.html
) will load your application.
Upvotes: 2
Reputation: 48587
You should have a Default.aspx page which hosts the Silverlight application. Set this to your Default page to see if that works.
Upvotes: 0