Can you use the asp.net membership provider in a windows application?

后端 未结 4 845
花落未央
花落未央 2020-11-27 19:19

The Asp.Net membership provider has some clear uses in a web app. I am thinking about trying to leverage some of the features in a windows application (more specifically WP

相关标签:
4条回答
  • 2020-11-27 19:52

    Yes. Membership, roles and profiles are all features of Visual Studio 2008 Client Application Services (Services tab of a project properties)

    http://msdn.microsoft.com/en-us/library/bb384297.aspx

    http://channel9.msdn.com/posts/DanielMoth/Client-Application-Services-with-Visual-Studio-2008/

    0 讨论(0)
  • 2020-11-27 19:55

    Yes, you can.

    All the configuration can be done within app.config instead web.config of asp.net.

    0 讨论(0)
  • 2020-11-27 20:00

    I have a winform app that talks to DotNetNuke (DNN). DNN uses the Asp.net membership provider, so the source will work for other apps that use that membership provider as well. It's a very simple app, so you should be able to read the source easily.

    http://www.datakido.com/downloads/Token/ViewInfo/ItemId/3

    You should be able to adapt the source to work with WPF.

    0 讨论(0)
  • 2020-11-27 20:00

    Make sure that you are creating a 3.5 application (WPF 4 won't work yet) - Then you must import the reference System.Web. This will allow you to use "using System.Web.Security;" like you normally would in a web app... now you can access stuff such as Membership.CreateUser()

    Your app.config file has to be configured for your provider along with a connection string.

    0 讨论(0)
提交回复
热议问题