0

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.

Mponnada
  • 263
  • 5
  • 18
  • Have you seen this: http://stackoverflow.com/questions/199099/how-to-manage-a-redirect-request-after-a-jquery-ajax-call ? – Maksym Gontar Feb 28 '09 at 11:23

1 Answers1

0

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.

Jon Adams
  • 24,464
  • 18
  • 82
  • 120