asp.net - form authentication - how to clear session with formsauthenication.signout -



asp.net - form authentication - how to clear session with formsauthenication.signout -

i have

<system.webserver> <modules> <add name="formsauthenticationmodule" type="system.web.security.formsauthenticationmodule" /> <remove name="urlauthorization" /> <add name="urlauthorization" type="system.web.security.urlauthorizationmodule" /> <remove name="defaultauthentication" /> <add name="defaultauthentication" type="system.web.security.defaultauthenticationmodule" /> </modules> </system.webserver> <authentication mode="forms"> <forms loginurl="login.aspx" name=".test" timeout="15"> </forms> </authentication> <authorization> <deny users="?"/> </authorization> <location path="images"> <system.web> <authorization> <deny users ="?" /> </authorization> </system.web>

and in images folder have web.config with

<?xml version="1.0"?> <configuration> <system.web> <authorization> <deny users="?"/> </authorization> </system.web> </configuration>

in iis authentication set form authentication , annoynomous user can login page. working correctly if haven't logged in , seek browse images folder. 1 time logged in, allow browse images folder. when logged out, doesn't delete session , still allow browse images folder. code below should have killed sessions apparently doens't so. please allow me know if miss something. give thanks

formsauthentication.signout() session.removeall() session.abandon() each key string in request.cookies.allkeys dim cookie new httpcookie(key) cookie.expires = datetime.utcnow.adddays(-7) response.cookies.add(cookie) next formsauthentication.redirecttologinpage()

asp.net

Comments

Popular posts from this blog

maven fortify plugin : Unable to load build session with ID XXXXX .. See log file for more details -

c# - Primavera WebServices does not return any data -

android - Display emoji panel with genymotion - keyboard/touch input? -