How to choose between ASP .NET Web Services and .NET Remoting?

Subscribe to the Technacular RSS feed  RSS Feed or by Email and receive free daily updates

.NET framework supports two distributed programming models:

  • ASP .NET Web Services
  • .NET Remoting

There is a lot of confusion among developers as to when to use what. I recently came across a very nice article on MSDN which tried to answer the very same question. I will try to extract out the important points from that article for our users.

The clients of ASP.NET Web services do not have to know anything about the platform, object model, or programming language used to build them. The services themselves don’t have to know anything about the clients that are sending them messages. The only requirement is that both parties agree on the format of the SOAP messages being produced and consumed, as defined by the Web service’s contract definition expressed using WSDL and XML Schema (XSD). This in short means that the client can be written using Java. Perl or any other language. .NET Remoting provides much richer support for objects but the client needs to be built using .NET also. this ties it up, as it can only work with .NET applications.

  • The key difference between ASP.NET Web services and .NET Remoting is in how they serialize data into messages and the format they choose for metadata. ASP .NET Web Services use XmlSerializer which cannot marshal lot of things (e.g. hashtables) but .NET Remoting relies on the pluggable implementations of the IFormatter interface used by the System.Runtime.Serialization engine to marshal data to and from messages. There are two standard formatters, System.Runtime.Serialization.Formatters.Binary.BinaryFormatter and System.Runtime.Serialization.Formatters.Soap.SoapFormatter. As a result it supports all data types and handles complex object graphs really well.
  • The only transport protocol associated with ASP .NET Web Services in HTTP but .NET Remoting supports both HTTP and TCP.
  • Some performance statistics:

Performance stats

In nutshell, if you application needs interoperability with other platforms or operating systems, you would be better off using ASP.NET Web services, as they are more flexible (wider reach). On the other hand, use .NET Remoting when you need the richer object-oriented programming model but it has narrower reach.

Popularity: 4% [?]

Bookmark and Share: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • del.icio.us
  • digg
  • DZone
  • Furl
  • Reddit
  • Spurl
  • Technorati
  • IndianPad
  • StumbleUpon

Related Posts

  • ClearForest Semantic Web Services (SWS)
  • Microsoft Excel 2007 math bug and how to fix it
  • Collection of free web directory scripts
  • Portal Wars in India: Sify Sues Yahoo Inc.
  • Write a comment:

    Technology Blogs - Blog Top Sites Blog Flux Directory Blogarama - The Blog Directory BuzzBums Technology blogs Technology blogs blog search directory
    Dreamsubmitting Directory Free Link Directory