ASP.NET authentication cookies not stored when using jQueryMobile on iPad

六眼飞鱼酱① 提交于 2019-12-04 16:15:48

I believe I have the answer. With regard to the iPad, you need to specifically set web.config to force the use of cookies. My authentication setting in web.config now looks like this:

<authentication mode="Forms">
      <forms loginUrl="~/Account/LogOn" timeout="2880" 
             cookieless="UseCookies" 
             />
    </authentication>

It is the cookieless="UseCookies" entry that solved the problem. The default value for this is UseDeviceProfile. It must have been the case that an iPad does not have a consistent UseDeviceProfile regime. On the iPad, sometimes it worked, sometimes it didn't. Don't ask me why. It now seems to be consistently working.

Quincy

I agree with Journeyman, thats what I used. However if they add the website to the Homescreen, then these settings still do not work.

some have asserted they don't store the cookie in that case. see related Q: iPhone/iPad WebApps don't allow cookies?

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!