开发者

How to validate if a user has logged in website in ASP.NET MVC2?

I have a table in database called Cus开发者_开发问答tomer, I want to enable them to log in website? Is there any good practice to suggest? Thanks!


Enable forms authentication in web.config.

Create a login page, and in login method, validate the user. Use FormsAuthentication class to set the authentication cookie.

Here is a write up for the forms authentication

If you create an asp.net mvc site project in visual studio, you will see an implementation of authentication.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜