Click here to Skip to main content
15,886,689 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
I have an ASP.NET Website in which I am facing login issue with user name being added as multiple but with different Application ID,
but user names are same.
Since for this application many developers had been working on it, and whoever started it, he created a new Appliction Name in the
Web.config as well as in the ASPNET Membership configuration(aspnet_regsql.exe, etc.), and some Appliction Names were given for Testing
builds/testing purposes only.

Due to the above mentioned reason, various similar named users have been added to the database, but their application id are different.
And due to this, the login is causing some failure, and the users are unable to login.

Although I have found one of the following article useful, I think it might give some hint for the people who are trying to answer my question:-

http://stackoverflow.com/questions/3298685/how-do-i-prevent-duplicate-membership-users-when-using-multiple-roleproviders-wi

In the Server where the application has been deployed, the Error Log in the Applications are showing the following detail:-
Event code: 4006 Event message: Membership credential verification failed.

Since the Application Name is to be just one, i.e. "/FOPortal", rest are not to be used.

Kindly find below the web.config sections which may be needed:-
HTML
<add name="utConnString" connectionString="Data Source=blabla\SQLEXPRESS2008;Initial Catalog=FOPortal;User Id=sa;Password=123;Max Pool Size=100;" providerName="System.Data.SqlClient"/>
<membership defaultProvider="SqlProvider" userIsOnlineTimeWindow="20">
            <providers>
                <clear/>
                <add name="SqlProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="utConnString" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" passwordFormat="Hashed" applicationName="/FOPortal"/>
            </providers>
</membership>
<roleManager enabled="true"></roleManager>

Some body gave me this resolution but it did not work:-

http://social.technet.microsoft.com/Forums/zh/sharepoint2010setup/thread/77cee2ee-1721-4696-b7ff-6854213eb2de


I would like to know that how would I resolve this issue.


Sincerely,
Muzaffar Ali Rana.
Posted
Updated 10-Sep-12 4:18am
v2

1 solution

Actually the problem was in the ASP.NET Membership applicationName setting, since the project was configured twice for two different application names with names as "/" and "/PROJECTNAME". I have just set the Application Name appropriately.

For reference please refer to the following article by Scott Guthrie:-

http://weblogs.asp.net/scottgu/archive/2006/04/22/Always-set-the-_2200_applicationName_2200_-property-when-configuring-ASP.NET-2.0-Membership-and-other-Providers.aspx[^]

What I can do is delete the records for the Membership with the application names with names as "/", and keep the other "/PROJECTNAME".
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900