I'm getting some values in AfterReceiveRequest and want to use that in BeforeSendReply in WCF. Please help me, how I can do that. I'm working in C# project files. I can't use Seesion, ViewState here. I can use
static fields, but It will not a good solution. Please give me best solution for this.
Below are some lines of my code.
public object AfterReceiveRequest(
ref System.ServiceModel.Channels.Message request,
System.ServiceModel.IClientChannel channel,
System.ServiceModel.InstanceContext instanceContext)
{
ClassABC abc = new ClassABC();
int webServiceID = abc .SetInformation(--//any parameters//--);
return null;
}
public void BeforeSendReply(ref System.ServiceModel.Channels.Message reply,
object correlationState)
{
//here I need webServiceID.
}