感觉是可以的,不过得试一试,要设置Path. o limit cookies to a folder on the server, set the cookie's Path property, as here:Dim appCookie As New HttpCookie("AppCookie") appCookie.Value = "written " & Now.ToString appCookie.Expires = Now.AddDays(1) appCookie.Path = "/Application1" Response.Cookies.Add(appCookie) The path can either be a physical path under the site root or a virtual root. The effect will be that the cookie is available only to pages in the Application1 folder or virtual root. For example, if your site is called www.contoso.com, the cookie created in the previous example will be available to pages with the path http://www.contoso.com/Application1/ and to any pages beneath that folder. However, the cookie will not be available to pages in other applications such as http://www.contoso.com/Application2/ or just http://www.contoso.com/.以上来自msdn: Basics of Cookies in ASP.NET http://msdn.microsoft.com/en-us/library/aa289495(v=vs.71).aspx
如:
http://www.aaa.com/a/ .net1.1老网站
http://www.aaa.com/b/ 指向.net4新网站这样从表面上看,就是一个站,客户就不会叽叽歪歪了,呵呵
o limit cookies to a folder on the server, set the cookie's Path property, as here:Dim appCookie As New HttpCookie("AppCookie")
appCookie.Value = "written " & Now.ToString
appCookie.Expires = Now.AddDays(1)
appCookie.Path = "/Application1"
Response.Cookies.Add(appCookie)
The path can either be a physical path under the site root or a virtual root. The effect will be that the cookie is available only to pages in the Application1 folder or virtual root. For example, if your site is called www.contoso.com, the cookie created in the previous example will be available to pages with the path http://www.contoso.com/Application1/ and to any pages beneath that folder. However, the cookie will not be available to pages in other applications such as http://www.contoso.com/Application2/ or just http://www.contoso.com/.以上来自msdn:
Basics of Cookies in ASP.NET
http://msdn.microsoft.com/en-us/library/aa289495(v=vs.71).aspx