Use Membership API in WinForms Application

G

Graham

Hi All

I'm developing an ASP.NET 2.0 application that uses the new membership
features, however I also need to develop a WinForms application that manages
users when they have registered. This management revolves around linking
users to internal business data, however I would also like to build-in the
ability to manage users using the membership API directly in my WinForms
app. I can do this through code in the ASP.NET application, where the
provider information is supplied from web.config. In my WinForms application
this isn't available of course, and I presumably need to supply the provider
info via code. Any ideas how to do this?

Thanks!

Cheers - Graham
 
D

Dominick Baier [DevelopMentor]

Hi,

you can use the provider also in WinForms - use app.config instead.

Reference system.web.dll and copy the relevant entries from your web.config
to the app.config file.
 
G

Graham

Hi Dominick

Thanks for your suggestion - it works a treat! Just out of interest, is it
possible to configure the provider through code? Presumably this is what is
happening behind the scenes?

Cheers - Graham
 
L

Luke Zhang [MSFT]

The provider can not be configured in code, it has to been in .config file.

Regards,

Luke Zhang
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,812
Latest member
GracielaWa

Latest Threads

Top