问题
Is there a difference in the working between the Membership Provider of Webforms and Membership Provider of MVC 3?
回答1:
No.
- The membership provider is part of the
System.Web.Security
namespace - Webforms is the
System.Web.UI
namespace - MVC is the
System.Web.Mvc
namespace
Therefore, there are no dependencies. In other words, you'll be making the same membership calls with the same membership objects in an MVC application as you would in a WebForms application.
回答2:
No, MVC is just a design pattern that Microsoft has utilized. So, you can use membership in all ASP.Net projects.
This is evident even in the namespace: System.Web.Security
来源:https://stackoverflow.com/questions/9028897/difference-between-membership-provider-in-asp-net-webforms-and-mvc-3