Skip to content

Methods for cross-session data sharing #1513

Closed

Description

@itg-assistant

Darren asked 2018-04-26 20:09:45 UTC

Hi,

Being new to web development, I'm getting caught out by all sorts of "webby" things :-)

I can't find any information on methods to share data between sessions. I understand that I could perhaps use the good ol' text file or database, but is there another way? Some kind of global variable storage in a known location for all sessions to access, for example?

A vb example would be most appreciated.

Thank you

Darren

Activity

  1. itg-assistant commented on Jun 13, 2026

    @itg-assistant
    Author
  2. itg-assistant commented on Jun 13, 2026

    @itg-assistant
    Author

    Tiago (ITG) answered 2018-04-26 20:44:45 UTC

    Static variables in C# are Shared variables in VB :)

  3. itg-assistant commented on Jun 13, 2026

    @itg-assistant
    Author

    Darren answered 2018-04-26 21:23:55 UTC

    Thank you both, however while attempting to test this I’ve run into another peculiarity.

    I run the project and a session opens in IE and works as expected. The IE tab is labelled “WebDesktopApplication1”.
    I then open another tab and paste in the same url (i.e. http://localhost:45035/) – but this page isn’t updating at all. Values are frozen from the time it loads and it appears to be just a static html page. This tab is labelled differently as just “Localhost”.

    What on earth is happening here?

    Thanks

  4. itg-assistant commented on Jun 13, 2026

    @itg-assistant
    Author

    Tiago (ITG) answered 2018-04-26 22:26:09 UTC

    May I suggest you download the “Simple Chat” example from https://wisej.com/examples/ . Try it on two different browsers and you’ll see that when you type on one browser, the “other” browser doesn’t get updated until you click it.

  5. itg-assistant commented on Jun 13, 2026

    @itg-assistant
    Author

    edmond girardi answered 2018-04-29 22:55:11 UTC

    Make sure you are running in WebSockets mode – if you are Visual Studio running on Windows 7 – no websocket support.

  6. itg-assistant commented on Jun 13, 2026

    @itg-assistant
    Author

    edmond girardi answered 2018-04-30 14:45:23 UTC

    You could make a static class that contains a dictionary and store data to be shared with multiple sessions. Lookup the key value and grab the object – you key would have to be something commonly known – like a Department ID or Company ID – something like that.

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