7. ASP .NET web service WCF web service Solely made for building Web service Provides tools for use in any circumstances for s/w entities to communicate Support sending message via HTTP Support formats like HTTP, TCP, named pipes, Microsoft Message Queuing More rich facilities for deploying and managing applications Configuration system Addition to Config system, Config editor, Activity tracing, trace viewer, message logging, a vast no. of performance counters, support for Windows Management Instrumentation
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
Notas del editor
The Windows Communication Foundation (or WCF) is an application programming interface (API) in the .NET Framework for building connected, service-oriented applications.
Reference: http://msdn.microsoft.com/en-us/library/aa480155.aspx Trace viewer is a utility to easily navigate through WCF service call log files. Trace viewer provides details about different parameters of WCF servoce call for ex: request, response, exception etc. Config editor allows to configure different options in a config file for WCF services using UI.
Difference between asmx and wcf http://www.aspdotnetarchitect.com/post/WCF-versus-ASMX-services.aspx
Service Contract : Describes which operation the client can perform on the– This attribute is used to define the method inside the interface. service. There are two types of Service Contracts. The Service contract – The attribute is used to define the interface. Operation Contract Data Contract : Which data types are passed to and fro from the service. WCF defines implicit contracts for built in types such as int and string, but we can easily define explicit opt – in data contracts of custom types. There are 2 types of Data Contract. Data Contract- attribute used to define the class. Data Member – attribute used to define the properties If a DataMember attributes are not specified for a properties in the class, that property can’t be passed to-from web service Fault Contracts – Define which errors are raised by the service, and how the service handles and propagates errors to its client. Message Contracts – Allow the service to interact directly with the messages. Message contract can be typed or untyped.
* If a developer is using VSTS as his/her development platform by default the web.config template that is generated has the metadata enabled in it by default. It even tells you to avoid exposing the metadata.
WCF publishes MEX with a /MEX request. This can be done by a POST request with a /MEX endpoint. WSDiscovery which released with version 4 also helps in discovering the endpoints. This works like all the services that become up or down broadcast over UDP with a hello or bye message. WSDiscovery intercepts these messages to identify whether the servoces are up or not. There are 2 communication mode for this :Adhoc and Managed mode. The difference is in the managed mode there is a central repository which keeps a log of all these helo and bye UDP requests