user agent return on a local machine

  • Thread starter Thread starter Brian Henry
  • Start date Start date
B

Brian Henry

is there a reason why when doing Request.ServerVariables("USER_AGENT") on
the same machine that is the server (using for development) that it would
return a null string? It's not returning anything, which seems wierd...
 
Brian said:
is there a reason why when doing
Request.ServerVariables("USER_AGENT") on the same machine that is the
server (using for development) that it would return a null string?
It's not returning anything, which seems wierd...

Brian,
Rather then using the Rquest.ServerVariables, try using Request.Browser.
e.g.
HttpBrowserCapabilities hbc = Request.Browser;
bool doesActiveX = hbc.ActiveXControls;

For more information, see:
http://msdn.microsoft.com/library/e...ystemwebhttpbrowsercapabilitiesclasstopic.asp

--

Thanks,
Carl Prothman
Microsoft ASP.NET MVP

Hire top-notch developers at
http://www.able-consulting.com
 
Back
Top