Wrox Programmer Forums
|
ASP.NET 4 General Discussion For ASP.NET 4 discussions not relating to a specific Wrox book
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 4 General Discussion section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 4th, 2014, 02:24 PM
Authorized User
 
Join Date: Jan 2014
Posts: 10
Thanks: 2
Thanked 0 Times in 0 Posts
Default Perplexing issue

Hey everyone,

Just wondering if someone might have some insight into what could be causing this issue...

I am trying to retrieve request.servervariables("HTTP_USER_AGENT") and store it in a string for later use & comparison in my asp.net 4.0 web application.

Most places seem to work, but GoogleBot keeps coming up with the user agent being just the string "Mozilla" - and this is not valid. It should be a lot longer than that, and the old ASP classic code hanging around is actually seeing the correct user agent, through use of the same servervariable ...

Why is .NET not seeing it? I've also just tried setting it to Request.UserAgent - same result... only for GoogleBot though.

Makes me really wonder...
 
Old June 11th, 2014, 11:05 PM
Friend of Wrox
 
Join Date: Feb 2014
Posts: 136
Thanks: 1
Thanked 10 Times in 10 Posts
Default

Do you know for certain for other languages that it is not the same, have you enable tracing for HTTP requests to look at header and server variables. The user agent can be what ever the the client wants to set it as, it is typically a strategy of bots to try and fool site that look for them by setting the user agent to various things.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Not sure Excel issue or Batch file issue - Application.Workbooks("Book2.xls").Close justinferns Excel VBA 3 October 4th, 2011 03:09 PM
Com issue(really urgent) balesh.mind ASP.NET 2.0 Professional 2 May 14th, 2008 03:35 AM
Help Please with Template issue ckroon Dreamweaver (all versions) 2 August 12th, 2005 09:18 PM
Another issue islandtiu BOOK: Beginning ASP 3.0 1 February 14th, 2005 11:49 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.