Persisting cookie for iPhone UIwebview mobile web app

☆樱花仙子☆ 提交于 2019-12-12 01:07:42

问题


I'm using MVC4 forms auth. My mobile web app runs in full screen UIwebview on iphone. I have a home screen icon for my mobile web app. The app needs to launch external links. Those launch in Safari, which works fine. However returning to the mobile web app by clicking again on the home screen icon, seems to have logged the user out. Ideally I want the user to remain logged into the web app after viewing the external links in Safari. Maybe the cookie got deleted? Can I persist the cookie?


回答1:


FormsAuthentication.SetAuthCookie(username, createPersistentCookie: true);

This fixes the log out issue



来源:https://stackoverflow.com/questions/12095228/persisting-cookie-for-iphone-uiwebview-mobile-web-app

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