In My Project i have a method PreAction() which is used in all the Methods. PreAction() contains the Operation context object i.e
OperationContext currentContext = OperationContext.Current
So when am trying to Invoke a Method X in that method I am using the PreAction() Method. So as the operation context is of service model, I am getting an exception indicating that Object reference not set to an instance of an object.
So how to overcome this scenario ? Is there a way to use the Mcoking and can we resolve this scenario?
Thanks!!!