开发者

How do expose my own meta data in WCF service?

Rather than exposing the system generated meta data I'd like t开发者_运维百科o provide my meta data which is kept it a text file (say) on the server. I guess this means responding to the HTTP GET request http://[service address]?wdsl.


You could simply turn off metadata export (remove serviceMetadataBehavior or set its httpGetEnabled flag to false) and then put your WSDL document at a URL that makes sense for your app (?wsdl is a WCF / ASMX convention but its not a standard)

This is pretty easy if you are using IIS hosting but would need a REST endpoint for Self Hosting


You can develop a custom MetaExporter and then find ServiceMetadataBehavior, in that behavior, you can override the default MetadataExporter. Therefore in your MetaExporter, you can do anything you want.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜