I wonder if you have ever encountered such a situation. In the test environment, ASP. NETProgramEverything runs normally. Once deployed to a remote IIS server, the membership verification fails. the login control prompts "Logon Failed, please try again ". If you have encountered this situation, please refer to the following explanation.
This is mostly caused by applicationname. When we configure membership, role, profile and other information in Web. config, applicationname = '/' or applicationname = 'specificname' will be added normally '. If you do not configure applicationname, this problem occurs.
To put it simply, you need to know the application name during membership verification. If you have configured it, everything is OK. If you do not configure it, it will add the name of the virtual directory by default. In this case, the problem occurs because we may use virtual directories with different names in Remote IIS, which leads to the failure of the original users to be verified.
If you do not believe it, you can modify the membership applicationname configuration on your machine, and then try again whether the original user can pass the verification. The answer is: no.
The applicationname configuration can be a specific name, such as MyApp. It can also be a slash '/', which uses the default configuration of ASP. NET 2.0. Applicationname is stored in the aspnet_applications table of the membership database. You can check it. At the same time, each user corresponds to an applicationid (check aspnet_users table), which is why the original user cannot be verified after the applicationname is changed.
I am still an old saying. I hope you can understand the principles and help me in the future! At the same time, I hope you can talk about your understanding and feelings and share some of your experiences to improve everyone!
Have a nice day!