Important Notice from AspDotNetStorefront
It is with dismay that we report that we have been forced, through the action of hackers, to shut off write-access to this forum. We are keen to leave the wealth of material available to you for research. We have opened a new forum from which our community of users can seek help, support and advice from us and from each other. To post a new question to our community, please visit: http://forums.vortx.com
Results 1 to 5 of 5

Thread: Retrieve cookie value

  1. #1
    Rita is offline Senior Member
    Join Date
    Mar 2009
    Posts
    124

    Post Retrieve cookie value

    I have my website in www.mywebsite.com and store is in www.shop.mywebsite.com, when user signin from store signin page we are redirecting the users to our website pages depends upon his roles. So i am storing the customerguid in cookie and tried to access the same in my website. That idea was working till i access the store page using http://localhost/shop, But now I installed SSL in my dev, now url is changed to http://mycomputernmae/shop, so customerGUID cookie is not getting recognized.

    So please tell me how should i get cookie value if i access my website pages so that our customer no need to login again.

  2. #2
    Rita is offline Senior Member
    Join Date
    Mar 2009
    Posts
    124

    Question

    Is there any other idea of getting the logged in user information? My problem is, I need to redirect to different pages depends upon customer levels and also the page contents are coming from another database. So I cant simply add these pages inside ASPDNSF topics. So somehow i need to know the logged in user in the store so that i can use that in my website. So please give just a hint on this.

  3. #3
    ASPDNSF Staff - Jon's Avatar
    ASPDNSF Staff - Jon is offline Senior Member
    Join Date
    Sep 2004
    Posts
    11,419

    Default

    I'm not sure I understand. You said everything was working until you tried a localhost url, but that's not a customer-accessable url. Is your issue getting this to work in a dev environment?
    Jon Wolthuis

  4. #4
    Rita is offline Senior Member
    Join Date
    Mar 2009
    Posts
    124

    Arrow

    Yes. You are right, localhost is not a customer accessible URL. But for testing purpose we need to set that up in dev and test machine, both will use localhost license only.
    Let me explain my problem in detail:

    Before installing IIS I was accessing the localhost shop site with the url http://localhost/shop and when i login from that it will redirect to my website (http://localhost:50059/mywebsite/mypage.aspx). So that time the cookie I was storing in the dev machine was getting recognized and it will display logout link in my pages depends upon the cookie I stored.

    But after I installed IIS(self signed certificate), If i access the shop site with the same URL(http://localhost/shop) https mode is not working. So I need to access the localhost shop site only using the http://mycomputername/shop(instead of localhost) this time the cookie I stored is returning Null when i access in my application.

  5. #5
    ASPDNSF Staff - Jon's Avatar
    ASPDNSF Staff - Jon is offline Senior Member
    Join Date
    Sep 2004
    Posts
    11,419

    Default

    I don't think the browser stores cookies for Url's that don't contain a second-level domain (mysite.com). I've seen reports that domain names must have two dots (periods) to create a cookie. I'm not sure how it was working before you installed a certificate. I would have guessed that http addresses without two dots would have failed.
    Jon Wolthuis