Question

I am using a C# Webservice to log a user out. I am using the formsauthentication.signout for the same.

I am passing this webservice call through JQuery. How to I get the user to redirect to login page? I tried the window.location = "login.aspx", it works but if i type in another page in the secure area, it opens up again.

Thanks.

Was it helpful?

Solution

Are you sure that the FormsAuthentication.SignOut() is running? (Debug to make sure it is hit by the web service.)

You should also manually clear out the authentication cookie on the client, in your jQuery handler after a successful call to the web service.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top