Muzaffar Ali Rana
Muzaffar Ali Rana

Reputation: 487

ASP.NET Membership causing issue and adding multiple similar usernames but with different Application IDs

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:-

How do I prevent duplicate membership users when using multiple roleproviders with different application names?

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:-

<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>

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

Sincerely,
Muzaffar Ali Rana.

Upvotes: 0

Views: 1331

Answers (1)

wes
wes

Reputation: 265

I would do an update based on distinctly selected user names and update the applicationid for the fields whose user names you would like to remain valid in the current state of the application.

Sharepoint Setup Thread

Upvotes: 1

Related Questions