I struggled with this myself for several days.
Using specific IE " document.execCommand('ClearAuthenticationCache');" is not for everyone - a good option: 1) it resets all credentials, which means that the user, for example, will also exit his gmail or any other website on which he is currently authenticated 2 ) only IE;)
I tried using Session.Abandon () and then redirected to my Default.aspx. This alone is not enough. You need to explicitly tell the browser that the request is not allowed. You can do this using something like:
response.StatusCode = 401;
response.Status = "401 Unauthorized";
response.AddHeader("WWW-Authenticate", "BASIC Realm=my application name");
resp.End();
: == > . : escape ( ) , , , , .
- "" . . .
response.StatusCode = 401;
response.Status = "401 Unauthorized";
string realm = "my application name";
response.AddHeader("WWW-Authenticate", string.Format(@"BASIC Realm={0} ({1})", realm, DateTimeUtils.ConvertToUIDateTime(DateTime.Now)));
resp.End();
, , :
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Response.Cache.SetExpires(DateTime.MinValue);
Response.Cache.SetNoStore();
( ) IE, Firefox , escape ( ), (F5) .