Monday, 30 April 2012

Fundamentals of WCF | WCF Fundamentals | WCF Tutorial for Beginners | End Point in WCF

Hi friends,in this article i will explain about Fundamentals of WCF or WCF Fundamentals or WCF Tutorial for Beginners or End Point in WCF
Fundamentals of WCF:
Hi Friends, In this article I will explain about the some fundamentals of WCF,
There are

End Point:
Every WCFservice is a program that is a collection of End Points. Each End Point is a portal for communicating with the application.
End Point consists of 3 components.
  • Address
  • Binding
  • Contract
Address:
 Basically the URL is like the below URL when we run the WCF service and we use this URL to connect with the service.
Binding:
Binding represents the how the client is communicating with the service.
There are different protocols for WCF to communicate with the client.
We can mention the protocol type based on the requirements.


Binding
Description
BasicHttpBinding
Basic Web service communication. No security by default
WSHttpBinding
Web services with WS-* support. Supports transactions
WSDualHttpBinding
Web services with duplex contract and transaction support
WSFederationHttpBinding
Web services with federated security. Supports transactions
MsmqIntegrationBinding
Communication directly with MSMQ applications. Supports transactions
NetMsmqBinding
Communication between WCF applications by using queuing. Supports transactions
NetNamedPipeBinding
Communication between WCF applications on same computer. Supports duplex contracts and transactions
NetPeerTcpBinding
Communication between computers across peer-to-peer services. Supports duplex contracts
NetTcpBinding
Communication between WCF applications across computers. Supports duplex contracts and transactions
Contract:
There are collection of operations specify the how end point communicate with outside world. In WCF name of the interface is mentioned in the contract, So the client application will be know about the operations .
Example:
Endpoints will be mentioned in the web.config file on the created service.

<?xml version="1.0"?>
<configuration>
  <system.web>
    <compilation debug="true" strict="false" explicit="true" targetFramework="4.0" />
  </system.web>
  <system.serviceModel>
    <services>
      <service name="MathService"
        behaviorConfiguration="MathServiceBehavior">
        <endpoint
          address="http://localhost:9080/Service1.svc" contract="IMathService"
           binding="wsHttpBinding"/>
      </service>
    </services>
    <behaviors>
      <serviceBehaviors>
        <behavior>
          <!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
          <serviceMetadata httpGetEnabled="true"/>
          <!-- To receive exception details in faults for debugging purposes, set the value below to true.  Set to false before deployment to avoid disclosing exception information -->
          <serviceDebug includeExceptionDetailInFaults="false"/>
        </behavior>
      </serviceBehaviors>
    </behaviors>
    <serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
  </system.serviceModel>
  <system.webServer>
    <modules runAllManagedModulesForAllRequests="true"/>
  </system.webServer> 
</configuration>

Click on below links for the remaining fundamentals.
"If you like my blog or articles, you can appreciate by leaving your comments or Liking my Facebook pageAspdotnet-kishore, following on Google+ Aspdotnet-Kishore, Twitter  on AspdotnetKishore, Linked in Aspdotnet-Kishore, stumbling my posts on stumble upon and subscribing on  RSSfeed Aspdotnet-Kishore for free updates directly to your Email inbox . Watch my blog  for more articles." 

No comments:

Post a Comment

© 2012-2014 Aspdotnet-Kishore.blogspot.com. All Rights Reserved.
The content is copyrighted to Kishore and may not be reproduced on other websites without permission from the owner.