Use Membership class in C# .Net winforms

bahskankeda

New Member
I am trying to integrate the \[code\]Membership\[/code\] provider class to handle he roles and authentication in a Desktop application. I have run \[code\]reg_sql\[/code\] against the database to create the necessary procedures and tables. In my \[code\]app config\[/code\] I have added the application services connection string to point to my necessary database\[code\]<add name="ApplicationServices" connectionString="Data Source=.\SQLEXPRESS;Initial Catalog=mydatabase;User ID=user;Password=password" providerName="System.Data.SqlClient" />\[/code\]I am debugging the application and when I call the \[code\]Membership.CreateUser()\[/code\], I get a success status returned, but when I check the database there is no record in the \[code\]user\[/code\] or \[code\]membership\[/code\] tables. However when I try to re-register a user with the same details I receive a duplicate userName status. Therefore the record must exist somewhere? How do I configure the Membership class to point to my defined database?Thanks in advanceEdit this is my entire app config\[code\] <?xml version="1.0"?><configuration> <configSections> </configSections> <connectionStrings> <add name="ApplicationServices" connectionString="Data Source=.\SQLEXPRESS;Initial Catalog=mydatabase;User ID=user;Password=password" providerName="System.Data.SqlClient" /> <add name="CODS.Properties.Settings.CODSConnectionString" connectionString="Data Source=.\SQLEXPRESS;Initial Catalog=CODS;User ID=user;Password=password" providerName="System.Data.SqlClient"/> </connectionStrings><startup><supportedRuntime version="v2.0.50727"/></startup></configuration>\[/code\]
 
Back
Top