HTTP_USER_AGENT too long for asp.net 1.1??

  • Thread starter Thread starter bitbucket
  • Start date Start date
B

bitbucket

hi:

i have an asp.net 1.1 app. when i visit the site with my normal browser (ie7
on xp), i get 'default' info in the request.browser object (Type = Unknown,
Name = Unknown, Version = 0.0, etc.). when i visit with firefox or safari,
the results come back as expected. i've also used 'fiddler' to set my user
agent string to ie7 and 8 and, here also, success.

as far as i can guess, it seems that my user agent string gets 'choked' upon
somewhere in the process and either none of the <filters> in the browserCaps
match or none of them even run. i don't get any exceptions and i've browsed
thru the event logs, but found no clues.

the only thing about my ua string that jumps out at me is its sheer enormity:

Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.0.3705; .NET
CLR 1.1.4322; Media Center PC 4.0; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30;
..NET CLR 3.0.04506.648; InfoPath.2; .NET CLR 3.5.21022;
OfficeLiveConnector.1.1; MS-RTC LM 8; .NET CLR 3.0.4506.2152; .NET CLR
3.5.30729)

is there something wrong with my IE?
if .net 1.1 *should* be handling this size of ua string, is there a bug?

thanx for any assistance...!
 
iis has settings (and some proxies) to limit the length. check the agent
string in the request to see if its been truncated. the browsercap
depends on seeing the trailing ")". you could modify your browsercap
file to not require this.

in general its not a good idea to use browsercaps anyway, as it pretty
unreliable. you should use client script, css and markup to get browser
friendly html. see any site on cross browser markup.

-- bruce (sqlwork.com)
 
thanx for your reply, bruce.

i'm not sure what you mean by, "check the agent string in the request ." in
my original post the ua string i showed was from request("HTTP_USER_AGENT") -
i've compared it to request.useragent and they are identical, as one would
expect. were you referring to some other chunk of data? and what would i
compare it to to see if it's truncated?

thanx...
 
Back
Top