开发者

Get specific membership provider

开发者 https://www.devze.com 2023-03-21 00:44 出处:网络
Is there a way to obtain a specific membership provider? When you make calls to th开发者_如何学编程e static Membership methods they query whatever provider you have configured as the defaultProvider.

Is there a way to obtain a specific membership provider?

When you make calls to th开发者_如何学编程e static Membership methods they query whatever provider you have configured as the defaultProvider. Is it possible to get a reference to a specific provider that is configured in your web.config and query against only that provider?


Yes, if you have multiple providers configured in your web.config, you can look them up by name.

MembershipProvider membershipProvider = Membership.Providers["foo"];
0

精彩评论

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