How to check for silverlight browser capability - preferably server side?

Posted on 2009-04-19
Last Modified: 2013-11-12
I need to know how to check for silverlight browser capability - preferably server side?


Question by:Cognize
    LVL 2

    Assisted Solution

    LVL 2

    Author Comment

    Thanks for your answer.

    I tried checking Silverlight.available, but I get a JavaScript error - says that "Silverlight" is not defined, however, the rest of the silverlight specific code on the page works fine.

    Have you ever come across this?
    LVL 2

    Accepted Solution

    Looks like Silverlight.available is old, try the following instead, it'll check if version 1.0 is installed which will return true if you have Silverlight installed.

    Open in new window

    LVL 2

    Assisted Solution

    I searched many times for server side checking like you. Finally I found there's no server side checking.
    Server side checking in Requeser.ServerVariables["HTTP_USER_AGENT"] or Requeser.ServerVariables["HTTP_ACCEPT"] is varied by browser.
    You can confirm with IE, but not FF.

    So you have to include "Silverlight.js" javascript and use Silverlight.isInstalled like
    if (Silverlight.isInstalled("2.0"))

    "Silverlight.js" automatically created whenever creating Silverlight Web project in VS2008.

    LVL 2

    Author Comment

    Thanks for all your comments guys.

    I've ended up using the client side check, and then using Ajax to get the data back to my database.

    I've been logging the info for a couple of days now. So far only 29% of page views have reported that Silverlight is installed. Info on the web suggested that it was 50% back during the Beijing Olympics (where it was used for the media player on the official site).

    It's a shame for two reasons. 1 because silverlight is a brilliant technology, and integrates so well with .NET, and 2 because I spent ages slaving over this control I made ! :(

    LVL 2

    Author Closing Comment


    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    This article shows how to make a Windows 7 gadget that extends its U/I with a flyout panel -- a window that pops out next to the gadget.  The example gadget shows several additional techniques:  How to automatically resize a gadget or flyout panel t…
    In this article, I will show how to use the Ribbon IDs Tool Window to assign the built-in Office icons to a ribbon button.  This tool will help us to find the OfficeImageId that corresponds to our desired built-in Office icon. The tool is part of…
    This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA.…
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now