SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My Silverlight 5 app is hosted in SharePoint Online.

It doesn't load (sticks at 100%) for users who have Silverlight 4 versions.

How should I upgrade those without the latest version to Silverlight 5 fairly seemlessly?

Is there a recommended approach? I guess some Javascript in a hidden Content Editor web part would be possible. Has anybody got the code?


share|improve this question
I've noticed that you have a large number of questions without accepted answers. Please accept answers that helped you to resolve your problem, or post your own and accept. This will help future visitors to the site to easily identify valid answers. – RJ Cuthbertson Feb 10 '13 at 16:12
Hi rjcup. I always try to do this but sometimes I don't get the actual answer. Should I accept the 'best' answer even if it doesn't solve my problem? I will review all my questions when I have a spare hour. Thanks. – finisterre Feb 14 '13 at 11:51
If the "best" answer helped you solve the problem, or got you most of the way there, you should accept it. If there are additional details that you have to contribute you can leave it as a comment on the answer (think: "For future reference, I solved this by tweaking the above answer..."). If it wasn't even close, you're best off to answer your own question and accept that. This is one of those "use your best judgement" instances. – RJ Cuthbertson Feb 14 '13 at 15:26
Also, this might help shed a little light on this:… – RJ Cuthbertson Feb 14 '13 at 15:31

You can check the client version from C# in your app via:

string SLVersion = Environment.Version.ToString();

And then prompt the user to download the newest version if they do not have Silverlight 5.

If you know what in your app is causing the app to get stuck while loading, you can hold off on loading until the version has been validated, and present the user with a message saying the app is not supported if they choose not to upgrade.

Alternatively, you can do this via Javascript using Silverlight.js. The API provides a method Silverlight.isInstalled() that you can use to check for specific installed versions by passing the version number as a parameter, or you can pass null to check for any installed version.

Hope this helps.

share|improve this answer
I don't know what is causing it to get stuck. I never developed in Silverlight prior to V5 so I'm not sure what is new and what isn't. The Javascript solution looks best if I can figure out how to use it. Should I be able to just cut and paste the Javascript into a Content Editor web part or do I need to upload it as a site asset and reference it in HTML? – finisterre Jan 17 '13 at 15:49
Load the javascript, check the version, if the version is what you want it to be, embed the app in the markup. I'm assuming you're using an <object> tag instead of a Silverlight web part. The javascript file should be universally accessible (site asset or layouts folder). – RJ Cuthbertson Jan 17 '13 at 16:04
I don't know if you can programmatically embed an HTML element into a Content Editor part or not. – RJ Cuthbertson Jan 17 '13 at 16:05
I'm not sure I need to do it programatically? Previously I have put Javascript into a Content Editor web part, just by cutting and pasting like: <script type="text/javascript"> function _spSetSLPluginNotLoadedErrorMessage(wpId){ } </script> This has worked OK. I tried this with silverlight.js but it doesn't seen to do anything. – finisterre Jan 17 '13 at 16:22
My app is in A Silverlight web part. – finisterre Jan 17 '13 at 16:24

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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