javascript - Automatically log out users when tab is closed using asp.net forms authentication -
i have simple web form uses forms authentication. implement authentication, have in web.config <system.web> <authentication mode="forms"> <forms loginurl="logon.aspx" name=".aspxformsauth"></forms> </authentication> <authorization> <deny users="?"/> </authorization> </system.web> and in codebehind on logon.aspx use let them form if credentials work: formsauthentication.redirectfromloginpage(formid, false); formid identifier either generated on logon page new form, or entered user continue existing form. when complete form or click button start new form use send them logon page: formsauthentication.signout(); the issue i'm worried users might lose track of formid they're working on, , fill out information wrong id (it displayed on form them, might ignore it). want automatically sign them out whenever refresh page, close tab, or close b...