Aim:-Demonstrate using the Binding Attribute of an endpoint element in WCF.

preview_player
Показать описание
Aim:-Demonstrate using the Binding Attribute of an endpoint element in WCF.

Create a new project...
Select the WCF library and rename it..
Keep everything as it is and open Appconfig file and erase every data and delete the following code.

Add these code...

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<compilation debug="true">
</compilation>
<behaviors>
<serviceBehaviors>
<behavior name="NewBehavior">
<serviceDebug />
<serviceMetadata />
</behavior>
</serviceBehaviors>
</behaviors>
<services>
<service behaviorConfiguration="NewBehavior" name="myWCF.Service1">
<endpoint address="" binding="netTcpBinding" bindingConfiguration="" name="tcp" contract="myWCF.IService1" />
<endpoint address="mex" binding="mexTcpBinding" bindingConfiguration="" name="mextcp" contract="IMetadataExchange" />
<host>
<baseAddresses>
</baseAddresses>
</host>
</service>
</services>
</configuration>

Note: In Name and Contract attribute write the name of your wcf application

Build and run the program.
Рекомендации по теме
welcome to shbcf.ru