兩系統用asp.net forms 身分識別驗證方式實現跨域登入資訊共用

來源:互聯網
上載者:User

標籤:http   io   ar   for   sp   on   c   log   ad   

1.兩個系統的 web.config 都配置為 forms 驗證方式( system.web —> authentication 節點)

2.在兩個系統的Web.config裡配置相同的 system.web —> machineKey 節點(節點產生:http://www.aspnetresources.com/tools/keycreator.aspx)

3.在兩個系統的Web.config裡配置相同的 system.web —> httpCookies 節點(<httpCookies domain=".xxx.com"/>)

<system.web>

  <!-- BEGIN 身分識別驗證配置節 -->
  <authentication mode="Forms">
    <forms loginUrl="~/Account/LogOn" timeout="2880" />
  </authentication>
  <machineKey       validationKey="C7A01815F6AA26DBA9C6A9B5E4BCE8F3CC131519C0BAD696EC2453E8CFC944FE9DA09B7C651903A1C1052BF6385723874A02E26C1695  7E69A71A3CB3EC60626B" decryptionKey="54C2FFF68C75DFFE0F16E7BE473D8ECF81030E5817686A10D9C8D91A91AE9D57" validation="SHA1"     decryption="AES" />
  <httpCookies domain="同一網域名稱"/>
  <!-- End 身分識別驗證配置節 -->

</system.web>

兩系統用asp.net forms 身分識別驗證方式實現跨域登入資訊共用

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.