简体   繁体   English

客户端的ServiceBehavior

[英]ServiceBehavior on client side

为什么在Visual Studio中将ServiceReference工具作为EndpointBehavior之后,客户端上不会自动生成serviceBehavior部分?

Wsdl.exe or "Add Service Reference..." generate proxy classes, datacontracts & config based upon exposed metadata . Wsdl.exe或“添加服务引用...”根据公开的元数据生成代理类,数据合同和配置。 Commons ways to expose metadata is by using a mex endpoint or exposing a wsdl. 公开元数据的常用方法是使用mex端点或公开wsdl。

Basically, Behaviors are simply not exposed. 基本上,行为是不公开的。 That's why you can't generate the same endpoint behaviors on client side. 这就是为什么您不能在客户端生成相同的端点行为的原因。

What is important here, is that many behaviors are "local settings only" (for a service OR for a client ). 在这里重要的是,许多行为都是“仅本地设置”(对于服务或对于客户端)。 It does not tell to clients how to call the service, but how the service should run. 它不会告诉客户端如何调用服务,而是告诉服务应如何运行。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM