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

Bug in ASP.NET (Request.Browser)

I am a .NET Professional and working in web development.
I found a bug (i think so) while using Request.Browser object to identify the browser name and version.
It shows me the correct browser name and version when i request the page from Internet Explorer 6.0. But
when i request the page from Netscape 7.1 it shows me the version as 5.0 and major version as 5 and minor version as 0.

Is it a bug? Please clarify.
Nov 18 '05 #1
3 1425
Hi Ganesh,

You could try and view the HttpHeader "User-Agent" instead to see what the
browser is actually sending to the web server. The easiest way to view this
is to enable page tracing on a .aspx in your application.

Hope this helps,
Michael

--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Ganesh" <Ga****@discussions.microsoft.com> wrote in message
news:E1**********************************@microsof t.com...
I am a .NET Professional and working in web development.
I found a bug (i think so) while using Request.Browser object to identify
the browser name and version.
It shows me the correct browser name and version when i request the page
from Internet Explorer 6.0. But
when i request the page from Netscape 7.1 it shows me the version as 5.0
and major version as 5 and minor version as 0.

Is it a bug? Please clarify.

Nov 18 '05 #2
Sounds like your machine.config could be missing Netscape 7, I've just look
at mine and netscape 7 is not in.

search for "(Gecko/[-\d]+ )?Netscape6/(?'versio"

changing 6 to [6/7] may fixit, this is just a guess, i dont use netscape 7
so i cannot test it.

try a google on netscape 7 machine.config

you will also find that if you output.renderbegintab("DIV") it will render a
TABLE with 0 borders, this is due to the TAGWRITER and can be fixed by
adding tagwriter=System.Web.UI.HtmlTextWriter to the correct section.

Cheers

Steve
"Ganesh" <Ga****@discussions.microsoft.com> wrote in message
news:E1**********************************@microsof t.com...
I am a .NET Professional and working in web development.
I found a bug (i think so) while using Request.Browser object to identify the browser name and version. It shows me the correct browser name and version when i request the page from Internet Explorer 6.0. But when i request the page from Netscape 7.1 it shows me the version as 5.0 and major version as 5 and minor version as 0.
Is it a bug? Please clarify.

Nov 18 '05 #3
Hi Steve Drake,

Many Thanks for your reply. I went through machine.config file in mymachine.
I found a silly mistake done in evaluating the user agent through regular
expression.

<case match="^Mozilla/5\.0 \([^)]*\) (Gecko/[-\d]+
)?Netscape6/(?'version'(?'major'\d+)(?'minor'\.\d+)(?'letters' \w*)).*">

To find the version they mentioned the pattern as "?Netscape6". but the
user agent returns the string which contains the version information as
Netscape/7.1 (ax). So it should have been mentioned as Netscape/ instead of
Netscape6/.

I have changed it and tested and it seems working fine.

Hope microsoft would rectify this in next version.

Regards
T.Ganesh

"Steve Drake" wrote:
Sounds like your machine.config could be missing Netscape 7, I've just look
at mine and netscape 7 is not in.

search for "(Gecko/[-\d]+ )?Netscape6/(?'versio"

changing 6 to [6/7] may fixit, this is just a guess, i dont use netscape 7
so i cannot test it.

try a google on netscape 7 machine.config

you will also find that if you output.renderbegintab("DIV") it will render a
TABLE with 0 borders, this is due to the TAGWRITER and can be fixed by
adding tagwriter=System.Web.UI.HtmlTextWriter to the correct section.

Cheers

Steve
"Ganesh" <Ga****@discussions.microsoft.com> wrote in message
news:E1**********************************@microsof t.com...
I am a .NET Professional and working in web development.
I found a bug (i think so) while using Request.Browser object to identify

the browser name and version.
It shows me the correct browser name and version when i request the page

from Internet Explorer 6.0. But
when i request the page from Netscape 7.1 it shows me the version as 5.0

and major version as 5 and minor version as 0.

Is it a bug? Please clarify.


Nov 18 '05 #4

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

Similar topics

5
by: patrice | last post by:
Is it possible to modify the Request-Line of an HTTP response ? I'd like to remove the parameters from a GET url. More precisely, I wish I could replace : with : The "Header" function...
5
by: Henrik | last post by:
Hi, I am trying to read some industrial webservers using the HTTP/CGI webequest like this: wrs = (HttpWebRequest)WebRequest.Create(HTTP/CGI-string); mwst = (HttpWebResponse wrs.GetResponse();...
7
by: someone | last post by:
Let's say I have a Session timeout of 20 minutes. If the browser periodically request a graphic file, will that keep its Session alive? What keeps the Session alive? Is it the Session cookie that...
2
by: Roger Twomey | last post by:
I have an application that checks for browser, version and active X enabled. It uses the result for a simple if then. The issue I have is that Request.Browser.MajorVersion is returning the...
3
by: Joe Fallon | last post by:
I have a page in ASP.Net 1.1 which contains an image control. I set the ImageUrl property = "MyImageViewerPage.aspx" This page acts as an image handler. I have an array of bytes which I send to...
6
by: Karthik | last post by:
I am trying to read Http request body values NOT form values The content type is text/xml and its POST I am posting data from Infopath to an asp.net page. In ASP it works by just writing...
4
by: customerservice | last post by:
I have been tracking website traffic on my site www.grabbagvideo.com:84 and also https://www.grabbagvideo.com for a few weeks now. I am using the request.browser.crawler property in attempt to...
9
by: balakrishnan.dinesh | last post by:
hi friends, Exactly what i want to know is, In my product we are using xmlhttp request to retrive some data from the server, And Im using IE browser, its working fine in IE. Now i want to work...
4
by: Olivier Matrot | last post by:
Hello, I have a problem with an ASP.NET 2.0 Application. A client request is processed in parrallel by two threads. This ends with the following exception : <Source>System</Source> <StackTrace...
1
by: Olivier Matrot | last post by:
I have a problem with an ASP.NET 2.0 Application. A client request is processed in parrallel by two threads. After further analysis, it appears that : - There is 2 disctinct session for the...
1
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: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.