15

My Silverlight website hangs at 100% loaded. There is no code for it, so far it is just the design in XAML, and it shows up fine in Expression Blend 3. It is the standard "Silverlight Website" project from Blend 3, without any modifications.

When I press F5 to run it, it shows as a 100% loading circle in firefox and never actually shows my app. The loading circle continues to animate as if its doing something.

Note: It worked yesterday, and I havent made very many changes to it since then.

1
  • Sorry for bringing this back from the dead, just saying I had this issue and reinstalling silverlight resolved. May 27, 2015 at 10:56

9 Answers 9

4

I had this problem in browser, out of browser - even when debugging. Using Silverlight 4 beta.

I hit F5 to start debugging and it never even hit a breakpoint for the constructor of App.xaml.cs.

I knew I'd uninstalled an out of browser app and changed some out of browser settings recently but nothing would tell me the actual problem.

I found in the end if I ran in IE (normally I use Chrome) - then an error icon would be shown in the bottom left - as if it were a javascript error.

Webpage error details

Message: Unhandled Error in Silverlight Application 
Code: 2020    
Category: ParserError       
Message: Invalid Property: OutOfBrowserSettings.     
File:      
Line: 47     
Position: 27     

Line: 54
Char: 13
Code: 0
URI: file:///R:/Project/Projece/Bin/Debug/TestPage.html

Well this didn't get me any further - except to tell me something was messed up with OutOfBrowserSettings.

What I ended up doing was creating a new AppManifest.xml. As of Silverlight 4 this is the default AppManifest.xml.

<Deployment xmlns="http://schemas.microsoft.com/client/2007/deployment"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
>
    <Deployment.Parts>
    </Deployment.Parts>
</Deployment>

I disabled 'create app manifest' and reenabled it. After toggling some of the settings back and forth - and even creating AppManifest2.xml I managed to get it working again.

I switched back to my original AppManifest.xml and it worked.

The point being check any message the browser gives you - and then change things that you don't think will make a difference.

Good luck!

3

I figured out the problem after looking at the XAML. On the height property of one of my buttons, there was a line break right before the ending quote. Expression blend didn't mark it as an error, and everything showed up fine in design mode.

When I removed the line break, the loading problem was fixed.

1
  • Can you post your xaml code to into the question, I'm interested in this error.
    – Ekk
    Oct 30, 2011 at 12:33
3

My other answer looks quite convoluted compared to this. This may or may not help in this situation but its worth a try:

In Visual Studio :

  • Click Debug > Exceptions
  • Click 'Find' and search for XAML
  • Click the 'Thrown' button next to System.Windows.Markup.XamlParseException

Start your project in debug mode. Any Xaml exceptions will be shown immediately. Check the inner exception sometimes for further information.

I wasted soooo much time before I finally figured this one out!

1
  • 1
    Thanks. Saved me some time when trying to run a Silverlight control in Chrome.
    – Sardaukar
    Feb 7, 2012 at 13:55
2

Here is the answer: http://www.cnblogs.com/101rico/archive/2012/11/14/2769781.html

You can add this: xmlns:Grid="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data"

1
  • this would help only if you are adding a datagrid with code and not adding references to the page for using a datagrid. Jan 16, 2013 at 15:59
1

This also happens when the Silverlight app requires Silverlight 5, but the user has a lower version installed.

1
  • This happened to me as well. If it's only happening for some users, this seems the most likely cause.
    – maplemale
    Jan 9, 2014 at 18:43
1

An infinite event loop can cause this problem:

private void myComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
    myComboBox.SelectedIndex = 0;
}
1

If it is an elevated trust application, failing to have the necessary registry settings set to allow its launch can cause the dreaded "100% hang":

HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Silverlight

AllowElevatedTrustAppsInBrowser DWORD:=1 AllowLaunchOfElevatedTrustApps DWORD:=1

0

Open Internet Explorer, go to Tools-> Internet Options->Advanced->click Reset on Reset Internet Explorer Settings-> choose Delete Personal Settings->Click reset

0

So my problem was, in a data grid, I had a duplicate column name binding to the same column name. So something in the xaml was crazy messed up. Apparently the control I am using had an "Internal Exception" that was not being thrown up on the screen as an error.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.