An application under IIS6 on a Win 2003 server uses BROWSCAP.INI to detect browser and version, but it hasn't yet been updated to detect IE 9, so the code checking for browser and vesion can't find anything and presents an error message to the user that they need IE 4 or greater. I have been unable to find the information on MSDN or in a web search.

I did manage to find an entry on the IIS blog that said IIS7 detects both IE8 and IE9 just fine, but darn it we're still running IIS6.

Does anyone have or know where I can find the code for the BROWSCAP.INI that enables detection of IE9?

Edited to add: incidentally, I made what seemed would be the obvious additions to the text of BROWSCAP.INI (e.g. adding a node that reads:

[IE 9.0]

... and this doesn't make any difference.

Edited further to add:

What is running on the web server in question is a classic ASP script in VBScript that uses the MSWC component to retrieve from IIS information on which browser the user is using. When the user's browser "hits" the server up for a file, it passes along this information to IIS via the "HTTP_USER_AGENT" string. IIS parses out the relevant information using its browscap.dll component and the browscap.ini file to do so.

Some sample code:

set objBrowserType = Server.CreateObject("MSWC.BrowserType")

MSWC.BrowserType passes an object with a number of properties, including the identity of the browser and its version, as well as other properties such as whether it understands javascript, and so on. The problem is, it is not detecting IE 9 properly and this seems most likely to be because the browscap.ini file doesn't contain the relevant information required to help it do so.

  • It's hard for anybody to help if you do not tell us what the app is that uses the browscap.ini file. I don't think that this is at all any sort of windows standard file. – mdpc Nov 15 '11 at 22:24
  • BROWSCAP.INI isn't any sort of windows standard file? You've got to be kidding. It is IIS itself that uses the BROWSCAP.INI file to help parse out what browser the user has come in with. Check support.microsoft.com/kb/311227 that describes the use of the file with IE 6. Check any windows web server for the file, which at least in Win2003 and below is found in c:\windows\system32\inetsrv – Cyberherbalist Nov 15 '11 at 22:28
  • Sorry, I am not running IIS and did an complete scan for the file on my system. – mdpc Nov 15 '11 at 22:30
  • No problem @mdpc. The file in question would generally only be found on windows web servers running a version of IIS. It's part of the installation process for IIS. – Cyberherbalist Nov 15 '11 at 22:34
  • 1
    Have you tried this guy? browsers.garykeith.com/home – Rob Moir Nov 15 '11 at 22:54

There's a fairly good website that maintains up to date browscap.ini files here.

It's also worth mentioning for anyone else searching for this kind of thing that they supply data to drupal and are referenced by the people running the php project.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.