简体   繁体   中英

How to get the default asp.net membership provider name?

如何从代码(C#)获取默认的asp.net成员资格提供程序名称?

Use Membership.Provider.Name this will return the name used in web.config file

EDIT: Works only in case I've set a defaultProvider in the membership section

您始终可以使用WebConfigurationManager.GetSection访问web.config文件

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM