current OperationContext is null in WCF Windows Service

后端 未结 5 1615
感情败类
感情败类 2020-12-19 03:20

I am trying to set up a Publish/Subscribe system using WCF and where the WCF server is in a Windows service. The binding is net.TCP. The service is providing a \"Subscribe

5条回答
  •  轮回少年
    2020-12-19 04:05

    I had a similar issue: in my case when the InstanceContextMode was set to Single the WebOperationContext.Current was null in the constructor. However it was available within the services/classes methods.

提交回复
热议问题