Base solution for your next web application
Open Closed

Cookie #12313


User avatar
0
jhonedulab created

Hello Support,
Good Day!
I tried to create a simple cookie on the server, the issue is that
when i try to make request again the cookie is not being sent over and also when i try to check the debugger
the cookie is not available.

Using Angular and Asp.netcore webapi.

Regards,
Jhon


4 Answer(s)
  • User Avatar
    0
    m.aliozkaya created
    Support Team

    Hi @jhonedulab,

    How do you send the cookie? Can you show the method?

    There is an example for you

    Response.Cookies.Append("Abp.AuthToken",
        accessToken,
        new CookieOptions
        {
            Expires = Clock.Now.Add(_configuration.AccessTokenExpiration),
            HttpOnly = true,
            Secure = true,
            SameSite = SameSiteMode.None
        }
    );
    
  • User Avatar
    0
    jhonedulab created

    Hello,
    this is how i set the cookie on the server
    image.png

    but the cookie nowhere to be found on the chrome debugger

    regards,

    Jhon

  • User Avatar
    0
    jhonedulab created

    Hello,
    I followed your sample
    image.png

    same result.

    Regards,

    Jhon

  • User Avatar
    0
    m.aliozkaya created
    Support Team

    Hi @jhonedulab,

    I couldn't reproduce it, it works on my side. Do you have this problem with a fresh project? Also, could you share a sample project with support@aspnetzero.com