Hi
As far as I know, it's not possible to clear/change Windows credentials in .NET code. That is due to setting of IIS & IE. What we can do is to send a 401 HTTP status code and ask the client to re-input the user credential:
string strUser = User.Identity.Name;
if (strUser.Contains("olduser"))
{
Response.StatusCode = 401;
}
else
{
…
}