473,320 Members | 1,949 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Detecting .NET

Vic
Hello, All.

Is there any way for an ASP.NET page to detect whether a client has .NET
framework installed (preferebly to also determine the version). So, the
resultant application would look something like that:

User clicks a button called "Detect .NET version" on a page1.apsx. The
result is a label that reads "you have .NET version 1.1 installed" or ".NET
framework isn't detected on your PC".

Any hints/links are greatly appreciated.

Thanks.
Vic
Nov 17 '05 #1
4 2187
yes, it's in the user agent, http refer string

you could do a comparison on the string or use a regex to see if it's there

examples
-------------------------------------

version 1:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.0.3705)

both versions:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.0.3705; .NET CLR 1.1.4322)
not there:
Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.4) Gecko/20030624 Netscape/7.1

Mozilla/5.0 (compatible; Konqueror/3.0-rc3; i686 Linux; 20021211)


"Vic" <ro****@gat.com> wrote in message news:Oa*************@TK2MSFTNGP11.phx.gbl...
Hello, All.

Is there any way for an ASP.NET page to detect whether a client has .NET
framework installed (preferebly to also determine the version). So, the
resultant application would look something like that:

User clicks a button called "Detect .NET version" on a page1.apsx. The
result is a label that reads "you have .NET version 1.1 installed" or ".NET
framework isn't detected on your PC".

Any hints/links are greatly appreciated.

Thanks.
Vic

Nov 17 '05 #2
Hello

As Chance stated you can use the user agent header. The easier way is using
Request.Browser.ClrVersion Property. Actually this is the same, method
because .NET detects the ClrVesion by parsing the user agent string. So you
will have .NET parse it instead of using regular expressions.

Best regards
Sherif

"Vic" <ro****@gat.com> wrote in message
news:Oa*************@TK2MSFTNGP11.phx.gbl...
Hello, All.

Is there any way for an ASP.NET page to detect whether a client has .NET
framework installed (preferebly to also determine the version). So, the
resultant application would look something like that:

User clicks a button called "Detect .NET version" on a page1.apsx. The
result is a label that reads "you have .NET version 1.1 installed" or ".NET framework isn't detected on your PC".

Any hints/links are greatly appreciated.

Thanks.
Vic

Nov 17 '05 #3
Vic
Thanks.
Vic

"Sherif ElMetainy" <el*************@wayout.net.NOSPAM> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Hello

As Chance stated you can use the user agent header. The easier way is using Request.Browser.ClrVersion Property. Actually this is the same, method
because .NET detects the ClrVesion by parsing the user agent string. So you will have .NET parse it instead of using regular expressions.

Best regards
Sherif

"Vic" <ro****@gat.com> wrote in message
news:Oa*************@TK2MSFTNGP11.phx.gbl...
Hello, All.

Is there any way for an ASP.NET page to detect whether a client has .NET
framework installed (preferebly to also determine the version). So, the
resultant application would look something like that:

User clicks a button called "Detect .NET version" on a page1.apsx. The
result is a label that reads "you have .NET version 1.1 installed" or

".NET
framework isn't detected on your PC".

Any hints/links are greatly appreciated.

Thanks.
Vic


Nov 17 '05 #4
Vic
Thanks.
Vic

"Chance Hopkins" <ch**********************************@hotmail.co m> wrote in
message news:Ov**************@TK2MSFTNGP12.phx.gbl...
yes, it's in the user agent, http refer string

you could do a comparison on the string or use a regex to see if it's there
examples
-------------------------------------

version 1:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.0.3705)

both versions:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.0.3705; .NET CLR 1.1.4322)

not there:
Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.4) Gecko/20030624 Netscape/7.1
Mozilla/5.0 (compatible; Konqueror/3.0-rc3; i686 Linux; 20021211)


"Vic" <ro****@gat.com> wrote in message

news:Oa*************@TK2MSFTNGP11.phx.gbl...
Hello, All.

Is there any way for an ASP.NET page to detect whether a client has .NET
framework installed (preferebly to also determine the version). So, the
resultant application would look something like that:

User clicks a button called "Detect .NET version" on a page1.apsx. The
result is a label that reads "you have .NET version 1.1 installed" or ".NET framework isn't detected on your PC".

Any hints/links are greatly appreciated.

Thanks.
Vic


Nov 17 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Jole | last post by:
Hi I'm writing a program that needs to read from a file. In order for the program to be robust, it should somehow check that the file isn't corrupt, or stuffed in any way. For example, that...
15
by: Jay | last post by:
I'm sure this is a really dumb question, but how do you detect a variable type in Python? For example, I want to know if the variable "a" is a list of strings or a single string. How do I do...
3
by: raptor | last post by:
hi, how to detect opera..it seems that even opera8 doesnt support xmlhttp fully (.i.e. sendRequestHeader). I ask this 'cause opera seems to mimic IE, at least in the preferences ?! I havent...
9
by: D. Shane Fowlkes | last post by:
I'm using SQL Server 2000 and on my page, I'm simply creating a SQLDataReader and filling in Labels with the retrieved (single) record. However, how can I prevent from getting errors when a field...
3
by: regtrashcan | last post by:
I have a webpage that detects whether Shockwave Player is installed and the version number. The javascript/vbscript that I use has worked fine until the latest release of the Shockwave Player. I am...
79
by: VK | last post by:
I wandering about the common proctice of some UA's producers to spoof the UA string to pretend to be another browser (most often IE). Shouldn't it be considered as a trademark violation of the...
5
by: Z.K. | last post by:
In C#, using the StreamReader, how do I detect when you get to the end of line. I am reading a text file using the Read() function and I need to detect the \n\r, but everything I try does not...
1
by: wwwords | last post by:
Is there a general method for detecting that a user has changed the record currently visible on a form, whether this is by hitting PgUp or PgDn or clicking on a navigation button, even if no change...
15
by: RobG | last post by:
When using createEvent, an eventType parameter must be provided as an argument. This can be one of those specified in DOM 2 or 3 Events, or it might be a proprietary eventType. My problem is...
1
by: davidson1 | last post by:
Hello Friends, I am using HP Laptop.I have a MP3 Player.I used to charge it using my laptop(Windows XP).But Nowadays it is not detecting and charging whenever I connect MP3 Player...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.