开发者

ASP.NET MVC and ASP.NET membership template provider

In a standard ASP.NET MVC template application that is created by default in Visual Studio when starting a new ASP.NET MVC application there is already a built-in membership / authentication / authorization system.

Using web search one can find lots of info about how to work with a built-in ASP.NET membership system, but very often this material is a bit of an old and refer to ASP.NET only, not mentioning ASP.NET MVC f开发者_StackOverflow社区ramework.

Just for example: http://msdn.microsoft.com/en-us/library/ms998347.aspx#paght000022%5Fmembershipapis or https://web.archive.org/web/20210304121422/https://www.4guysfromrolla.com/articles/091207-1.aspx

To what extent all that applies to ASP.NET built-in membership system applies also to ASP.NET MVC ready template membership system?


As Franci points out, ASP.NET MVC uses the same provider models as ASP.NET for Membership, Roles and Profiles, but as it doesn't really use the Server Control model, you'll find that you need to write the controls yourself (or use the examples in the /Views/Account folder and the the AccountController).

In terms of tutorials for it, a good place to start would be the Learn MVC section of the ASP.NET site, especially:

Authenticating Users with Forms Authentication

Where you'll see that the examples for creating and administering users and roles are identical as those for ASP.NET.


The MVC template uses the standard ASP.NET membership service.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜