Question

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.

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top