比如一个站点test.com,有几个子站点域名为a.test.com,b.test.com,c.test.com...
如何实现在一个地方登陆,访问其它应用的时候不用重复登陆?

解决方案 »

  1.   

    HttpCookie ck = new HttpCookie();
    ck.Domain="test.com";
    //设置Cookie的域就能在多个子域名下通用.
      

  2.   

    web.config里面加上如下节点:<machineKey
             validationKey= "C50B3C89CB21F4F1422FF158A5B42D0E8DB8CB5CDA1742572A487D9401E3400267682B202B746511891C1BAF47F8D25C07F6C39A104696DB51F17C529AD3CABE" 
             decryptionKey= "8A9BE8FD67AF6979E7D20198CFEA50DD3D3799C77AF2B72F" 
             validation="SHA1"> 
         </machineKey>  <authentication mode="Forms" >  
    <forms name=".domain.com" loginUrl="Login.aspx"  protection="All" timeout="30">
          </forms>
        </authentication>
    利用FormsAuthentication.FormsCookieName读取来  FormsAuthentication.Decrypt(cookie名字)解密
      

  3.   

    Java 也有web.config ,还以为是.net区呢 :(.net 下设置cookie的domain就可以了
      

  4.   

    用Javscirpt控制,来登陆10次,当年我就是那么做的。不过只有3个分站。
      

  5.   

    Cookies
    将Domain 设置成 "test.com"
    就完了
      

  6.   

    使用Cookie,共享Session~~~
    或者学Tom使用专业设备NetApp,不过花费多
      

  7.   

    HttpCookie cookie = new HttpCookie();
    cookie.Domain="test.com";
    这样就可以了啊!