C# 正在RequestInterceptor中获取OperationName
为了验证请求,我实现了一个定制的请求截取器,如下所示。我正试图在ProcessRequest中获取操作名称,但无法访问 有人能告诉我如何在这里获得操作名称吗C# 正在RequestInterceptor中获取OperationName,c#,.net,wcf,C#,.net,Wcf,为了验证请求,我实现了一个定制的请求截取器,如下所示。我正试图在ProcessRequest中获取操作名称,但无法访问 有人能告诉我如何在这里获得操作名称吗 public class SampleInterceptor: Microsoft.ServiceModel.Web.RequestInterceptor { public SampleInterceptor() : base(true) { } public override void Proce
public class SampleInterceptor: Microsoft.ServiceModel.Web.RequestInterceptor
{
public SampleInterceptor() : base(true)
{
}
public override void ProcessRequest(ref System.ServiceModel.Channels.RequestContext requestContext)
{
//need the operation name here to authenticate
}
}
您正在查找吗?不。不是操作名称,而是触发此请求的操作名称。。。