Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Membership Provider in ASP.NET 2.0

Status
Not open for further replies.

jbenson001

Programmer
Jan 7, 2004
8,172
US
Has anyone used this. I am getting a bit frustrated.

I want users to log in to my sQL Server 2005 DB using the login control and create logins using the Create User Wizard.

I ran aspnet_regsql.exe which created the necessary tables in the DB that I specified. This is fine. The problem is I don't know how, and can't find any help on how to tell these controls to point to the DB. Any help wold be great!

Thanks in advance,

Jim
 
What did you find out... I am having a similar issue.

Hope everyone is having a great day!

Thanks - Jennifer
 
Wow, it's been so long I almost can't remember what the issue was..LOL
What you have to do is to create memebership providers in the web.config. You can look up examples in VS Help and on line. Once that is done, you use the Web Site Administration tool to set the provider(s).
The login controls will use what you set in the admin tool. You can also use code to point the controls to a different provider at run time.

Jim
 
I finally found one with the remove... included without that the one I added just kept looking for the default SQL Server one.

Thanks for answering...


Code:
		<membership defaultProvider="SqlProvider" userIsOnlineTimeWindow="20">
   <providers>
	   <remove name="AspNetSqlProvider" />

	   <add connectionStringName="SchoolFinancialConnectionString1"
     applicationName="/KomputrolSchoolFinancial" enablePasswordRetrieval="false"
     enablePasswordReset="true" requiresQuestionAndAnswer="true" requiresUniqueEmail="false"
     passwordFormat="Hashed" maxInvalidPasswordAttempts="5" passwordAttemptWindow="10"
     name="SqlProvider" type="System.Web.Security.SqlMembershipProvider" />
   </providers>
  </membership>

Hope everyone is having a great day!

Thanks - Jennifer
 
Nice, I think I will use that, didn't know you could remove that pesky thing.

Jim
 
did that work for you, I still see it in my list?
 
It worked for me... Make sure that you ran the scripts on the database that you are connecting to...

Hope everyone is having a great day!

Thanks - Jennifer
 
I ran the scripts, but when I ender the remove tag I still see the provider.
 
Where are you seeing it? If on the ASP.Net Configuration it shouldn't be checked. Does it run looking at your connect string database?

Hope everyone is having a great day!

Thanks - Jennifer
 
It is showing the in the web admin tool.. but it is not checked since i have other providers and I default to a sql provider i created. Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top