About the Venus system remove the AppPath configuration, let the system automatically get the path to set the cookie resolution method

Source: Internet
Author: User
Tags set cookie

Venus System The bottom of the use of a unified interface, especially the user, after the user login, will establish a userinfo cookie. Take a look at the following 2 URLs:

Http://120.24.86.232/book

Http://120.24.86.232/helpdesk

In general, if you do not explicitly set Cookie,cookie, the UserInfo cookie will be stored in the/home directory by default.

In this way, the book system and the helpdesk system can share this system. In other words, the user logs on to a system, and the other one will also be automatically system.

However, in my demo site, in order to distinguish between different systems, I do not want to, the user login book, the system automatically login helpdesk

Therefore, I distinguish it by setting the cookie path. such as 2 userinfo, because path is not the same, so although under the same domain, however, is a different cookie

In earlier versions, because I needed to know the name of the current application, so, for example, a apppath was added to the web. config, the user manually set the AppPath to let the system set the path name.

Then in the program, read the Web. config to get the value of AppPath

However, many people are to create a new site, so you must change the AppPath to/But many people did not modify the AppPath, resulting in the failure to enter the background (the system prompts do not have permissions.) )

In the latest version, we removed the AppPath value from the Web. config. Let the system get it automatically.

That is, in the code through the public string apppath = HttpContext.Current.Request.ApplicationPath;

Gets the path of the current application. And no longer use the AppPath in Web. config

About the Venus system remove the AppPath configuration, let the system automatically get the path to set the cookie resolution method

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.