public override Task OnConnected() { ServiceReference2.WebService1Soap ws = new ServiceReference2.WebService1SoapClient(); string msg = ws.CreateSession("bcce7f7ad7596f963f4adb23d713e0d4", "329392de8a55edf86c0881a57381cbe6", Context.User.Identity.Name, Context.ConnectionId); if (msg != "ok") { Clients.Caller.ErrorOnServer("msg"); } return base.OnConnected(); }