We help IT Professionals succeed at work.

reading cookie on different domain

TMPSupport asked
Last Modified: 2011-10-03
Our intranet site is something like http://intranet.company.com and an asp.net application runs when user goes to this address. The application reads a cookie and in its absense the app redirects to the login.aspx page. Upon successful login, the app creates a cookie storing the user info. This part has been running for quite some time.

Now the network admin created an 'alias' to this site that you can go to it just by typing 'http://intranet'. The app works fine here as well. The issue is since both these sites are technically the same, I want them to be able read the cookie created by the other.

In other words, if a user logs into to http://intranet and then opens a link like http://intranet.company.com/app1, the latter should recognize that a cookie has been created at 'http://intranet' and read the cookie and open app1 instead of redirecting to the login page.

I hope I've been clear enough.
Watch Question

Unlock this solution and get a sample of our free trial.
(No credit card required)


sorry RedK, this will not work for me.
why won't it work, is the root domain not the same?


Ok, this was a part of a quick project, it would not be practical for me to spend so much time in trying to get another page. Also this would not suit our model in practice - creating another aspx page - while most of our projects have the default page and the rest are only ascx pages.

Thanks for your time, but I'm sorry.
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.