开发者

How to specify the <useRequestHeadersForMetadataAddress/> behavior with attribute in WCF?

I have a .NET WCF Rest endpoint configured through attributes (instead of using the web.config). I would like to achieve the <useRequestHeadersForMetadataAddress/> behavior with attributes. Any idea how t开发者_开发技巧o do that?


This question doesn't make sense. WCF Rest endpoint is not configured by attributes. REST service contract is using attributes to define needed web methods. Endpoint still has to be configured either by service host, service host factory or in configuration.

UseRequestHeadersForMetadataAddress is used to correctly set addresses in WSDL based on host header used when requesting WSDL. It cannot be set by attributes. Moreover WSDL in WCF is not able to describe REST service so there is no reason to use this behavior with REST service.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜