[en] Getting Session Id on Before Invoking! (solved)

Topics: Technical Support
Jul 29, 2014 at 7:16 PM
I wanna be able to cancel the invoke on "beforeInvoke" for some users base on calling interface name and method name!
how can I get session ID of user in beforeInvoke Method?!
Warm Regards
Mas
Coordinator
Jul 30, 2014 at 2:22 PM
Edited Jul 30, 2014 at 2:22 PM
Hi masnavi,

Use ServerSession.CurrentSession.SessionID property:
private void ZyanHost_BeforeInvoke(object sender, BeforeInvokeEventArgs args)
{
    var sessionId = ServerSession.CurrentSession.SessionID;
}
Jul 30, 2014 at 3:43 PM
Thanks a lot ;)