Skip to content

How to Save Cookies #654

Closed
Closed

Description

@itg-assistant

Tung Ngo asked 2017-02-26 06:17:03 UTC

Hello,

I use Wisej.Web.Application.Cookies.Add(key,value) to save user settings. However, in the next run, the Cookies collection does not contain the user settings.

We do not change the default settings of cookieless in default.json

Is there something I forgot to make it works?

Thanks

Activity

  1. itg-assistant commented on Jun 12, 2026

    @itg-assistant
    Author

    Thomas (ITG) answered 2017-02-26 07:23:39 UTC

    Hi Tung,

    I just checked and for me it is working fine. See attached sample - the cookie value is preserved when the app is stopped and restarted.

    Best wishes
    Thomas

  2. itg-assistant commented on Jun 12, 2026

    @itg-assistant
    Author

    Tung Ngo answered 2017-02-26 18:38:44 UTC

    Hello Thomas,

    I run your example at my side. The cookies is not preserved.

    I use Windows10. VS2013 + IIS Express, debug with Internet Explorer.

    However, with Chrome the cookies is preserved as expected.

  3. itg-assistant commented on Jun 12, 2026

    @itg-assistant
    Author

    Luca answered 2017-02-26 21:33:38 UTC

    Hi Tung,

    I tried the sample that Thomas posted on Windows 10 with Chrome, IE 11 and IE Edge and the cookie is always retrieved correctly. You may have protected mode enabled in IE, or some other security setting that prevents the cookies from being saved.

    Best,

    Luca

  4. itg-assistant commented on Jun 12, 2026

    @itg-assistant
    Author

    Jens (fecher) answered 2018-01-29 09:11:39 UTC

    To make it working in FF and Edge, I have to add to Thomas example an expire date, otherwise the cookie was only valid for the current session.

    Wisej.Web.Application.Cookies.Add("test", textBox1.Text, new DateTime(2020,1,1));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    GeneralQuestions, how-tos and everything else.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions