I'm working on a website where the same instance runs across multiple domains (and not just sub-domains).
Is it possible to create a cookie thats accessible across all of these domains? Similar to the way facebook cookies work from everywhere.
Only for subdomains in the same root domain - you can use wildcard cookies by just specifying the subdomain. ex. sv1.test.com sv2.test.com all would use test.com
see: http://forums.asp.net/t/369569.aspx/1
For using a single cookie cross root domain - you cannot do this. It breaks the rules of trust - otherwise my app could read your other cookies. What happens in sites that 'seem' to share cookies is there is usually a redirect to that other domain to validate a value and then a redirect back to the other domain. Values can then be posted over, set in hidden form fields or the querystring.
Also see this quasi duplicate post: Sharing cookies across different domains and different applications (classic ASP and ASP.NET)
Could you have .js functions on CommonSite.com
that store and retrieve the cookies?
So you might have commonSite.com/CookieMonster.js
Then on :
FirstDomain.com/MyPage.htm
you could call commonsite.com/cookiemonster.js
's SaveCooke(CookieValue)
Same on SecondDomin.com/OtherPage.htm