使用 ASP.NET Web 应用程序中的 DNN 配置文件/用户对象
有没有办法利用 DNN 组件在标准 ASP.NET 应用程序中创建用户并设置其配置文件属性?我能够毫无问题地访问此基本 ASP.NET 会员数据库,但无法使用 DNN.Entities.Users.* 我无法真正创建用户并设置/获取其配置文件属性。
Is there any way to leverage the DNN components for creating users and setting their profile properties from within a standard ASP.NET application? I am able to access this base ASP.NET Membership database without issue, but without being able to use DNN.Entities.Users.* I cannot truly create users and set/get their profile properties.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我从来没有做过,但我确信它可以做到,而且可能并不那么难。本质上,您需要一个在 DNN 之外运行的会员提供商。您甚至可能只需调用现有成员资格提供程序上的方法即可。我首先回顾一下 ASPNetMembership 提供程序的源代码。
http://dotnetnuke.codeplex.com/SourceControl/list/changesets
提供程序位于\Library\Providers\MembershipProviders\AspNetMembershipProvider。
I've never done it, but I am sure it can be done, and it's probably not that hard. Essentially you want a membership provider that runs outside of DNN. You might even get away with simply calling methods on the existing membership provider. I would start by reviewing the source of the ASPNetMembership provider.
http://dotnetnuke.codeplex.com/SourceControl/list/changesets
The provider is at \Library\Providers\MembershipProviders\AspNetMembershipProvider.
我假设您可以使用适当的连接字符串设置 web.config 并将 DotNetNuke dll 包含在 bin 目录中并尝试一下;) 可能需要包含一些其他依赖的 DLL 并解决一些错误消息。
但从理论上讲,我认为你最终可以通过这条路线到达那里。
I would assume that you could setup your web.config with the appropriate connection strings and include the DotNetNuke dll in your bin directory and have a shot ;) Might need to include some other dependent DLL's and work through a couple error messages.
But in theory I think you could eventually get there going with this route.