Silverlight: Why do I get "Internet Explorer cannot display the webpage"? - silverlight

Sometimes I create a Silverlight project and I get "Internet Explorer cannot display the webpage" when I try and run it. If I keep pressing refresh (usually 2 or 3 times) the page loads ok. Occasionally, I also get the message dialog:
Webpage Error
Line: 56
Error: Unhandled Error in Silverlight Application
Code: 2104
Category: InitializeError
Message: Could not download the Silverlight application. Check web server settings
Other Silverlight projects still work fine. Anyone know what causes this problem with some projects ?

This has worked for me:
Debugging Silverlight applications with IE9 beta

Related

GetTempFileName not working in silverlight out-of-browser

I have a Silverlight application that runs out-of-browser. I was previously able to get the statement Path.GetTempFileName to work when I run out-of-browser but not when running locally. Now this is failing out-of-browser also.
I am getting this error
Message
File operation not permitted. Access to path '' is denied.
I am editing this because I have new information. I have another application which is very similar where I am not getting the problem. That is Path.GetTempFileName works fine. I cannot see any differences between the applications.
I need some hints as to what could be different between the two application. I am running both locally in debug.
Have you checked the Out of Browser settings in the Silverlight Project Properties page? There is a checkbox "Require elevated trust when running out of browser.
On the ShortCut not working. Try uninstalling the app from the Control panel and reinstalling. Then try it again.

Sketchflow builds but does not show in IE

I have a sketchflow application that was building fine. I ran it again and viewed it in IE. It shows the silverlight loading logo which disapears.
What am I doing wrong.
That usually means there is an exception being thrown in your app. There will sometimes be a yellow warning icon in the status bar that can show what happened. Otherwise you can open and run the app in VS to find out what the exception is.

Silverlight Plugin Crashes in Chrome

When using Silverlight 5 in Chrome, if the code opens in a popup window that also contains Silverlight application, then the Silverlight plugin get crashed why?
There is similar bug in MS Connect (not fixed) http://connect.microsoft.com/VisualStudio/feedback/details/726815/silverlight-4-and-5-plugin-crashes

Cannot debug Silverlight application running through VS 2010

I have an start up page called Default.aspx . Have written an javscript function inside the Head tag which opens an other aspx page and closes this page . The other aspx page of mine has silverlight object/ content render on that page . Due to this my debugger doesnt gets attached to the running silverlight application , also when i go to manually attach to the running Silverlight Application it doesnt works , i saw that type of process shown is script / silverlight / x86.
I am doing this all as my login page is only created in silverlight .
Any one have idea how can i get debugger atached.
Edit :
Below link explains the same what i am facing :
Visual Studio Attach to Process - change default automatic code type (Silverlight instead of Script)
To enable Silverlight debugging:
Right click on the Web project hosting the Silverlight application in Solution Explorer
Select "Properties"
Click the "Web" tab
Check the "Silverlight" box in the "Debuggers" section
I had problems debugging Silverlight in Chrome, while in IE it worked like a charm
A very nice utility is the WoVS Default Browser Switcher which can be installed using the Extension Manager (Tools | Extension Manager...)
This tool allows you to set the default browser to be used when debugging your project. In my experience Visual Studio only connects well to IE.
Using the tool I can keep another browser as my default browser but use IE for debugging.
Just use IE as default browser.
It doesn't work properly until you check silver-light debug checkbox and use IE as the others told.
By the way set web application as start-up project.

Silverlight blank browser

I've got a problem with the Silverlight default VS2008 project. Wnen I create a new SL project and choose ASP.NET Web Site web project type all is ok - in my browser I see default template. But when I choose ASP.NET Web application and run it I get blank browser screen with js error: Unhandled Error in Silverlight Application Code: 2104 Category: InitializeError Message: Could not download the Silverlight application. Check web server settings. What's wrong?
Yeah, this happened to me too. It was my MIME types that were not added. You may need to add these to IIS:
.xaml application/xaml+xml
.xap application/x-silverlight-app
.xbap application/x-ms-xbap
Here's a tutorial on how to do so: http://learn.iis.net/page.aspx/262/configuring-iis-for-silverlight-applications/
If this isn't the issue, two other things to check:
Is your project targeting the right
.NET framework (3.5 instead of 2.0)?
Is your start-up projec the ASP.NET
web site project?

Resources