Reputation: 6846
I am trying to create a "Hello world" application in Silverlight 3.0, but when it runs, there is an error: (IE 8)
Error:
Unhandled Error in Silverlight Application
Code: 2104
Category: InitializeError
Message: Could not download the Silverlight application. Check web server settings
When the project was created I chose to host the Silverlight application in a new web site (ASP.net web application project )
Here is my code:
<UserControl x:Class="Test.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d" d:DesignWidth="640" d:DesignHeight="480">
<Grid x:Name="LayoutRoot">
<TextBlock Text="Hello World!"/>
</Grid>
</UserControl>
I also have tried to run in Firefox, it does not work there either.
Does anybody know how to fix this?
Upvotes: 1
Views: 3548
Reputation: 21
I was getting the same exception and I had the MIME types added correctly. My mistake (a very obvious one) was that I had "allow anonymous access" but I forgot to give the Internet Guest Account (the one that is impersonating for anonymous access) permission to access my applications virtual folder in IIS. So, I just wanted to share my solution, just in case it helps :)
Upvotes: 2
Reputation: 6846
By not hosting it in a new ASP.NET application project, the error did not show.
Upvotes: 1
Reputation: 3036
The MIME types on your webserver are not setup correctly to host your silver light application. The MIME types needed are:
.xaml application/xaml+xml
.xap application/x-silverlight-app
.xbap application/x-ms-xbap
Upvotes: 3
Reputation: 1585
Check url of your SL application file. Looks like its unable to download it.
Upvotes: 0