Here we take an example by which we can understand some of these.
- In Configuration File: We can define our WCF service in web.config file, here we specify a lot of things regarding the attributes and behavior of the service. And if we want to change something in the web.config file, it is not necessary to recompile this again and again.
<?xml
version="1.0"?>
<configuration>
<system.serviceModel>
<services>
<service
name="Service"
behaviorConfiguration="ServiceBehavior">
<endpoint
address=""
binding="wsHttpBinding"
contract="IService">
<identity>
<dns
value="localhost"/>
</identity>
</endpoint>
<endpoint
address="mex"
binding="mexHttpBinding"
contract="IMetadataExchange"/>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior
name="ServiceBehavior">
<serviceMetadata
httpGetEnabled="true"/>
<serviceDebug
includeExceptionDetailInFaults="false"/>
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
</configuration>

Dhaval PatelPosted Apr 24, 2012, 2:05 AM
if is it possible to call Json through wcf service??