Wcf best cat
Содержание:
Поддержка нескольких видов проверок подлинностиMultiple Authentication Support
Была добавлена поддержка нескольких режимов проверок подлинности, поддерживаемых службами IIS, в одной конечной точке WCF при использовании транспорта HTTP и безопасности транспорта.Support has been added to support multiple authentication modes, as supported by IIS, on a single WCF endpoint when using the HTTP transport and transport security. Служба IIS позволяет включить несколько режимов проверки подлинности в виртуальном каталоге. Эта возможность позволяет одной конечной точке WCF поддерживать несколько режимов проверки подлинности, разрешенных для виртуального каталога, в котором размещена служба WCF.IIS allows you to enable multiple authentication modes on a virtual directory, this feature allows a single WCF endpoint to support the multiple authentication modes enabled for the virtual directory where the WCF service is hosted.
IHttpCookieContainerManagerIHttpCookieContainerManager
Этот интерфейс, предоставляемый IChannelFactory<TChannel>, существенно упрощает работу с куки-файлами на стороне клиента.This interface, exposed by IChannelFactory<TChannel>, makes working with cookies on the client side much easier. Когда свойство AllowCookies имеет значение true для привязки, доступ к куки-файлам можно получить следующим образом:When AllowCookies is set to true on the binding, you can access cookies by using the following code:
Затем можно получать или устанавливать куки-файлы из CookieContainer.You can then retrieve or set the cookies from the CookieContainer. Когда свойство AllowCookies имеет значение false, куки-файл можно получить вручную с помощью OperationContext и отправить его запросом с помощью другого OperationContext или средства проверки сообщений.When AllowCookies is set to false, you can manually retrieve the cookies using OperationContext and send it in other requests using another OperationContext or message inspector. Интерфейс IHttpCookieContainerManager позволяет выполнить проверку подлинности пользователя для службы и использовать куки-файл, возвращенный службой, для проверки подлинности в других службах.The IHttpCookieContainerManager interface allows you to authenticate a user with a service and use the authentication cookie returned by that service to authenticate with other services.
Проведение экспертизы кошек
- Животное, выставляемое на выставке WCF должно иметь вет. паспорт с отметками о проведенной вакцинации.
- Возраст выставляемого животного: не меньше 6 недель (baby class)
- На экспертизу к судьям животных, по возможности, приносят стюарды.
- Стюард, как и ассистент, не может показывать собственное животное.
- На экспертизу не допускаются (снимаются с экспертизы):
- животные не прошедшие ветеринарный контроль (ветеринар так же в праве удалить с выставки животное, проявляющее, в ходе выставки признаки заболевания),
- агрессивные животные,
- животные с удаленными когтями (у животных должны быть подстрижены когти),
- беременные кошки,
- кормящие кошки,
- животные ненадлежащего вида (грязные, крашеные, стриженые, чрезмерно напудренные),
- животные с генетическими заболеваниями,
- животные вне каталога или дополнительного списка.
Выставляемое животное должно иметь сертификат (копии сертификата), подтверждающий титул животного. Чемпионы Мира должны иметь номерной сертификат, зарегистрированный в WCF — бюро.
Создание объектов обратного вызова для дуплексных службCreating Callback Objects for Duplex Services
Дуплексные службы задают контракт обратного вызова, который должно реализовать клиентское приложение, чтобы обеспечить объект обратного вызова для вызываемой службы в соответствии с требованиями контракта.Duplex services specify a callback contract that the client application must implement in order to provide a callback object for the service to call according to the requirements of the contract. Хотя объекты обратного вызова не являются полноценными службами (например, невозможно инициировать канал с объектом обратного вызова), в целях реализации и конфигурации их можно рассматривать как тип службы.Although callback objects are not full services (for example, you cannot initiate a channel with a callback object), for the purposes of implementation and configuration they can be thought of as a kind of service.
Клиенты дуплексных служб должны выполнять следующее.Clients of duplex services must:
-
Реализовывать класс контракта обратного вызова.Implement a callback contract class.
-
Создайте экземпляр класса реализации контракта обратного вызова и используйте его для создания System.ServiceModel.InstanceContext объекта, передаваемого в конструктор клиента WCF.Create an instance of the callback contract implementation class and use it to create the System.ServiceModel.InstanceContext object that you pass to the WCF client constructor.
-
Вызывать операции и обрабатывать обратные вызовы операций.Invoke operations and handle operation callbacks.
Дуплексные клиентские объекты WCF работают как недуплексные аналоги, за исключением того, что они предоставляют функции, необходимые для поддержки обратных вызовов, включая настройку службы обратного вызова.Duplex WCF client objects function like their nonduplex counterparts, with the exception that they expose the functionality necessary to support callbacks, including the configuration of the callback service.
Например, невозможно управлять различными аспектами поведения среды выполнения объекта обратного вызова, используя свойства атрибута System.ServiceModel.CallbackBehaviorAttribute класса обратного вызова.For example, you can control various aspects of callback object runtime behavior by using properties of the System.ServiceModel.CallbackBehaviorAttribute attribute on the callback class. Еще одним примером является использование класса System.ServiceModel.Description.CallbackDebugBehavior для включения возвращения сведений об исключениях в службы, вызывающие объект обратного вызова.Another example is the use of the System.ServiceModel.Description.CallbackDebugBehavior class to enable the return of exception information to services that call the callback object. Дополнительные сведения см. в разделе Дуплексные службы.For more information, see Duplex Services. Полный пример см. в разделе дуплекс.For a complete sample, see Duplex.
На компьютерах под управлением ОС Windows XP с запущенными службами IIS 5.1 дуплексные клиенты должны задавать базовый адрес клиента с помощью класса System.ServiceModel.WSDualHttpBinding, в противном случае возникает исключение.On Windows XP computers running Internet Information Services (IIS) 5.1, duplex clients must specify a client base address using the System.ServiceModel.WSDualHttpBinding class or an exception is thrown. В следующем примере кода показано, как это сделать в коде.The following code example shows how to do this in code.
В следующем коде показано, как это сделать в файле конфигурации.The following code shows how to do this in a configuration file
Вызов операцийCalling Operations
После создания и настройки клиентского объекта создайте блок try/catch, вызовите операции так же, как если бы объект был локальным, и закройте клиентский объект WCF.Once you have a client object created and configured, create a try/catch block, call operations in the same way that you would if the object were local, and close the WCF client object. Когда клиентское приложение вызывает первую операцию, WCF автоматически открывает базовый канал, а базовый канал закрывается при перезапуске объекта.When the client application calls the first operation, WCF automatically opens the underlying channel, and the underlying channel is closed when the object is recycled. (Также можно явно открыть и закрыть канал до или после вызова других операций.)(Alternatively, you can also explicitly open and close the channel prior to or subsequent to calling other operations.)
Например, в случае следующего контракта службы.For example, if you have the following service contract:
Вы можете вызвать операции, создав клиентский объект WCF и вызвав его методы, как показано в следующем примере кода.You can call operations by creating a WCF client object and calling its methods, as the following code example demonstrates. Открытие, вызов и закрытие клиентского объекта WCF происходит в одном блоке try/catch.The opening, calling, and closing of the WCF client object occurs within a single try/catch block. Дополнительные сведения см. в статьях доступ к службам с помощью клиента WCF и Использование функции Close и Abort для освобождения ресурсов клиента WCF.For more information, see Accessing Services Using a WCF Client and Use Close and Abort to release WCF client resources.
WCF 基础知识WCF Fundamentals
WCF 是一个运行时和一组 Api,用于创建在服务和客户端之间发送消息的系统。WCF is a runtime and a set of APIs for creating systems that send messages between services and clients. 它使用相同的基础结构和 API 来创建应用程序,这些应用程序可与同一计算机系统上或驻留在另一家公司内并通过 Internet 访问的系统上的其他应用程序进行通信。The same infrastructure and APIs are used to create applications that communicate with other applications on the same computer system or on a system that resides in another company and is accessed over the Internet.
消息和终结点Messaging and Endpoints
WCF 基于基于消息的通信的概念,可作为消息建模的任何内容(例如 HTTP 请求或消息队列(也称为 MSMQ)消息)都可以在编程模型中以统一的方式表示。WCF is based on the notion of message-based communication, and anything that can be modeled as a message (for example, an HTTP request or a Message Queuing (also known as MSMQ) message) can be represented in a uniform way in the programming model. 这样,就可以在不同传输机制间提供一个统一的 API。This enables a unified API across different transport mechanisms.
此模型区分_客户端_(启动通信的应用程序)和_服务_(这些应用程序等待客户端与其通信并响应通信)。The model distinguishes between clients, which are applications that initiate communication, and services, which are applications that wait for clients to communicate with them and respond to that communication. 单个应用程序既可以充当客户端,也可以充当服务。A single application can act as both a client and a service. 有关示例,请参阅双工服务和对等网络。For examples, see Duplex Services and Peer-to-Peer Networking.
消息在终结点之间发送。Messages are sent between endpoints. _终结点_是发送或接收消息的位置,它们定义消息交换所需的所有信息。Endpoints are places where messages are sent or received (or both), and they define all the information required for the message exchange. 服务公开一个或多个应用程序终结点(以及零个或更多个基础结构终结点),而客户端生成一个与服务的其中一个终结点兼容的终结点。A service exposes one or more application endpoints (as well as zero or more infrastructure endpoints), and the client generates an endpoint that is compatible with one of the service’s endpoints.
终结点_以基于标准的方式描述消息应发送到的位置、消息的发送方式以及消息的外观。An endpoint describes in a standard-based way where messages should be sent, how they should be sent, and what the messages should look like. 服务可以公开此信息作为元数据,客户端可以处理这些元数据以生成相应的 WCF 客户端和通信_堆栈。A service can expose this information as metadata that clients can process to generate appropriate WCF clients and communication stacks.
通信协议Communication Protocols
通信堆栈中的一个必需元素是_传输协议_。One required element of the communication stack is the transport protocol. 可以使用常用传输协议(如 HTTP 和 TCP)通过 Intranet 和 Internet 发送消息。Messages can be sent over intranets and the Internet using common transports, such as HTTP and TCP. 也可以使用其他支持与消息队列应用程序和对等网络网格上的节点进行通信的传输协议。Other transports are included that support communication with Message Queuing applications and nodes on a Peer Networking mesh. 使用 WCF 的内置扩展点可以添加更多传输机制。More transport mechanisms can be added using the built-in extension points of WCF.
通信堆栈中的另一个必要元素是指定如何对任意给定消息进行格式化的编码。Another required element in the communication stack is the encoding that specifies how any given message is formatted. WCF 提供以下编码:WCF provides the following encodings:
-
文本编码,一种可互操作的编码。Text encoding, an interoperable encoding.
-
消息传输优化机制 (MTOM) 编码,该编码是一种可互操作的方法,用于高效地将非结构化二进制数据发送到服务或从服务接收这些数据。Message Transmission Optimization Mechanism (MTOM) encoding, which is an interoperable way for efficiently sending unstructured binary data to and from a service.
-
用于实现高效传输的二进制编码。Binary encoding for efficient transfer.
使用 WCF 的内置扩展点可以添加更多编码机制(例如,压缩编码)。More encoding mechanisms (for example, a compression encoding) can be added using the built-in extension points of WCF.
消息模式Message Patterns
WCF 支持多种消息传递模式,包括请求-答复、单向和双工通信。WCF supports several messaging patterns, including request-reply, one-way, and duplex communication. 不同传输协议支持不同的消息模式,因而会影响它们所支持的交互类型。Different transports support different messaging patterns, and thus affect the types of interactions that they support. WCF Api 和运行时还有助于安全可靠地发送消息。The WCF APIs and runtime also help you to send messages securely and reliably.
Новые значения по умолчанию для свойств транспортаNew Transport Default Values
В следующей таблице описываются измененные настройки и разделы, в которых можно найти дополнительные сведения.The following table describes the settings that have changed and where to find additional information.
| СвойствоProperty | ВключеноOn | Новое значение по умолчаниюNew Default | Дополнительные сведения см. в разделеFor more information see |
|---|---|---|---|
| channelInitializationTimeoutchannelInitializationTimeout | NetTcpBinding | 30 секунд30 seconds | ChannelInitializationTimeout |
| listenBackloglistenBacklog | NetTcpBinding | 12 * количество процессоров12 * number of processors | ListenBacklog |
| maxPendingAcceptsmaxPendingAccepts | ConnectionOrientedTransportBindingElementConnectionOrientedTransportBindingElementSMSvcHost.exeSMSvcHost.exe | 2 * количество процессоров для транспорта2 * number of processors for transport4 * число процессоров для SMSvcHost.exe4 * number of processors for SMSvcHost.exe | MaxPendingAccepts Настройка службы совместного использования портов Net.TCPMaxPendingAccepts Configuring the Net.TCP Port Sharing Service |
| maxPendingConnectionsmaxPendingConnections | ConnectionOrientedTransportBindingElementConnectionOrientedTransportBindingElement | 12 * количество процессоров12 * number of processors | MaxPendingConnections |
| receiveTimeoutreceiveTimeout | SMSvcHost.exeSMSvcHost.exe | 30 секунд30 seconds | Настройка службы совместного использования портов Net.TCPConfiguring the Net.TCP Port Sharing Service |
本节内容In this section
Windows Communication Foundation 4.5 的新增功能What’s New in Windows Communication Foundation 4.5讨论 Windows Communication Foundation 的新功能。Discusses features new to Windows Communication Foundation.
WCF 简化功能WCF Simplification Features讨论使编写 WCF 应用程序变得更简单的新功能。Discusses new features that make writing WCF applications simpler.
文档指南Guide to the DocumentationWCF 文档的描述A description of the WCF documentation
概念性概述Conceptual Overview概括介绍有关 Windows Communication Foundation (WCF) 消息传递系统以及对使用该系统提供支持的类的信息。Summarizes information about the Windows Communication Foundation (WCF) messaging system and the classes that support its use.
入门教程Getting Started Tutorial创建 WCF 服务和客户端的分步教程A step by step tutorial to create a WCF service and client
基本 WCF 编程Basic WCF Programming描述用于创建 Windows Communication Foundation 应用程序的基础。Describes the fundamentals for creating Windows Communication Foundation applications.
WCF 功能详细信息WCF Feature Details显示使你可以选择要使用的 WCF 功能或功能的主题。Shows topics that let you choose which WCF feature or features you need to employ.
扩展 WCFExtending WCF描述如何修改和扩展 WCF 运行时组件Describes how to modify and extend WCF runtime components
准则和最佳做法Guidelines and Best Practices提供用于创建 Windows Communication Foundation (WCF) 应用程序的准则。Provides guidelines for creating Windows Communication Foundation (WCF) applications.
管理和诊断Administration and Diagnostics介绍 WCF 的诊断功能Describes the diagnostic features of WCF
WCF 所需的操作系统资源Operating System Resources Required by WCF介绍 WCF 要求的操作系统资源Describes operating system resources required by WCF
安装问题疑难解答Troubleshooting Setup Issues为解决 WCF 设置问题提供指导Provides guidance for fixing WCF setup issues
从 .NET 远程处理迁移到 WCFMigrating from .NET Remoting to WCF比较 .NET 远程处理与 WCF,并提供常用方案的迁移指南。Compares .NET Remoting to WCF and provides migration guidance for common scenarios.
使用 WCF 开发工具Using the WCF Development Tools描述有助于开发 WCFservice 的 Visual Studio Windows Communication Foundation 开发工具。Describes the Visual Studio Windows Communication Foundation development tools that can assist you in developing your WCFservice.
Windows Communication Foundation 工具Windows Communication Foundation Tools描述旨在使创建、部署和管理 WCF 应用程序变得更加轻松的 WCF 工具Describes WCF tools designed to make it easier to create, deploy, and manage WCF applications
Windows Communication Foundation 示例Windows Communication Foundation Samples对 Windows Communication Foundation 的各方面进行说明的示例Samples that provide instruction on various aspects of Windows Communication Foundation
Windows Communication Foundation 术语表Windows Communication Foundation Glossary显示特定于 WCF 的术语的列表Shows a list of terms specific to WCF
常规参考General Reference本节描述用于配置 Windows Communication Foundation 客户端和服务的元素。The section describes the elements that are used to configure Windows Communication Foundation clients and services.
隐私信息Privacy Information有关 WCF 和隐私的信息Information regarding WCF and Privacy
Получение контракта службы, привязок и адресовObtain the Service Contract, Bindings, and Addresses
В WCF модели и клиенты моделируют контракты с помощью управляемых атрибутов, интерфейсов и методов.In WCF, services and clients model contracts using managed attributes, interfaces, and methods. Чтобы подключиться к службе в клиентском приложении, необходимо получить информацию о типе для контракта службы.To connect to a service in a client application, you need to obtain the type information for the service contract. Как правило, сведения о типе для контракта службы можно получить с помощью средства служебной программы метаданных ServiceModel (Svcutil.exe).Typically, you obtain type information for the service contract by using the ServiceModel Metadata Utility Tool (Svcutil.exe). Программа загружает метаданные из службы, преобразует их в управляемый вами язык и создает файл конфигурации клиентского приложения, который можно использовать для настройки объекта клиента WCF.The utility downloads metadata from the service, converts it to a managed source code file in the language of your choice, and creates a client application configuration file that you can use to configure your WCF client object. Например, если вы собираетесь создать клиентский объект WCF для вызова , и известно, что метаданные для этой службы опубликованы в , в следующем примере кода показано, как использовать Svcutil.exe для получения файла, содержащего контракт службы в управляемом коде.For example, if you are going to create a WCF client object to invoke a , and you know that the metadata for that service is published at , then the following code example shows how to use Svcutil.exe to obtain a file that contains the service contract in managed code.
Можно либо скомпилировать этот код контракта в клиентское приложение, либо в другую сборку, которую клиентское приложение затем может использовать для создания клиентского объекта WCF.You can either compile this contract code into the client application or into another assembly that the client application can then use to create a WCF client object. Можно использовать файл конфигурации, чтобы настроить объект клиента для правильного подключения к службе.You can use the configuration file to configure the client object to properly connect to the service .
Пример этого процесса см. в разделе как создать клиент.For an example of this process, see How to: Create a Client. Более полные сведения о контрактах см. в разделе контракты.For more complete information about contracts, see Contracts.
WebServiceHost и конечные точки по умолчанию.WebServiceHost and default endpoints
В Visual Studio 2010 WebServiceHost автоматически создавал конечную точку по умолчанию независимо от того, была она явно указана или нет.In Visual Studio 2010, WebServiceHost automatically created a default endpoint whether you explicitly specified an endpoint or not. В Visual Studio 2012 и более поздних версиях класс ServiceHost создает конечную точку по умолчанию только в том случае, если конечные точки явно не добавлены.In Visual Studio 2012 and later, WebServiceHost only creates a default endpoint if no endpoints are explicitly added. Если клиент ожидает конечную точку по умолчанию, можно явно добавить конечную точку и указать клиенту на нее.If your client is expecting the default endpoint you can explicitly add an endpoint and point the client to it. Кроме того, можно вернуть прежнее поведение WCF, добавив следующий параметр в файл конфигурации приложения.Alternatively, you can tell WCF to revert back to the previous behavior by adding the following setting to you application’s configuration file
Упрощенные сформированные файлы конфигурацииSimplified Generated Configuration Files
Клиентский файл конфигурации создается при добавлении ссылки на службу в Visual Studio или при использовании средства SvcUtil.exe.When you add a service reference in Visual Studio or use the SvcUtil.exe tool a client configuration file is generated. В предыдущих версиях WCF эти файлы конфигурации содержали значения каждого свойства привязки, даже если значение было значением по умолчанию.In previous versions of WCF these configuration files contained the value of every binding property even if its value is the default value. В WCF 4.5 сформированные файлы конфигурации содержат только те свойства привязки, которым присвоено значение не по умолчанию.In WCF 4.5 the generated configuration files contain only those binding properties that are set to a non-default value.
Далее приведен пример файла конфигурации, сформированного WCF 3.0.The following is an example of a configuration file generated by WCF 3.0.
Далее приведен пример того же файла конфигурации, сформированного WCF 4.5.The following is an example of the same configuration file generated by WCF 4.5.
Выставочные категории
Shorthair 1, Короткая шерсть 2 группа
Абиссинская Американский керл Американская короткошерстная Американская Wirehair Анатолийская Азиатская Бенгальская Бомбей Бразильская короткошерстная Британская короткошерстная Бурма Бурмилла Герман Рекс Девон рекс Донской сфинкс Египетская мау Европейская короткошерстная Канаани Картойзер Канадский сфинкс Корниш рекс Курильский бобтейл Карат Русская голубая Скотиш фолд Селкирк рекс Сингапурская Цейлонская Экзотическая короткошерстная Японский бобтейл
Semi-Longhair, Полудлинношерстная группа
Американский керл Ангорская Балинезийская Бирма Курильский бобтейл Мейн Кун Небелунг Невская маскарадная Норвежская лесная Ориентальная длинношерстная (мандарин) Рэгдол Силкирк Рекс Сибирская Сомали Турецкая ангора Турецкий ван Хайленд фолд Яванезийская Японский бобтейл
Longhair, Длинношерстная группа
*(если нет 15 представителей группы, то в эту же группу относят и экзотическую короткошерстную) Колор-пойнт Персидская
Diğer Microsoft teknolojileriyle WCF tümleştirmesiWCF Integration with Other Microsoft Technologies
WCF, esnek bir platformdur.WCF is a flexible platform. Bu aşırı esneklik nedeniyle, WCF diğer birçok Microsoft ürününde de kullanılır.Because of this extreme flexibility, WCF is also used in several other Microsoft products. WCF temel bilgilerini öğrenerek, bu ürünlerden herhangi birini de kullanıyorsanız, hemen avantajınız vardır.By understanding the basics of WCF, you have an immediate advantage if you also use any of these products.
WCF ile eşleştirmeye yönelik ilk teknoloji Windows Workflow Foundation (WF) idi.The first technology to pair with WCF was the Windows Workflow Foundation (WF). İş akışları, iş akışındaki adımları «Etkinlikler» olarak kapsülleyerek uygulama geliştirmeyi basitleştirir.Workflows simplify application development by encapsulating steps in the workflow as «activities.» Windows Workflow Foundation ilk sürümünde, bir geliştiricinin iş akışı için bir konak oluşturması gerekiyordu.In the first version of Windows Workflow Foundation, a developer had to create a host for the workflow. Windows Workflow Foundation sonraki sürümü WCF ile tümleştirildi.The next version of Windows Workflow Foundation was integrated with WCF. Bu, herhangi bir iş akışının bir WCF hizmetinde kolayca barındırılmasına izin verilir.That allowed any workflow to be easily hosted in a WCF service. Bunu, Visual Studio 2012 veya sonraki sürümlerde WF/WCF proje türünü otomatik olarak seçerek yapabilirsiniz.You can do this by automatically choosing the WF/WCF project type in Visual Studio 2012 or later.
Microsoft BizTalk Server R2 Ayrıca WCF ‘yi bir iletişim teknolojisi olarak kullanır.Microsoft BizTalk Server R2 also utilizes WCF as a communication technology. BizTalk, verileri standartlaştırılmış bir biçimden diğerine alıp dönüştürmek üzere tasarlanmıştır.BizTalk is designed to receive and transform data from one standardized format to another. İletiler, iletinin katı eşleme kullanılarak veya iş akışı altyapısı gibi BizTalk özelliklerinden biri kullanılarak dönüştürülebileceği merkezi ileti kutusuna teslim alınmalıdır.Messages must be delivered to its central message box where the message can be transformed using either a strict mapping or by using one of the BizTalk features such as its workflow engine. BizTalk, ileti kutusuna ileti teslim etmek için artık WCF Iş kolu (LOB) bağdaştırıcı kullanabilir.BizTalk can now use the WCF Line of Business (LOB) adapter to deliver messages to the message box.
Microsoft Silverlight, geliştiricilerin medya yoğun Web siteleri (örneğin, akış videosu) oluşturmalarına olanak tanıyan, birlikte çalışabilen zengin Web uygulamaları oluşturmaya yönelik bir platformdur.Microsoft Silverlight is a platform for creating interoperable, rich Web applications that allow developers to create media-intensive Web sites (such as streaming video). Sürüm 2 ‘ den başlayarak, Silverlight, Silverlight uygulamalarını WCF uç noktalarına bağlamaya yönelik bir iletişim teknolojisi olarak WCF ‘yi içerir.Beginning with version 2, Silverlight has incorporated WCF as a communication technology to connect Silverlight applications to WCF endpoints.
Windows Server AppFabric uygulama sunucusunun barındırma özellikleri, iletişim için WCF kullanan uygulamaları dağıtmak ve yönetmek için özel olarak tasarlanmıştır.The hosting features of Windows Server AppFabric application server are specifically designed for deploying and managing applications that use WCF for communication. Barındırma özellikleri, WCF özellikli uygulamalar için özel olarak tasarlanmış zengin araç ve yapılandırma seçeneklerini içerir.The hosting features include rich tooling and configuration options specifically designed for WCF-enabled applications.
Настройка и обеспечение безопасности клиентовConfiguring and Securing Clients
Настройка клиента начинается с обязательной загрузки информации о целевых конечных точках для клиента или объекта канала, как правило, из файла конфигурации, хотя эту информацию также можно загрузить программными средствами с использованием конструкторов и свойств клиента.Configuring a client starts with the required loading of target endpoint information for the client or channel object, usually from a configuration file, although you can also load this information programmatically using the client constructors and properties. Однако для включения определенного поведения клиента и для большинства сценариев безопасности требуются дополнительные этапы конфигурации.However, additional configuration steps are required to enable certain client behavior and for many security scenarios.
Например, требования безопасности для контрактов службы объявлены в интерфейсе контрактов службы, и если Svcutil.exe создал файл конфигурации, этот файл обычно содержит привязку, которая может поддерживать требования безопасности службы.For example, security requirements for service contracts are declared in the service contract interface, and if Svcutil.exe created a configuration file, that file usually contains a binding that is capable of supporting the security requirements of the service. Однако в некоторых случаях может потребоваться более точная конфигурация безопасности, например настройка учетных данных клиента.In some cases, however, more security configuration may be required, such as configuring client credentials. Полные сведения о настройке безопасности для клиентов WCF см. в разделе Защита клиентов.For complete information about the configuration of security for WCF clients, see Securing Clients.
Кроме того, можно включить некоторые пользовательские изменения в клиентские приложения, такие как пользовательское поведение во время выполнения.In addition, some custom modifications can be enabled in client applications, such as custom run-time behaviors. Дополнительные сведения о настройке пользовательского поведения клиента см. в разделе Настройка поведения клиента.For more information about how to configure a custom client behavior, see Configuring Client Behaviors.