views:

344

answers:

1

I have one application which uses the standard .NET forms authentication cookie, now I need to get this cookie from an application hosted on the same domain but one folder down with it's own application.

I can't seem to find any trace of the cookie using Request.Cookies.AllKeys, there must be a reason why because when I check to see what the details of the cookie are it is still there and the path is set to "/" which means I should be able to access it?

Any help would be greatly appreciated.

+3  A: 

Within asp.net you need to make sure that the machine keys are the same on each domain, and also the cookie uses the same name. Authentication only works if you are on the same domain.

Rav
I had to add the machine key to both applications and make sure that the encryption details were the same in both web.config's authentication sections. Useful link below:http://msdn.microsoft.com/en-us/library/eb0zx8fc.aspx
John_