0

Is it possible to check via web site if end use has installed .NET Framework4 Client ? It's desirable if this way doesn't use any plugins (flash or silverlight).

6
  • 1
    Why do you need to check if the client has .NET 4 in order to run a non Flash/Silverlight website? All the code is run on the server, the client just has to render the HTML which is independent of .NET. Commented Feb 28, 2012 at 15:38
  • I may have misunderstood your question - however it would help your question if you explained what you want to do, what you've tried and what's not working. Commented Feb 28, 2012 at 15:47
  • I just have a task to check it. Commented Feb 28, 2012 at 15:48
  • You can't get this sort of access to a client machine without running some code locally. If you explained why you want to do this someone might be able to help you. Commented Feb 28, 2012 at 15:49
  • I've already said that it's just my task TO CHECK IT. And nothing more. Commented Feb 28, 2012 at 15:51

1 Answer 1

2

From the server side, the best you can do is sniff the user agent that is sent with the request to the website. In it you'll usually see something along the lines of:

.NET <version number>

Or something to that effect.

Of course, there are major drawbacks to this (as there is with any user agent detection) which warrant not doing this:

  • The user agent can be spoofed
  • Parsing strings that are not structured is generally error-prone
  • Not all browsers (i.e. non-IE browsers) are obligated to send this information

That said, ChrisF's comment asking why is somewhat relevant, in the sense that you are better off having code execute on the client side to detect this, as there are more definitive ways (checking the registry) of determining if .NET 4.0 is installed on the client, using mechanisms that you just don't have available to you from the server side.

The thing is, if the code is served up from the server side, then it will probably be sandboxed in some way, and you'll have to figure out a way to access the registry (which is typically restricted in most sandboxes for code downloaded from the web).

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.