views:

22

answers:

1

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.

+5  A: 

In your web.config:

<authentication mode="Forms">
  <forms name=".{WhateverCookieNameYouWant}" loginUrl="LogOn.aspx" />
</authentication>
Dustin Hodges