We help IT Professionals succeed at work.

Asp.net Web.config

jbajaj
jbajaj asked
on
Medium Priority
607 Views
Last Modified: 2012-05-06
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
Comment
Watch Question

Dustin HopkinsSenior Web Developer
CERTIFIED EXPERT
Commented:
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.

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
Dustin HopkinsSenior Web Developer
CERTIFIED EXPERT
Commented:
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.
Top Expert 2013
Commented:
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.
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.