.netinternet-explorerversion-detection

Detect .net framework version AND REVISION from Internet Explorer


I know we can detect the major version and SP version from user-agent string.

However, I need to distinguish between Revisions as well, i.e.

2.0 RTM (x86)   2.0.50727.42  
2.0 RTM (Vista) 2.0.50727.312  
2.0 (KB928365)  2.0.50727.832  

are different to me, and they get reported in user-agent like this: Mozilla/5.0 (compatible; MSIE 7.0; Windows NT 6.0; WOW64; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.0.04506; .NET CLR 3.5.30707; InfoPath.1; el-GR)

( http://en.wikipedia.org/wiki/List_of_.NET_Framework_versions )

Any method is acceptable (Silverlight, Flash, Java etc.), as long as it does not require user interaction.

Update: Almost there... Signed .NET ActiveX works on Medium security level (i.e. in Intranet), does not work in Internet setting.

Hosting Windows Forms in IE seems to work the same way. If only I can find how to specify that i don't need high trust to work...


Solution

  • It's trivial to create a browser applet in .NET. There might be a few security settings in the way, but since you said that any method is acceptable, this should work as well. From there you've got a fully working .NET app embedded in the browser. Just detect the version like you normally would.

    Added: I think you could also somehow specify that you don't need full trust, which would ease the security problems.