473,434 Members | 1,462 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,434 software developers and data experts.

Can you capture the OS name of a client pc?

Is there a way to capture the operating system (Mac v. Windows) being used
by a client PC viewing our ASP.NET web site?

Thanks in advance!

Mark
Nov 17 '05 #1
5 1740
e
You can grab this:

Request.ServerVariables("http_user_agent")

And then try your luck parsing out an OS. Not guaranteed to be in there,
nor is it really at all consistant from PC to PC, but it's sometimes in
there somewhere. I think that's as close as you can get from the server
side of things

"Mark" <fi**************@umn.edu> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Is there a way to capture the operating system (Mac v. Windows) being used by a client PC viewing our ASP.NET web site?

Thanks in advance!

Mark

Nov 17 '05 #2
Where do you get all the ServerVariables parameters? A list of all

"Steve C. Orr, MCSD" <St***@Orr.net> wrote in message
news:Oh**************@tk2msftngp13.phx.gbl...
You can parse it from the value returned:

Request.ServerVariables("HTTP_USER_AGENT")

--
I hope this helps,
Steve C. Orr, MCSD
http://Steve.Orr.net
Hire top-notch developers at http://www.able-consulting.com

"Mark" <fi**************@umn.edu> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Is there a way to capture the operating system (Mac v. Windows) being

used
by a client PC viewing our ASP.NET web site?

Thanks in advance!

Mark


Nov 17 '05 #3
Here's a list of ServerVariables for you:
http://www.4guysfromrolla.com/webtech/092298-3.shtml

--
I hope this helps,
Steve C. Orr, MCSD
http://Steve.Orr.net
Hire top-notch developers at http://www.able-consulting.com

"MS News (MS ILM)" <sq**********@hotmail.com> wrote in message
news:ez**************@tk2msftngp13.phx.gbl...
Where do you get all the ServerVariables parameters? A list of all

"Steve C. Orr, MCSD" <St***@Orr.net> wrote in message
news:Oh**************@tk2msftngp13.phx.gbl...
You can parse it from the value returned:

Request.ServerVariables("HTTP_USER_AGENT")

--
I hope this helps,
Steve C. Orr, MCSD
http://Steve.Orr.net
Hire top-notch developers at http://www.able-consulting.com

"Mark" <fi**************@umn.edu> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Is there a way to capture the operating system (Mac v. Windows) being

used
by a client PC viewing our ASP.NET web site?

Thanks in advance!

Mark



Nov 17 '05 #4
Thank you Steve

"Steve C. Orr, MCSD" <St***@Orr.net> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Here's a list of ServerVariables for you:
http://www.4guysfromrolla.com/webtech/092298-3.shtml

--
I hope this helps,
Steve C. Orr, MCSD
http://Steve.Orr.net
Hire top-notch developers at http://www.able-consulting.com

"MS News (MS ILM)" <sq**********@hotmail.com> wrote in message
news:ez**************@tk2msftngp13.phx.gbl...
Where do you get all the ServerVariables parameters? A list of all

"Steve C. Orr, MCSD" <St***@Orr.net> wrote in message
news:Oh**************@tk2msftngp13.phx.gbl...
You can parse it from the value returned:

Request.ServerVariables("HTTP_USER_AGENT")

--
I hope this helps,
Steve C. Orr, MCSD
http://Steve.Orr.net
Hire top-notch developers at http://www.able-consulting.com

"Mark" <fi**************@umn.edu> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
> Is there a way to capture the operating system (Mac v. Windows) being used
> by a client PC viewing our ASP.NET web site?
>
> Thanks in advance!
>
> Mark
>
>



Nov 17 '05 #5
Ken

Thanks

"Ken Cox [Microsoft MVP]" <BA************@sympatico.ca> wrote in message
news:Os**************@TK2MSFTNGP09.phx.gbl...
You can also loop through the collection code and get them. From the
documentations:

Dim loop1, loop2 As Integer
Dim arr1(), arr2() As String
Dim coll As NameValueCollection

' Load ServerVariable collection into NameValueCollection object.
coll=Request.ServerVariables
' Get names of all keys into a string array.
arr1 = coll.AllKeys
For loop1 = 0 To arr1.GetUpperBound(0)
Response.Write("Key: " & arr1(loop1) & "<br>")
arr2 = coll.GetValues(loop1) ' Get all values under this key.
For loop2 = 0 To arr2.GetUpperBound(0)
Response.Write("Value " & CStr(loop2) & ": " & arr2(loop2) & "<br>")
Next loop2
Next loop1

Ken
--
Microsoft MVPs have a question for *you*: Are you patched against the Worm? http://www.microsoft.com/security/se...s/ms03-026.asp

"MS News (MS ILM)" <sq**********@hotmail.com> wrote in message
news:O%****************@TK2MSFTNGP10.phx.gbl...
Thank you Steve

"Steve C. Orr, MCSD" <St***@Orr.net> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Here's a list of ServerVariables for you:
http://www.4guysfromrolla.com/webtech/092298-3.shtml

--
I hope this helps,
Steve C. Orr, MCSD
http://Steve.Orr.net
Hire top-notch developers at http://www.able-consulting.com

"MS News (MS ILM)" <sq**********@hotmail.com> wrote in message
news:ez**************@tk2msftngp13.phx.gbl...
Where do you get all the ServerVariables parameters? A list of all

"Steve C. Orr, MCSD" <St***@Orr.net> wrote in message
news:Oh**************@tk2msftngp13.phx.gbl...
> You can parse it from the value returned:
>
> Request.ServerVariables("HTTP_USER_AGENT")
>
> --
> I hope this helps,
> Steve C. Orr, MCSD
> http://Steve.Orr.net
> Hire top-notch developers at http://www.able-consulting.com
>
>
>
> "Mark" <fi**************@umn.edu> wrote in message
> news:%2****************@TK2MSFTNGP09.phx.gbl...
> > Is there a way to capture the operating system (Mac v. Windows) being > used
> > by a client PC viewing our ASP.NET web site?
> >
> > Thanks in advance!
> >
> > Mark
> >
> >
>
>



Nov 17 '05 #6

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

Similar topics

8
by: George Hester | last post by:
When the address bar is highligted? That is nothing on the page is selected. The address bar is selected. Capture keydown or keypress? Any ideas using javascript? Thanks. -- George Hester...
1
by: Jim Quast | last post by:
I have an ASP page and a CREGReports002.vbs file coded to export data to excel. I do this by building variables in a stored procedure. The ASP page has text boxes, list boxes, and radio buttons. ...
2
by: dumbledad | last post by:
Hi All, I'm using ASP.Net web services to provide the logic required for a Flash based prototype. The Flash and the ASP .Net run together on the client machine. One of the functions I'd like to...
4
by: Rich Halliwell | last post by:
I have a script that catches javascript errors and sends them through ajax to a specified file through the POST proticol. I want to write an ASP file which can read this xml file and act on its...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.