lordofduct
Well-known member
- Joined
- Jun 24, 2010
- Messages
- 71
- Programming Experience
- 3-5
So I have a WCF service that runs, and sometimes I want to call to the server asynchronously.
Basically I follow the Begin/End outline to do the call. WCF takes care of a asynchronous call when I do this, which means I'm not struck with any 'timeouts' if the service takes a while, it just responds back once it's done. Yey.
On the service I grab a reference to the current OperationContext so I can get the sessionId. I have a few persistent values stored by the sessionId... so this way I know who called and what of these values to use.
But the thing is OperationContext.Current is NOTHING if I do this Begin/End asynch call to the WCF service. Does anyone know why? Does anyone know how I can work around this?
Basically I follow the Begin/End outline to do the call. WCF takes care of a asynchronous call when I do this, which means I'm not struck with any 'timeouts' if the service takes a while, it just responds back once it's done. Yey.
On the service I grab a reference to the current OperationContext so I can get the sessionId. I have a few persistent values stored by the sessionId... so this way I know who called and what of these values to use.
But the thing is OperationContext.Current is NOTHING if I do this Begin/End asynch call to the WCF service. Does anyone know why? Does anyone know how I can work around this?