I have a database where membership information is being controlled by the ASP.NET membership api. I need to access this info from a web service as well. Can I just use the membership classes or is there is some restriction that says these classes can only be used in a page\\aspx kind of scenario?
您可以使用这些类,但需要使用特殊属性标记WebService方法,以启用会话状态 。
[WebMethod(EnableSession=true)]
您可以随时使用Membership API,但我会在很大程度上考虑您是否可以充分保护您的Web服务以免被滥用,并且滥用我的意思是有人进来并捣乱您的Web服务以锁定帐户,猜测用户名和密码,并利用您希望提供的任何其他功能。
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.