Forms Authentication across virtual directories

前端 未结 1 667
深忆病人
深忆病人 2021-01-19 04:52

I am trying to share forms auth from a root application to a sub application running in a virtual directory. I am having trouble with authentication in the subsite.

相关标签:
1条回答
  • 2021-01-19 05:36

    In your web.config files, set a common machine key between the projects so that the 2 domains share validation and decryption keys.

    example:

    <machineKey validationKey="21F090935F6E49C2C797F69BBAAD8402ABD2EE0B667A8B44EA7DD4374267A75D7" 
    decryptionKey="ABAA84D7EC4BB56D75D217CECFFB9628809BDB8BF91CFCD64568A145BE59719F"
    validation="SHA1"
    decryption="AES"
    />
    
    0 讨论(0)
提交回复
热议问题