I want to read the ServiceBehavior attribute of WCF service at the client end. How can I 开发者_如何学编程do that?
- Ram
This doesn't make sense. Network boundaries separate the client and the server and what the client sees is what the server exposes. For example if you are using SOAP (basicHttpBinding) all that the client knows about this server is the WSDL. It doesn't even know that this server is WCF so talking about ServiceBehavior
in a client is wrong (the server could even be written in some other language, not even .NET).
Now if this service behavior sends some information downstream to the client (for example some custom HTTP header) then the client could read and access this information, but that will depend on the specific scenario.
精彩评论