Inspiration from applicationname

Source: Internet
Author: User

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!

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.