如何在Asp.Net Mvc4 Web应用程序中实现登录和注销功能?

问题描述:

我正在ASP.NET MVC4 Web应用程序中工作,我需要帮助来实现登录和注销功能,任何人都可以告诉我我必须在控制器操作方法中写些什么

I am working in ASP.NET MVC4 web application and i need help to implement login and logout functionality please can anyone tell me what i have to write in controller action methods that i have

public ActionResult Login()
{

}

public ActionResult Logout()
 {

}

看看这些有用的链接:
了解和使用ASP.NET MVC 4.0中的简单成员资格提供程序 [ ^ ]

^ ]

使用.NET C#MVC 4创建自定义用户登录表单剃刀 [ ^ ]

Google搜索结果 [ ^ ]

希望对您有所帮助.
Take a look to these useful links:
Understanding and Using Simple Membership Provider in ASP.NET MVC 4.0[^]

SimpleMembership, Membership Providers, Universal Providers and the new ASP.NET 4.5 Web Forms and ASP.NET MVC 4 templates[^]

Creating a custom user login form with .NET C# MVC 4 Razor[^]

Google results[^]

Hope it helps.