.net iis7 website cookies stop working overnight -
i have .net 4, umbraco 4.7, website running on iis7.
the website uses cookies track referrers website. these cookies work period of time, stop working after many hours. cookies stop beingness picked .net.
bumping web.config or recycling application pool re-enables picking of cookie's.
here code used check cookies , set cookie.
if (httpcontext.current.request.cookies["partner"] == null) { httpcontext.current.response.cookies["partner"]["partnerid"] = this.partnername;
please help ideas or suggestions causing behavior.
cheers,
paul
try setting domain explicitly in web.config. content should changed from:
<authentication mode="forms"> <forms name="yourauthcookie" loginurl="login.aspx" protection="all" path="/" /> </authentication>
... more ...
<authentication mode="forms"> <forms name="yourauthcookie" domain="stackoverflow.com" loginurl="login.aspx" protection="all" path="/" /> </authentication>
note: recommmended not utilize www prefix (www.stackoverflow.com) because if do, different cookie given users visiting http://stackoverflow.com compared visiting on http://www.stackoverflow.com
.net cookies iis-7 umbraco
No comments:
Post a Comment