Solved

Problem with Membership/Roles

Posted on 2008-10-24
2
274 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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

773 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