• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 589
  • Last Modified:

Asp.net Web.config

in my asp.net application i m using aspnet_users table for login in to my application.but i m getting one issue it.i have created 10 users on my localmachine and it was working fine on localmachine after than i had moved my localmachine database to my webserver on webserver those 10 users are displaying in database table aspnet_user  but when i m trying to login with those user its not loggedin its give error that username and password are not valid.

so is there any web.config setting for solve this problem

i m litlebit confuse in machinekey and application name please provide me some solution for this issue
0
jbajaj
Asked:
jbajaj
  • 2
3 Solutions
 
Dustin HopkinsManaging MemberCommented:
Probably when you changed webservers, the applicationID changed. When asp.net authenticates a user, it confirms appid, username, and pass. Thats why you aren't authenticating.
So you need to recreate the accounts on the new server. Atleast thats the easiest way.
0
 
Dustin HopkinsManaging MemberCommented:
or you could create one new account, then check the aspnet_user table for the new appID then change the appID associated with the old accounts to match.
0
 
guru_samiCommented:
There could be several reasons...
1: applicationName attribute not set in web.config
2: ConnectionString not pointing to the correct database

Now first make sure your membership provider is pointing to the correct Database.

Now with applicationName part first check this:
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

If you can afford to re-create the users ...then first set the applicationName attribute to something of your choice in your web.config. Save the web.config. Re-Create the users. Then it should work if applicationName was the cause.

If you cannot afford to re-create the users .... then in your database.....in your aspnet_users table ... you will see applicationID column. Note this applicationID for your users.
Now in aspnet_Application Table ..look for the applicationName for that corresponding applicationID. Note this applicationName.

Now in your web.config for your membership provider ... set applicationName attribute to the name that you found in your aspnet_Application table.

IF you are not clear ... share your web.config here.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now