when asp.net site browsed mobile device formsauthentication.cookiessupported property returns false without obvious reason. example, open asp.net login page in mobile safari , formsauthentication.cookiessupported true. after period of inactivity refresh page , formsauthentication.cookiessupported false. @ moment open same page in mobile chrome or dolphin , cookiessupported false in of them well. restart iis , in cases leads cookiessupported being true again, it's still false, in browsers. again, after time may become true. cookies support on in browser configurations.
in cases when cookiessupported false , call formsauthentication.setauthcookie function, asp.net uses uri authentication ticket. can live that, changed uri causes problem. problem webresource.axd stops working. asp:linkbutton, when rendered, calls webform_dopostbackwithoptions not defined in cases when auth cookie added uri.
so basically, have 2 questions:
why formsauthentication.cookiessupported intermittently return false mobile browsers (safari, chrome, dolphin) , how can fixed?
why webresource.axd stop working when authentication cookie inserted uri?
this seems problem relating browser capability in asp.net. uses user-agent string identify browser , matches determine capabilities. framework lacks enough information ios , other newer mobile based browsers. think has been fixed asp.net v4.5.
meanwhile can use workaround tell asp.net every (generic) browser supports cookies:
add special folder in project "app_browsers". within folder create file named "generic.browser". paste following text in file:
<browsers> <browser refid="mozilla"> <capabilities> <capability name="xml" value="true" /> <capability name="cookies" value="true" /> </capabilities> </browser> </browsers>
Comments
Post a Comment