Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8272975
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T07:18:53+00:00 2026-06-08T07:18:53+00:00

siteA.com calls sitecookie.com/cookies.ashx and sets a cookie cookiename for sitecookie.com domain. Same browser, same

  • 0

siteA.com calls sitecookie.com/cookies.ashx and sets a cookie “cookiename” for sitecookie.com domain.
Same browser, same window, new tab, siteB.com calls sitecookie.com/cookies.ashx and tries to get the same cookie “cookiename” (again for sitecookie.com domain) but is null.

cookies.ashx implements IHttpHandler, IReadOnlySessionState and conformsTo [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]

So the question is, why is it null and can we retrieve it?

This is how i make requests from siteA and siteB:

 WebClient fs = new WebClient();
            var data = fs.DownloadData("http://sitecookie.com/cookies.ashx");
            var tostring = System.Text.Encoding.ASCII.GetString(data);
            return tostring;

This is how i read cookie in cookies.ashx the return value is a string.

 var cookie = context.Request.Cookies["cookiename"];
            if (cookie != null) return cookie.Value;
            return "false";

This is how i write cookie in cookies.ashx

HttpCookie cookie = new HttpCookie("sso");
            cookie.Value = context.Request.QueryString["token"];
            cookie.Expires = DateTime.Now.AddDays(1);
            context.Response.AppendCookie(cookie);
            return "true";
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T07:18:56+00:00Added an answer on June 8, 2026 at 7:18 am

    It turns out this is not possible since every call to http://sitecookie.com/cookies.ashx is treated as a new request and asp.net will initiate a new sessionId. The only way to persists is by storing the sessionid and passing it along on each subsequent requests. For me that solution wont work since I have many clients calling the service and I will not be able to pass sessionid between those clients.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have my site which redirects all *.domain.com calls to domain.com. What I want
I have domain site.com and there is subdomain sub.site.com Once you open sub.site.com you
Контакты if(window.location == 'http://my.site.com/contacts/') { $('.menuwelcome').css('display', 'block'); $('.leftlink').find('Контакты').css('font-weight', 'bold'); $('#mcontacts').find('a').html('<b>Контакты</b>').remove(); } How do remove
I have a typical setup for cross domain. site1.company.com site2.company.com Main application is running
I've read that setting document.domain = example.com lets me access the parent domain from
Example RSS feed link: http://twitter.com/statuses/user_timeline/twitter.rss Does anyone know if Twitter limits calls to a
I wish to have request for http://user1.domain.com : return the output from http://www.domain.com/site-client/site.php?site=user1 AND
Here is the page: http://textbookcentral.com.au/26/university-of-new-south-wales/buy/69897/acct1501/?query= When the Tell others I'm buying a textbook on
site.com/link?p=2 give $_GET['p']==2 even though i've already made site.com/link rewrite to site.com/index.php?page=link So, i'm
www.site.com/site/ instead of www.site.com/site/index.php www.site.com/articleName/ instead of www.site.com/articleName.php Its been around for so long,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.