简体   繁体   English

在ASP.NET外部使用Microsoft成员资格提供程序

[英]Using Microsoft Membership Provider Outside of ASP.NET

I'm trying to integrate with an already existing user base. 我正在尝试与现有的用户群集成。 They are using the membership providers, but my application is multiplayer for a mobile game. 他们正在使用成员资格提供程序,但是我的应用程序是用于移动游戏的多人游戏。 I guess my question is in two parts. 我想我的问题分为两部分。

Can I use the membership provider classes in a non-asp.net application? 我可以在非asp.net应用程序中使用成员资格提供程序类吗?

And if I can, how do I setup a Web.config file when not in a web application project? 如果可以的话,如果不在Web应用程序项目中,如何设置Web.config文件?

You can definitely use WebSecurity in other places, it is just a class after all. 您绝对可以在其他地方使用WebSecurity,毕竟这只是一门课。 And there is nothing magical about web.config, asp.net is basically taking those attributes inside web.config and feed them to appropriate classes. 对于web.config来说,没有什么神奇的东西,因为asp.net基本上是在web.config中获取这些属性,并将它们提供给适当的类。 Something like WebSecurity.InitializeDatabaseConnection . WebSecurity.InitializeDatabaseConnection类的WebSecurity.InitializeDatabaseConnection So you can just hard code them in or make your own config file to store those info. 因此,您可以对其进行硬编码,也可以制作自己的配置文件来存储这些信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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