In order to run our WPF xbap application, we need to make sure our clients machines have .NET 4.5 on them. There was a big bug fix in 4.5 that corrected a threading bug that was in the 4.0 E version.
we are doing a check for the client versions using javascript.
With 4.5 RC installed, the useragent string is still reporting just 4.0E. We need to be able to tell if 4.5 is installed so if it is we can let the user run the app without getting the notice to update. Can this be done? Will 4.5 create the proper string for the useragent call?
Thanks
Harold
Never rely on the User-agent string to tell you anything – the best way to test if something is present is to actually use it.
I suggest you modify your XBAP to look at what version of .NET it’s running on. If it detects anything below 4.5 then it should display a message to the user and not continue.
If you don’t want to modify your XBAP you could try a “Dotnetlet” (a .NET equivalent of a Java Applet) which is a WinForms UserControl hosted in an
<object>element in an IE webpage (it obviously won’t work in any other browser). You could do the .NET version test in there.