[Webinar] Streamline your web hosting managementRegister Today

x
?
Solved

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

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

Cheers


0
Comment
Question by:Cognize
  • 3
  • 2
6 Comments
 
LVL 2

Assisted Solution

by:Shodan82
Shodan82 earned 1200 total points
ID: 24179720
0
 
LVL 2

Author Comment

by:Cognize
ID: 24180886
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?
0
 
LVL 2

Accepted Solution

by:
Shodan82 earned 1200 total points
ID: 24182531
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.
Silverlight.isInstalled("1.0");

Open in new window

0
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
LVL 2

Assisted Solution

by:doctorgu
doctorgu earned 800 total points
ID: 24191116
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.

0
 
LVL 2

Author Comment

by:Cognize
ID: 24347598
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 ! :(


0
 
LVL 2

Author Closing Comment

by:Cognize
ID: 31571976
Thanks
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As more and more people are shifting to the latest .Net frameworks, the windows presentation framework is gaining importance by the day. Many people are now turning to WPF controls to provide a rich user experience. I have been using WPF controls fo…
With most software applications trying to cater to multiple user needs nowadays, the focus is to make them as configurable as possible. For e.g., when creating Silverlight applications which will connect to WCF services, the service end point usuall…
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. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
There may be issues when you are trying to access Outlook or send & receive emails or due to Outlook crash which leads to corrupt or damaged PST file. To eliminate the corruption from your PST file, you need to repair the corrupt Outlook PST file. U…

591 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