I am looking for adding a version number to the wsdl that gets created for a WCF service. Let me know whether it is a good practice to add the version number as a part of data contract or at the soap headers? if so how to do it? This version number would be helpful to find out the latest 开发者_高级运维wsdl.
Thanks & Regards, Priya.R
Just how exactly (or rather, where) do you expect to add that information? If it's just informative to make it easier to diagnose issues (i.e. it doesn't affect how the WSDL would be used or the code generated) then it should be possible to do so by implementing a custom IWsdlExportExtension. Here's an older sample implementation I wrote a while ago that might give you an idea of how it's used.
精彩评论