.NET Framework 3.0 introduces new and exciting feature i.e. Windows Communication Foundation (WCF), where as earlier versions of the framework were containg ASP.NET Web Services only.
In this Post I would be mainly comparing the WCF with ASP.NET Web Service
| Windows Communication Foundation (WCF) | ASP.NET Web Service |
| WCF supports multiple bindings HTTP, WSHTTP, TCP, MSMQ. | ASP.NET Web Services supports only HTTP binding. |
| WCF supports Atomic Transactions*. | ASP.NET Web Services does not support Atomic Transactions*. |
| By default WCF uses SOAP for sending and receiving the messages. But WCF can support any kind of message format not only SOAP. | ASP.NET Web Services can send and receive messages via the SOAP only. |
| The System.Runtime.Serialization.DataContract and System.Runtime.Serialization.DataMember attributes of the WCF’s System.Runtime.Serialization assembly can be added for .NET types to indicate that instances of the type are to be serialized into XML, and which particular fields or properties of the type are to be serialized. | ASP.NET Web Services uses XmlSerializer to translate the XML data (Message Send or received) into .NET objects. |
* Atomic Transactions
Following example describes that what does it mean by Atomic Transactions
Consider that bank A and bank B want to interact with someone’s account at the same time. Both banks want to withdraw from the account and the account has $10.00 in it. If bank A takes $7.00 and at the same time bank B tries to get $5.00, what will happen? When they start the transaction each bank believes there is $10.00 available in the account. When one of them finishes the other one will find there is not enough money to finish the transaction.
This scenario is common for computer systems and you can see it many times in memory management, IO operations and database interactions.
Atomic transactions are a way to avoid this problem. They simply lock on a transaction and do not allow any other transaction to interact with the resource. If anything fails during the Atomic transaction, everything will return to the state before the transaction started.
Hi Ashish,
I have hosted wcf service in IIS 5.1,
When I access wcf service from another system,I t gives me following exception
SOAP security negotiation with ‘http://myserver/Service1.svc’ for target ‘http://myserver/Service1.svc’ failed
waiting for your reply
thanx
Hello Davy,
Can you please tell that which OS you are using? It is VISTA?
Thanks and Regards..
Ashish
I am using windows XP with service pack-2
Hello Davy,
Try the link http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/7e61dbf2-3e15-4a1e-a5ea-ac0e60daac3a
I hope you may get the solution.
Please let me know if you are not able to resolve.
Thanks and Regards…
Ashish Tripathi