views:

397

answers:

3

First, some background to my problem.

There are many versions of Internet Explorer 6 and 7 that do not support more than 20 Key-Value pairs in a cookie. I have a list of full versions that do and do not support this. This is fixed in a windows update, but it's not possible for me to force the users of my app to carry out windows update in order to use my app.

We have developed a different cookie jar for versions of Internet Explorer that do not support this, however the performance of this is not optimal, and therefore we need to only use this on versions of IE that require it.

The full version number of an IE browser is in the format 6.00.2900.2180. Everywhere I have found suggests using Request.Browser to find out browser information, but this is far too limited for my needs. To clarify this, MajorVersion returns 6, and MinorVersion returns 0, giving me 6.0 (6.0 is the version of pretty much every version of Internet Explorer 6 that exists). So what I need is the third and fourth parts (or at the very least, the third part) of the full version.

So, does anyone know of a way, in ASP.Net with C#, to find out the information I need? If someone has looked extensively into this and found it to impossible, that is fine as an answer.

A: 

Try grabbing the "User-Agent" request header using Request.Headers

Kentaree
I tried this previously - should have mentioned - the information here is of the formation MSIE 6.0, so this is still limited.
Jimmeh
A: 

Copying this from meandmycode to accept it as answer.

IE doesn't specify the long version number in the user-agent header so you have absolute no chance of detecting this other than sending a 'snoop' page with javascript to detect the complex version number.. but doing something like that is dodge city, and javascript may not be able to find the full version either.

Jimmeh
+1  A: 

You may need to revisit why you're storing so many different key-value pairs. Going low-tech, couldn't you concatenate the values into fewer or maybe even a single key? What sort of values are you storing--in a cookie?

JustinStolle