Kevin Verhoeven
Kevin Verhoeven

Reputation: 189

ASP.NET setting up membershipprovider

I have created a registration and a login form by using a wizard. But when someone registers and tries to login, they can't. I've come to understand that this because there is no membershipprovider. I created both my forms and my database automatically, Shouldn't there be a default membershipprovider then? is there a way to find out the name/settings of a possible membershipprovider?

I tried to set up a membershipprovider myself with:

  <membership defaultProvider="MembershipADProvider">
      <providers>
          <clear/>
          <add name="MembershipADProvider" type="System.Web.Security.SQLMembershipProvider" connectionStringName="ASPNETDBConnectionString" applicationName="/"/>
      </providers>
  </membership>

In the web.config file, but i just get an error that there is no default membershipprovider when i open the registration page. I also see there is a membershipprovider option in the registerform properties, but i don't get any successes here either.

Upvotes: 1

Views: 284

Answers (4)

Kevin Verhoeven
Kevin Verhoeven

Reputation: 189

Problem is fixed. There was a membershipprovider, but new members didn't get the member role when they registered.

Upvotes: 0

competent_tech
competent_tech

Reputation: 44921

Change the following line:

 <membership>

to:

 <membership defaultProvider="MembershipADProvider">

Upvotes: 1

Bas
Bas

Reputation: 27085

Add a default provider:

<membership defaultProvider="MembershipADProvider">

Upvotes: 2

Related Questions