I'm writing a simple chat web service with C# ASP.Net, which I am new to.
Server maintains a List<ConnectedUser>
, where the ConnectedUser
object is a class holding ID, username, and a list of waiting messages.
I want all connected clients to be able to access the list on the server.
I tried Application state, but I found it will not hold custom classes, even when I let it be serializable. I tried a static class holding the global variables. Neither persist changes between calls to the service.
How should I be doing this? Thank you.