I need to determine the clients .NET framework version in my web application. I'm running in partial trust so I can not read the filesystem or registry (Is there an easy way to check .net framework verison using C#?).
System.Environment.Version returns the runtime version, so I can not use that.
I cannot use javascript
The only way I can think of at the moment is to try to load a .NET 3.5 dll and catch an exception, but this does not sound very nice.
Any suggestions?
Update:
Request.Browser.ClrVersion
and Request.Browser.GetClrVersions()
will return the .NET framework version(s) installed on the client.