|
|
1
0
我认为将webgetattribute上的uritemplate更改为空字符串就可以了。 http://msdn.microsoft.com/en-us/library/system.servicemodel.web.webgetattribute.uritemplate.aspx |
|
|
2
0
我认为有一种方法可以使用operationcontext/weboperationcontext来实现。我忘记了确切的细节,但是请看这个例子,它在通道上创建了一个operationcontextscope http://social.msdn.microsoft.com/forums/en-US/wcf/thread/8f9f276a-e13f-4d06-8c1e-0bb6abd8f5fe 在这一点上,您可以访问例如操作上下文、Currut.OutGooMeMeaGeice属性(可能设置.VIs到所需URI),或者WebOperationContext.Current.OutgoingWebRequest,如果您想设置HTTP头或“方法”(HTTP谓词)。我认为poking operationcontext.current.outgoingMessageProperties.via可以满足您的需要。 |