views:

254

answers:

2

Hi,
I failed to find a way to disable the browser detection feature added by asp.net 2.0.
I want all the request to my page to be treated as if IE is requesting them.
My fix was to add an App_Browsers folder to my project and in it have the following .browser file:

<browsers>
  <browser refID="Default">
    <capabilities>
      <capability name="preferredRenderingMime" value="text/html" />
      <capability name="preferredRenderingType" value="html32" />
      <capability name="requiresFullyQualifiedRedirectUrl" value="false" />
    </capabilities>
  </browser>
</browsers>

Is there a way to turn this feature off altogether?

Thanks

+1  A: 

One of the more offensive parts of ASP.Net, imho. No way to just turn it off AFAIK, other than config like this.

You may be interested in Rob Eberhardt's pool of resources on the topic.

annakata
Thanks for the link, but it is a bit outdated (at least from the "Page last updated: May 19 2005" at the top...)
Dror
oh sure, but so is asp.net 2.0 :)
annakata
Does this mean you CAN disable this feature in version 3.5?
Dror
not afaik, but my 3.X foo is weak - professionally I'm tied to 2.0
annakata
+1  A: 

You can override the browser detection by setting the ClientTarget property on the page to the choice you would like it to make (probably uplevel in your case)...

Stobor
Thanks, but this will not override the detection - it will just match a different set of configurations...
Dror
Sorry, my mistake. I was answering this portion of your quiestion: "I want all the request to my page to be treated as if IE is requesting them."
Stobor