I am trying to automatically log the user to a diff website when the user clicks a button on my website.
I have got a sessionid from a url and I am creating cookie and storing the id inside it.
I am also adding the cookie to the response object but when I am trying to open the url, session id is not passed(checked fiddler).
Do you guys think that the other website is in other domain than my website could be problem?
Any ideas?
Generally speaking, you can’t set or read cookies for a different domain than the one your code is coming from. That’s a security issue.
If the other site has a login page, you could just do a form post to that page passing the credentials you need.