开发者

Using ProviderBase for Membership Provider

Is it possible to simply inherit from ProviderBase to write a MembershipProvider, instead of inhering from System.We开发者_高级运维b.Security.MembershipProvider?

There's just so much junk in the default one, we really want something much, much simpler.


No.

There is no IMembershipProvider interface.

The membership infrastructure requires a class derived from the abstract MembershipProvider class.

Otherwise, how would asp.net know which method to call to, for instance, GetUser?

What you are calling 'junk' are simply abstract methods that define the API.

If you do not want/need to implement a feature, just fill the stub with a NotImplementedException.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜