Last post Oct 25, 2013 12:14 PM by Herbert Stejdir
Oct 25, 2013 12:14 PM|Herbert Stejdir|LINK
Maybe I haven't studied the SignalR 2.0 documentation enough but what I have read and experienced in my multuser Web Form App is:
- from inside the server Hub-class it is possible to access methods in another class that is using System.Web.UI, System.Web.SessionState
- within the external classes methods it is possible to use a pages Application property ( e.g. Application [ some name }, Application.Lock(), Application.Unlock() without compiling errors
- but when the first command with Application is reached a runtime error 'Application can only be used within an ASP.NET context'
This is why the SignalR-context doesn't give access to Application, it is not running in an ASP.NET context.
This is a pity because I need Application urgently to coordinate the simultaneous access of multiple users to the same data ( to ensure data integrity ). Therefore my plan to replace Web.service calls by SignalR such having access to functions, access coordination,
updates of clients and broadcasting in one and the same technology fails. Now I have a mix of Web-service calls and separeted SignalR-calls which leaves me in doubts if I will find a reasonable solution for maintaining server-client comunication correctly
working in all possible interruption- and breakdown cases.
Please SignalR-development team inform if I am wrong, if not, please add the ASP.NET context-property Application to the SignalR-context!
Thanks in advance