<p>I am developing an ASP.NET mobile website using .NET 3.5 and mobile controls that come with the framework. I have a login form where the system will authenticate the user so he/she can access certain restricted pages. </p>

<p>In a standard ASP.NET website, I can use a session to store some flag after a user had logined, but I wonder can I do the same for the mobile version? Is session variable (or cookies) being support by those mobile device's browser? Is there any standard pratice also on doing authentication for mobile pages?</p>

[{'answer_id': 81549, 'author': 'Davide Vosti', 'author_id': 1812, 'author_profile': 'https://Stackoverflow.com/users/1812', 'pm_score': 1, 'selected': False, 'text': "<p>Session variables are stored in the server so you can forget the device browser capabilities.</p>\n\n<p>I've not practice developing for mobile device, but 4 years ago I was using a service that used cookie authentication and the phone was not top-notch so... I think you can take for granted the cookie availability. Full futured browsers for mobile are taking on so... invest in the future, don't spend energy with old techologies soon to be deprecated...</p>\n\n<p>In my opinion, prefer cookie authentication, it's more standard, and you can save the cookie on the phone preventing further authentications....</p>\n"}, {'answer_id': 94301, 'author': 'Shane Breatnach', 'author_id': 10264, 'author_profile': 'https://Stackoverflow.com/users/10264', 'pm_score': 0, 'selected': False, 'text': '<p><p>You can indeed support cookie authentication but the only guaranteed way for it to work is to attach the cookie ID as part of the URL i.e. cookieless sessions. Yes, this is bad practice as it\'s ugly and very insecure and all modern phones support cookies.</p> <p>But some devices have cookie limitations and, what\'s more, some networks strip all cookie information from the HTTP headers that pass through their gateways even though the phone has no problems (NTT DoCoMo do this in Japan). It may not apply in your situation but it\'s something to keep in mind.</p></p>\n\n<p>Lucky for you ASP.NET does support cookieless sessions easily. In the app.config file:</p>\n\n<pre><code>&lt;sessionState cookieless="true" /&gt;\n</code></pre>\n\n<p>does the trick.</p>\n'}]
['https://Stackoverflow.com/questions/81472', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/14790/']