
If Silverlight isn't installed at all, the the control fails over to the next control type (flash?) before going back to the old school way of doing things.
This is all fine.
If, on the other hand, the user does have Silverlight installed, but it is some version other than Silverlight 5 then the control complains that the wrong version is installed and does nothing.
Now, in the ideal world the user would just update their version of Silverlight and all would be well with the world. Sadly, the users in question are run by IT departments that are only just coming to terms with the fact that there are browsers other than IE6, so upgrading anything is simply a non-starter.
Is there something we can do that will:
- use the installed version of Silverlight, where that version is correct (Silverlight 5 only, I assume)
- failover to the next available Async upload method where Silverlight is not installed or it is installed but is the wrong version.
I know that I can force the system to believe that Silverlight isn't installed, but I don't want to penalize those users whose IT departments are enlightened enough to have the most recent version installed.
--
Stuart
20 Answers, 1 is accepted

I already have a queue of people right up the food chain chasing me about this, so if anyone has any suggestions, I'd love to hear 'em.
--
Stuart

If you have a version of Silverligh older that 4.0.50826.0 installed then RadAsyncUpload will only offer you the uption to update your version of Silverlight. If you decine then you're stuck.
The following code hides Silverlight from RadAsyncUpload if the installed version is too old.
Telerik.Web.UI.RadAsyncUpload.Modules.Silverlight.isAvailable =
function
()
{
// This code is based on (read: ripped off in a major way) the code from http://www.silverlightversion.com
//try firefox/non-IE version.
var
nav = navigator.plugins[
"Silverlight Plug-In"
];
var
installedVersion;
if
(nav)
{
for
(
var
i = 0; i < 4; i++)
{
installedVersion = nav.description;
}
}
else
{
//try the IE one now.
try
{
var
control =
new
ActiveXObject(
'AgControl.AgControl'
);
//the following would be faster with a binary search, but this is "fast enough" for now.
var
vers = Array(1, 0, 0, 0);
loopMatch(control, vers, 0, 1);
loopMatch(control, vers, 1, 1);
loopMatch(control, vers, 2, 10000);
loopMatch(control, vers, 2, 1000);
loopMatch(control, vers, 2, 100);
loopMatch(control, vers, 2, 10);
loopMatch(control, vers, 2, 1);
loopMatch(control, vers, 3, 1);
installedVersion = vers[0] +
"."
+ vers[1] +
"."
+ vers[2] +
"."
+ vers[3]
}
catch
(e)
{
return
false
;
}
}
if
(installedVersion ==
null
)
{
return
false
;
}
return
installedVersion >=
"4.0.50826"
;
}
function
loopMatch(control, vers, idx, inc)
{
while
(IsSupported(control, vers))
{
vers[idx] += inc;
}
vers[idx] -= inc;
}
function
IsSupported(control, ver)
{
return
control.isVersionSupported(ver[0] +
"."
+ ver[1] +
"."
+ ver[2] +
"."
+ ver[3]);
}
--
Stuart

<script type=
"
text/javascript
"
>
Telerik.Web.UI.RadAsyncUpload.Modules.Silverlight.isAvailable =
function
()
{
//try firefox/non-IE version.
var
nav = navigator.plugins[
"
Silverlight Plug-In
"
];
if
(nav)
{
return
nav.description >=
"
4.0.50826
"
;
}
else
{
try
{
var
control =
new
ActiveXObject(
'AgControl.AgControl'
);
return
control.isVersionSupported(
"
4.0.50826
"
);
}
catch
(e)
{
return
false
;
}
}
}
</script>
--
Stuart
Thank you for you concern with RadControls and sharing your solution with the community.
I have created a Feature Request in our PITS for implementing this issue so you can vote for it and follow its progress here.
Plamen Zdravkov
the Telerik team

Im having similar issues with a machine at work with Windows7 and IE9 (9.0.8112.16421) and Silverlight 4 (4.0.50401.0). The AsynUpload ask for a Silverlight update and I tried choosing "No" to see if it will switch over to Flash or IFrame. Unfortunately, it seems stuck there (nothing opens when clicking the "Select" button). Often, it even make the browser totally crash. I dont see any browser error listed neither. It does that for almost all examples on the demo site (ex: http://demos.telerik.com/aspnet-ajax/asyncupload/examples/overview/defaultcs.aspx).
Do we need to make the switching logic ourselves or it is supposed to be switching by itself internally? By reading the reply comment here from Stuart Hemming and the documentation, it seems it is supposed to be internally. If it's not, any code example for picking the Silverlight/Flash/IFrame option?
TIA
By default RadAsyncUpload is not switching to other upload module when the described message is observed. It is currently logged as a feature request but is not added yet- I have increased its priority. In your case one possible solution would be to turn off the Silverlight as in the code below:
<script type=
"text/javascript"
>
Telerik.Web.UI.RadAsyncUpload.Modules.Silverlight.isAvailable =
function
() {
return
false
; }
</script>
Kind regards,
Plamen
the Telerik team

I cant really use that workaround because most of the users will be able to update (or already be alright with their Silverlight version) and I dont want to penalize them (like the original poster mentioned).
Also, are feature requests different from public issues (whom are of type "Feature request" like the first link Ive provided)? If yes, can we, the public, track them like in the PITS? Please post the link if we can.
I dont understand why the issue has been cancelled because apparently the feature we ask is apparently already existing but you're saying otherwise:
"At the moment, if you have an older version of Silverlight, the system asks you if you want to update it or not. If you answer NO then it should simply disable Silverlight and fail over to another upload method." -Stuart Hemming (Jul 5, 2012)
Or maybe I dont understand correctly that comment. Can you please clarify?
TIA
it seems that the issue is canceled by mistake in the public page that you linked. It is still a feature request and you can vote for it. At the moment we can not commit on any ETA for its implementation but I have raised its priority level. Please excuse us for this misunderstanding and inconvenience.
Plamen
the Telerik team

It seems I managed to vote for the issue but the site still shows "canceled" in its Status. Also, the vote count didnt increased after I voted. Can you please look at this?
Thank you
Martin
Thank you for pointing this unusual behavior to us.
It seems that there is something wrong with this PITS item. We are currently in a process of renewing our tracking system and that is why I decided to create a new tracking item in our new system where you can vote and follow the issue. We will have in mind the previous votes for it as well.
Hope this will be helpful.
Plamen
the Telerik team

Ive added a comment in the new system to minimize confusion. Is it possible to convert the 7 old votes into "likes" votes?
Martin
Thank you for your concern with RadControls.
As I mentioned in my previous reply we will have in mind the previous votes for this issue as well.
Kind regards,
Plamen
the Telerik team

I looked at the new 2013 Q1 version and don't see this issue addressed.
Any news on it?
This is very confusing to users. I know I can turn it off but that seems like an extreme way to go (removing functionaily for all because of a couple users). And that couple users is enough to cause people to tell me to get it fixed.
Thanks,
John S.
Ye indeed unfortunately we were not able to add this issue for the release but we will make our best to include it in the near future. We are already working on it. Please excuse us for this inconvenience once again.
Plamen
the Telerik team

http://feedback.telerik.com/Project/108/Feedback/Details/27537-add-the-ability-to-use-radasyncupload-if-you-answer-no-when-it-asks-you-to-update
TIA
Martin

John S.

Plamen can you explain?
TIA
The item's status was changed by mistake, now it is in approved state. The proposed functionality is logged into out internal system for further implementation.
Regards,
Peter Filipov
Telerik

Straight to the point. The feature is not yet implemented, because we have many tasks with higher priority. Please excuse us for any inconveniences caused.
Regards,
Peter Filipov
Telerik