3

Just bought a cheap defunct hp touchpad. I notice that when I browse to my asp.net web app the url returns session id. The touchpad has cookies enabled and my web.config contains no mention of 'cookieless' which I would have thought would default to "false". IOW This should not be happening. And I have not seen this behavior with any other Browsers I have used on this particular web app.

Is there some other reason that would result in the session id being embedded in the url for this browser?

Edit

Ok i just noticed that, although cookies are enabled for the browser (and visits to 'Browser capability' online sites back this up), ASP.NET's HttpBrowserCapabilities.Cookies is set to false.

crackles
  • 181
  • 1
  • 10
  • I noticed the same issue as well and it's causing my MVC site to generate errors (since the GUID messes up the routing). Also looking for a fix. EDIT: HttpBrowserCapabilities must be false because the machine registries don't have info on the HP TouchPad capabilities, so how do we get ASP.NET to ignore this? – CodeGrue Aug 25 '11 at 18:25
  • Interestingly, HttpBrowserCapabilities returns the browser type as Safari. – crackles Aug 25 '11 at 23:21
  • Yea I just ran into this same issue? Any workarounds? This is on a website I developed so I have full access to the server/code. – tsquillario Aug 30 '11 at 20:13

1 Answers1

2

Sounds like the default ASP.NET browser capabilities detection doesn't handle WebOS browser.

Microsoft has given up updating the browser capabilities actually, but you can have similar functionality from Wireless Universal Resource File (WURFL) project:
http://wurfl.sourceforge.net/dotNet/ (powered with sample code)

The current officially recommended way to make use of this data is through a library called 51Degrees.mobi http://51degrees.codeplex.com/
I say officially recommended as per:
http://www.asp.net/learn/whitepapers/add-mobile-pages-to-your-aspnet-web-forms-mvc-application
which is one of the most complete references for dealing with mobile devices in general, and is part of:
http://www.asp.net/mobile
Check it for more documentation.

There are other alternatives as well like:
http://blog.mobileesp.com/?page_id=53
which gives you general classes of devices. You'd be checking for WebOSTablet instead of cookies support, so, it's helpful more in device specific optimizations than for general capabilities detection.

But you probably want to try the WURFL project API or the 51Degree.mobi API for the detection.

Meligy
  • 35,654
  • 11
  • 85
  • 109