How do I customize the Forms Authentication cookie

2019-04-19 03:14发布

I have 2 websites running on localhost in different ports. As browsers do not differentiate port numbers when sending cookies, my forms authentication ticket from one site is being sent to the other

How do I solve this? I thought that a good solution would be to change the forms authentication ticket or one of the websites but I don't know how to do this.

1条回答
Evening l夕情丶
2楼-- · 2019-04-19 03:43

In your web.config:

<authentication mode="Forms">
  <forms name="{WhateverCookieNameYouWant}" loginUrl="LogOn.aspx" />
</authentication>
查看更多
登录 后发表回答