简体   繁体   中英

can silverlight detect which version of .NET framework installed on client machine?

Silverlight 3或Silverlight 4是否可以在不处于OOB模式的情况下检测客户端计算机上安装的.NET Framework版本?

当然,只需查看user-agent标头

Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; InfoPath.1; .NET CLR 2.0.50727; .NET CLR 3.0.04425.00).

I don't know if you can test through silverlight, but you can't count on useragent because you may not find the .net version in the user-agent string. You shall develop an ActiveX component, or an unmanaged app (C++, Delphi, VB6) to detect the installed version (or the version you require), then start downloading your app.

I'm developing an app in which I needed to provide the same functionality as you. So I'm testing through the useragent first (if the user has .NET just download the app). If the .NET is not present in the useragent, then the user download the unmanaged app to test .NET (if there's no .NET 4 installed, it refers you to the download URL).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM