Solved

Problem with Membership/Roles

Posted on 2008-10-24
2
273 Views
Last Modified: 2013-12-17
Hi friends,
Hi friends.

I have a website in a server and I'm using Memberships and Roles. I
needed to replicate that site in a different subdomain for development
purposes. I changed the Application Name in the new web.config to have
a separate set of users/roles in the same ASPNETDB database.
I created a simple page in wich I just add a new "Admin" role and add a user to it.
After I added this user to thes new site I'm not able to login.
I checked the ASPDBNET db and I found that the new Application is
properly created as well as the Role and the User tables have the references to the new Role ans User. The problem is that there is no record for this user in the Membership table so .Net did
not store any password or membership information at all for this user.

Any idea about why?

Please find the relevant section of the web.config attached.

Thanks in advance
<roleManager enabled="true" defaultProvider="MyAspNetSqlRoleProvider">

<providers>

<clear />

<add connectionStringName="LocalSqlServer"

applicationName="/showroom" name="MyAspNetSqlRoleProvider"

type="System.Web.Security.SqlRoleProvider" />

</providers>

</roleManager>
 

<membership defaultProvider="MyAspNetSqlMembershipProvider">

<providers>

<clear />

<add name="MyAspNetSqlMembershipProvider"

type="System.Web.Security.SqlMembershipProvider"

minRequiredPasswordLength="5"

minRequiredNonalphanumericCharacters="0"

requiresQuestionAndAnswer="false"

enablePasswordRetrieval="true"

enablePasswordReset="true"

passwordFormat="Clear"

connectionStringName="LocalSqlServer"

applicationName="/showroom"

/>

</providers>

</membership>

Open in new window

0
Comment
Question by:ahll
  • 2
2 Comments
 
LVL 3

Accepted Solution

by:
ahll earned 0 total points
ID: 22804836
Well,

I finally found the solution myself. The problem is that I was using the overloaded method of CreateUser that only requires UserName and Password and I had configured the web.config to allow password retrieval. Under this config, the email is required.
For some weir reason that makes that the user gets saved but the membership is not created.

Thanks to all of you who reviewed this question.
0
 
LVL 3

Author Comment

by:ahll
ID: 22804842
Admins...how can I have this question deleted and the points refunded?
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…

896 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now