To correctly answer your question, I need to know how you protect your "secure" pages.
I suspect that there is something wrong with you.
A simple call to FormsAuthentication.SignOut() should be sufficient, since it clears the authentication cookie, thereby making other calls to methods that you make redundant there.
With ASP.NET MVC, you must use AuthorizeAttribute in the action method to prevent unauthenticated users from using it. (Meaning: The old way you did this using web forms by specifying location tags in Web.config no longer works with MVC .)
For example, here is a small piece of code from my ForumController class:
public class ForumController : Controller { ... [Authorize] public ActionResult CreateReply(int topicId) { ... } ... }
source share