Sharing authentication between two web applications

后端 未结 2 1685
北恋
北恋 2020-12-08 02:56

I have a base web site (Asp.net WebForms application) running under ie.

http://localhost:90/

Then I created a new (this ti

2条回答
  •  自闭症患者
    2020-12-08 03:10

    I found it myself.

    This is the article on MSDN that talks exactly about this scenario. I decided to keep this question anyway for anyone that would be chasing the same information some time later.

    MSDN: Forms Authentication Across Applications

    In brief

    You have to configure machine keys in web.config of both applications so they match hence they'll be able to decode data that the other party generated. And that's the whole trick. MSDN article explains this in great detail including how to generate those keys.

提交回复
热议问题