Monday, February 8, 2010

.Net Remoting IQ-PART-1

Define windows process

Answer - A process is an instance of a running application.
Each process is allocated its own block of available RAM space.
No process can access another process code or data.
If the process crashes, it dies alone without taking the entire OS or a bunch of other applications down.

Define channels in .NET Remoting

Answer - Channels represent the objects that transfer the other serialized objects from one application domain to another and from one computer to another, as well as one process to another on the same box.
A channel must exist before an object can be transferred.

What security means available for .NET Remoting in System.Runtime.Remoting?

Answer - None. Security should be taken care of at the application level.
Cryptography and other security techniques can be applied at application or server level.

What is a formatter in .Net Remoting?

Answer - A formatter is an object that is responsible for encoding and serializing data into messages on one end, and deserializing and decoding messages into data on the other end.

.NET Remoting and Web services.

Answer - Use remoting for more efficient exchange of information when you control both ends of the application.
Use Web services for open-protocol-based information exchange when you are just a client or a server with the other end belonging to someone else.

Name the distributed systems available apart from .Net Remoting.

Answer - Distributed Computing Environment/Remote Procedure Calls (DEC/RPC),
Microsoft Distributed Component Object Model (DCOM),
Common Object Request Broker Architecture (CORBA), and
Java Remote Method Invocation (RMI).

How do you implement distributed applications in .NET?

Answer - .NET Remoting and ASP.NET Web Services.
Classes for the same are in System.Runtime.Remoting and System.Web.Services.

Define proxy in .NET Remoting.

Answer - Its a fake copy of the server object that resides on the client side and behaves as if it was the server.
It handles the communication between real server object and the client object.
This process is also known as marshaling.

Define remotable objects in .NET Remoting.

Answer - Remotable objects are the objects that can be marshaled across the application domains.
You can marshal by value, where a copy of the object is created and then passed to the receiver.
You can also marshal by reference, where just a reference to an existing object is passed.

Define SingleCall activation mode in .Net Remoting.

Answer - If the server object is instantiated for responding to just one single request, the request should be made in SingleCall mode.

Define Singleton activation mode in .Net Remoting.

Answer - A single object is instantiated regardless of the number of clients accessing it.
Lifetime of this object is determined by lifetime lease.

Define the lease of the object.

Answer - By implementing ILease interface when writing the class code.

.NET Remoting versus Distributed COM

.NET Remoting is the successor of DCOM. Microsoft DCOM is a solution for distributed object and very good in terms of performance when components are in the same network. But its drawbacks in the internet connected world are visible. It uses proprietary binary protocol which is not supported by other object models, thus can't support interoperability across platform.
.NET Remoting uses TCP or HTTP protocol that is supported by most of the object models. This allows .NET Remoting to be adaptable to the network environment in which it is being used.

Advantage of Remoting over Web Services

Answer - .NET Remoting allows objects to interact that can be hosted in different application domain within the same process or different process. The objects can also interact over intranet or internet. It supports many different protocols unlike Web Services that works over SOAP/HTTP protocol. .Net Remoting can work on TCP protocol that provides speed benefit from its counterpart.
Being tied up with IIS, .Net Web service can only work with producer /consumer model whereas .Net Remoting can share objects from any type of application. .Net Remoting being part of .Net Framework support full .Net type system and can expose any object to the client. .Net Web Service supports on those types that can be expressed with XSD.

When should we choose .Net Remoting over .Net Web Services?

Answer - .Net Remoting provides distributed solution for a corporate use. So, if you need distributed environment to be implemented for internal use, .Net remoting is the best choice.

If you require a faster distributed solution, .Net Remoting with TCP protocal using binary format is faster than Web services. .Net Remoting is better solution when large transfer of data is required. Web Services provide an open-protocol-based exchange of information. Web Services are best when you need to communicate with an external organization or non .NET technology.

What are the ways to configure Remoting objects before client can use them?

Answer - There are two ways that the remoting objects can be configured. They can be configured by calling configuration methods inside the application. .Net Framework allows configuring objects also by adding configuration section in the application configuration file or machine.config file. Application-level XML settings take precedence over machine.config. When you apply any change in the configuration section, you don’t need to recompile the code. On the other hand, any change in the setting applied programmatically would require recompiling the code.

Define Delegates.

Answer - A delegate acts like a strongly type function pointer. Delegates can invoke the methods that they reference without making explicit calls to those methods. It is type safe since it holds reference of only those methods that match its signature. Unlike other classes, the delegate class has a signature. Delegates are used to implement event programming model in .NET application. Delegates enable the methods that listen for an event, to be abstract.

Define Events.

Answer - Events are one of the members of the class. When any noteworthy activity occurs in the application, an event is raised which sends out the message to the other part of the application which handles the event. The event can carry arguments that contain information about the event. The method which handles the event must have the same signature as the event itself. Events are commonly used in the applications with graphical user interface elements such as buttons, textbox etc. An event is triggered when any action such as mouse click occurred in the interface element. The event-based programming model can be used in the non-GUI applications such as .NET Remoting application. An event in remoting.net occurs when the state of the application changes.

.Net Remoting IQ-PART-2

What is asynchronous programming?

Answer - .Net Remoting supports asynchronous programming. In this model, a call is made to a class method while the calling program continues to execute. This increase application speed as the application continues to execute without waiting for the called methods to finish execution.

When do we use delegates in your remoting applications?

Answer - You use delegates to implement callback functions, event programming, and asynchronous programming in your remoting applications. Events use delegates to enable callback functions to the client in remoting applications.

What are the ways to renew lifetime leases of objects?

Answer - A client can renew the lifetime lease of an object by calling the ILease.Renew method.

What are the types of remotable objects?

Answer - The two types of remotable objects are

Marshal-by-value objects - These objects are copied and passed by value out of the application domain. When client calls a method on marshal-by-value-object, the remoting system creates a copy of this object and passes the copy to the client application domain. The copy hence received can handle any method call in client domain. Using Marshal-by-value-object reduces resource consuming trip across network.

Marshal-by-reference objects - The clients that use these objects need a proxy to access the object remotely. When client calls a method on Marshal by reference object, the remoting system create proxy object in the caller application that contains the reference of all method and properties of the object.

What are the Security features in .Net Remoting.

Answer - .Net Remoting is integral part of .Net Framework, so it has access to all security features of Framework. If remoting objects are hosted using IIS, it leverages the entire authentication and authorization features that are available to Web based protocols. If hosted other than HTTP protocols over IIS, then you have the opportunity to create your own security infrastructure.

What are the information required to configure remote objects?

Answer - Following information to be provide to configure remote object.

Activation type for the remote object
Channels
URL of the remote object
Type metadata of the remote object

Explain Serialization Formatters in .NET Remoting.

Answer - In .Net Remoting, the objects are shared over distributed network. The objects are transmitted in serialized form. The objects are first serialized into message data before it is sent with the wire. On the other end of the wire, this serialized data is read and desterilized back to the actual object. This process of converting objects into message data is done by serialization formatters. .Net Remoting supports two formatters.
SOAP Formatter
Binary Formatter
SOAP Formatter converts objects into XML string whereas Binary Formatter converts an object's state into a binary stream. The binary serialization formatter is slightly faster.

What are the requirements to enable remote components to interact each other?

Answer - To enable communication between objects across remoting boundaries, you need to have
A server object to expose service
A client that calls server object to consume service
A message transmission protocol

Steps to publish an object outside the service domain.

Answer - To publish a service outside the service domain, you need to:

Identify the application domain that will host the service.
Identify the activation model: server activation or client activation.
Identify and create a channel and a port.
Identify how the client application obtains the metadata information about the service.

Define Client Activated Objects (CAO).

Answer - Client-activated objects are objects whose lifetimes are controlled by the client, i.e. calling application domain. This mode works in similar fashion to the model where object is local to the client and referenced object's lifetime is controlled by the calling object. When instance of server object is created, object reference is obtained in the form of proxy.

In COM model, clients hold an object in memory by holding a reference to it. The object is released from the memory when the entire client releases the reference. But in .Net Remoting, client-activated objects use lifetime leases to determine how long they should continue to exist. When a client creates a remote object, it can specify a default length of time that the object should exist. If the remote object reaches its default lifetime limit, it contacts the client to ask whether it should continue to exist, and if so, for how much longer. If the client is not currently available, a default time is also specified for how long the server object should wait while trying to contact the client before marking itself for garbage collection. The client might even request an indefinite default lifetime. Client-activated instances serve only the client and the reference that was responsible for their creation.

To create an instance of a client-activated type, clients either configure their application programmatically or using a configuration file and call new, or they pass the remote object's configuration in a call to Activator.CreateInstance.

Explain Marshalling and its types in .Net Remoting.

Answer - Objects can't be transmitted as such over communication channel. The objects are packed into message buffer before transmitted. This process is called marshalling. There are two different ways to Marshal objects

Marshal by Value: Server creates copy of the remoting object's state and passes it to the client. You need to implement your classes to have marshal by value features either by implementing ISerializable interface or using attribute. Here you need to copy whole object to the client which means with large size object, the communication overhead is significant.

Marshal by Reference: In this type proxy is created by the reference of the server objects. Class must extend the System.MarshalByRefObject to implement marshal by reference. Here, client keeps server object reference which means round trip to server with each method call.

Summary of .Net Remoting

.Net enables interaction between applications over distributed network.

To develop a Remoting application, you need to create client and server objects. You need to activate the objects and use reference of the server objects in client to communicate.

Channels allow application to send and receive messages using protocal like TCP or HTTP.

You can use delegates in Remoting application to implement event based programming and asynchronous programming.

Asynchronous programming in Remoting application helps to calls remote methods while client continues to execute other local method.

To host remote object, server needs some information about the objects.

The information can be provided programmatically in the code or can be loaded from configuration section of application configuration file or machine.config file.

Being part of .Net Framework, .Net Remoting can implement role based security. Moreover, it can leverage all security features of ASP.NET, if it hosted in ASP.NET.

What is .Net Remoting?

.Net Remoting enables communication between applications across separate domains or networks. .Net objects are exposed to remote processes to have interprocess communication. With remoting, we can use TCP or HTTP communications protocols on any port. We can use text or binary formatting. .Net Remoting supports server activated (single call and singleton) as well as client activated objects.

Describe the .Net Remoting Architecture.

.Net Remoing allows communication between server and client objects. To facilitate this, when new instance of remote object is created in the client application, the client receives reference (called proxy) to the server object. This proxy object contains references to all the methods and properties of the server object. When the client object calls any method (the call actually on proxy object), which resolves the references and invokes server object, receives the result and pass on to the client application.

What are the remotable and non-remotable objects in .Net Remoting.

The remotable objects are the objects which can be distributed accross domains, can be used with domain. The non-remotable objects are the objects which can't be distributed accross domains. In distributed system, if an object is very big, we can make it non-remotable object.

Describe the type of remotable objects in .Net Remoting.

Marshal-by-value-objects - When client calls a method on marshal-by-value-object, the remoting system creates a copy of this object and passes the copy to the client application domain. The copy hence received can handle any method call in client domain. Using Marshal-by-value-object reduces resource consuming trip across network.
Marshal-by-reference-object - When client calls a method on Marshal by reference object, the remoting system create proxy object in the caller application that contains the reference of all method and properties of the object.

What is the difference between XML Web Services using ASMX and .NET Remoting using SOAP?

  • XML Web services are more restricted than objects exposed over .NET Remoting.
  • XML Web services support open standards that target cross-platform use.
  • XML Web services are generally easier to create and due to the restricted nature of XML Web services, the design issues are simplified.
  • XML Web services support only SOAP message formatting, which uses larger XML text messages.
  • Communication with .NET Remoting can be faster than XML Web service communication with a binary formatter.
  • XML Web services are designed for use between companies and organizations.
  • XML Web services don't require a dedicated hosting program because they are always hosted by ASP.NET.
  • Consumers can use XML Web services just as easily as they can download HTML pages from the Internet. Thus there's no need for an administrator to open additional ports on a firewall as they work through MS-IIS and ASP.NE

Remoting.Net vs Web Services

Both .Net Web services and .Net Remoting are Microsoft solutions for distributed application. Before choosing one of them for application development, let’s identify the differences between these technologies.

Protocol
.Net web services can be accessed only over HTTP whereas .Net remoting can be accessed over any protocol including TCP, HTTP, or SMTP.

Performance
In terms of performance, .Net remoting is faster than its counterpart web service when it uses TCP channel with binary formatter. But if you use soap formatter in .net remoting, web services with soap formatter either with TCP or HTTP channel provides faster solution.

Security
.NET Remoting can be hosted either in IIS or in other container. If hosted in IIS, .NET Remoting can benefit all security advantages of IIS. But when hosted other than IIS, the application has to take care security aspect itself.
On the other hand, .Net web services are hosted in IIS, by default. So, it leverages all features of security provided by IIS.

State Management
Web services are a stateless in nature like web application. You need to use state mechanism to retain state. You can use session or application object to maintain state. In .Net Remoting, Singleton objects can share state whereas if you don’t need to maintain state, you can use Singlecall objects.

Interoperability
Web services support heterogeneous environments which means client and remote object can be built in any platform.
.NET remoting requires the client be built using .NET, enforcing homogenous environment.

Reliability
Since .Net web services are hosted using IIS, they are reliable whereas .Net remoting application needs to maintain security on its own if not hosted using IIS. When hosted in IIS, .Net remoting is also as reliable as web services.

Ease of development
Create and consuming .Net web services are easier process. To create remoting object, you need create remote object, hosting application to host remoting object and configuration file to specify type of channel and formatter to be used by remoting object.

Asynchronous Programming in remoting Application

.Net Remoting supports asynchronous programming. In this model, a call is made to a class method while the calling program continues to execute. This increases application speed as the application continues to execute without waiting for the called methods to finish execution.

Asynchronous Programming in remoting Application

There are two ways that the remoting objects can be configured. They can be configured by calling configuration methods inside the application. .Net Framework allows configuring objects also by adding configuration section in the application configuration file.
When you apply any change in the configuration section, you don’t need to recompile the code. On the other hand, any change in the setting applied programmatically would require recompiling the code.

Remoting system requires certain information about remote objects to be hosted which are as follows

Activation type
Channels
URL of the remote object
Type metadata

.Net Framework provides RemotingConfiguration class in the System.Runtime.Remoting namespace that allows configuring object programmatically.

In .Net, you can have configuration setting in the application configuration file or in the machine.config file. You can use RemotingConfiguration.Configure method to load the setting in the code, e.g.

RemotingConfiguration.Configure("AppConfig.exe.config")

The configuration attributes in the XML configuration file of the application are below.


This element contains the information about the remote objects.

This element contains the remote object.

This element has three attribute such as mode, type, and objectUri. Mode can be Singleton or SingleCall. Type is the name of the assembly that contains type implementation. ObjectUri specifies the endpoint for the URI of an object.

This element contains information about the client-activated objects that are exposed by the application.

Events and Delegates in Remoting Applications

Events are one of the members of the class. When any noteworthy activity occurs in the application, an event is raised which sends out the message to the other part of the application which handles the event. The event can carry arguments that contain information about the event. The method which handles the event must have the same signature as the event itself. Events are commonly used in the applications with graphical user interface elements such as buttons, textbox etc. An event is triggered when any action such as mouse click occurred in the interface element. The event-based programming model can be used in the non-GUI applications such as .NET Remoting application. An event in remoting.net occurs when the state of the application changes.

A delegate acts like a strongly type function pointer. Delegates can invoke the methods that they reference without making explicit calls to those methods. It is type safe since it holds reference of only those methods that match its signature. Unlike other classes, the delegate class has a signature. Delegates are used to implement event programming model in .NET application. Delegates enable the methods that listen for an event, to be abstract.

Steps to implement delegate to listen for events in the remoting application

Define a delegate that wraps an event handler method to handle the event.
Implement a class that raises the event.
Implement class that handles the event

.Net Remoting Channels

Channels are the objects that remote objects use to communicate with each other. It allows applications to send and receive messages using protocols such as TCP and HTTP. It is a message carrier that converts the message in either as XML or binary format before sending message across boundary.

In .Net Framework, channel's classes and interfaces are included in System.Runtime.Remotig.Channels namespace. A channel needs to be registered to the remoting system infrastructure both at client and server side before it receives or send data.

Based on the protocol used by the channel, you have
HTTPChannel
TCPChannel

HTTPChannel

.Net Framework provides System.Runtime.Remoting.Channels.http namespace that provides classes to use HTTPChannel. You can use HTTPChannel when interoperability is the main issue. HTTPChannel uses SOAPformatter to serialize messages into XML format before sending messages.

TCPChannel

.Net Framework provides System.Runtime.Remoting.Channels.tcp namespace that provides classes to use TCPChannel. This kind of channel is used when performance is main issue. TCPChannel uses BinaryFormatter to serialize messages into binary stream before sending messages.

.Net Remoting Overview

Distributed application is a set of components distributed across network and work as if all the components are there on the same computer. These components based technologies can be developed using DCOM, CORBA, RMI etc. These technologies are good for intranet environment.

Microsoft has provided suitable framework for developing distributed application through .Net Remoting and Web Services. Remoting.net allows components to interact across application domains, processes, and machine boundaries. It enables your applications to take advantage of remote resources in a networked environment.

Web Services are best suited when clients outside the firewall calling components on the server over the Internet.

Remoting.Net is the best solution when clients and components are inside the firewall. It requires the client to be built using .NET which means it can’t work in heterogeneous environments.

.Net Remoting uses channels (HTTP and TCP channels) to transport messages to and from remotable objects. The HTTP channel uses the SOAP protocol to transport messages which means all messages are serialized to XML. The TCP channel uses a binary stream to transport the messages.

.Net Remoting supports two activation modes: Singleton and SingleCall. Singleton mode allows only one instance of an object at any time which means all requests are serviced by the single instance. You can maintain state across each request using this mode. SingleCall Mode creates a new instance of the object for each client request and are stateless.

.NET Remoting when hosted with IIS, can use all the security features of ASP.NET. But you need to implement your own security features for the application if channel is hosted in the process other than aspnet_wp.exe.

What is .Net Remoting?

.Net Remoting enables communication between applications across separate domains or networks. .Net objects are exposed to remote processes to have interprocess communication. With remoting, we can use TCP or HTTP communications protocols on any port. We can use text or binary formatting. .Net Remoting supports server activated (single call and singleton) as well as client activated objects.

Describe the .Net Remoting Architecture.

.Net Remoing allows communication between server and client objects. To facilitate this, when new instance of remote object is created in the client application, the client receives reference (called proxy) to the server object. This proxy object contains references to all the methods and properties of the server object. When the client object calls any method (the call actually on proxy object), which resolves the references and invokes server object, receives the result and pass on to the client application.

What are the remotable and non-remotable objects in .Net Remoting.

The remotable objects are the objects which can be distributed accross domains, can be used with domain. The non-remotable objects are the objects which can't be distributed accross domains. In distributed system, if an object is very big, we can make it non-remotable object.

Describe the type of remotable objects in .Net Remoting.

Marshal-by-value-objects - When client calls a method on marshal-by-value-object, the remoting system creates a copy of this object and passes the copy to the client application domain. The copy hence received can handle any method call in client domain. Using Marshal-by-value-object reduces resource consuming trip across network.
Marshal-by-reference-object - When client calls a method on Marshal by reference object, the remoting system create proxy object in the caller application that contains the reference of all method and properties of the object.

What are the types of activation modes in .Net remoting?

Server Activation Mode: In this mode, objects are created on the server when we call a method in the server class and not when we create instance using new. In this type of scenario, the client is always connected with server but the services are activated only when we call the method of the server class. We can create server activated object as a Singleton or SingleCall object. If we create server object as singleton, a single instance will manage all the clients. If we create server object as singlecall, the remoting system creates object each time a client method invokes a remote object.

Client Activation Mode: This object gets created when we create instance using new keyword. In this mode, client application domain defines the lifetimes of client activated objects. The client domain defines the lifetimes of client-activated objects. They use lifetime leases to determine the duration of their existence and after the lifetime expires, the object is marked for GC.

Describe the term Channel in .Net Remoting.

In .Net Remoting, an application use Channel to send message to another application which is runing in different domain or process. Before sending message, Channel converts message into appropriate format like XML or binary format. The channel that carries message(Mashalled parameter) can use protocal like TCP and HTTP. Channel can be HTTPChannel and TCPChannel. The HTTPChannel use soapFormatter to serialize messages into the XML format using SOAP protocal. Using SOAP method allows the client to call method on the remote object that might not be using .Net framework. The TCPChannel use binaryFormatter to serialize message into binary stream.

DCOM vs .Net Remoting

Answer - .Net Remoting is the successor of Distributed component object Model(DCOM). Both these technology are introduced by Microsoft that enable inter-process communication across application domains. DCOM was very successful technology. But it is never treated as best technology for inter-process communication because of lack of its support for interoperability across platform.

.Net Remoting is a new technology that ship with .Net Framework. It has all those features which are missing in DCOM. There are other pain involve with DCOM such as difficult to control format or channels, message trace is painful, change in configuration setting such as channels or port is not easy. DCOM is hard to learn and complicated to deploy and to maintain.

Differences between these two technologies are as follows.

DCOM technology is based on the COM architecture whereas .NET Remoting is primarily based on .NET Frameworks.

DCOM is based on proprietary binary protocol which is not supported by all object model, thus has big drawbacks in the internet world.

DCOM is based on RPC protocol whereas .Net Remoting can use TCP or HTTP protocol which is stardard protocal in the market.

DCOM is not firewall friendly, can't choose port. .Net Remoting, on the other hand, works easily across firewalls.

.Net Remoting supports cross platform communication which is not possible with DCOM (only for windows platform).

Components created DCOM involves complex deployment in windows registries whereas .Net Remoting involves easy deployment using either xml based configuration file or programmatically in the code.

DCOM uses windows security features whereas .Net Remoting can use security features of IIS if hosted with ASP.NET. .Net Remoting, if hosted other than ASP worker process, allows to create own security mechanism for the application.

In DCOM, server is started by Service Control Manager (SCM) upon receiving the activation request from the client whereas in .Net Remoting, IIS is responsible to start server service. If not hosted with IIS then client request will fail if the Remoting server is not already started.

DCOM manages remote object lifetime by frequent pinging of clients whereas .Net Remoting has more efficient leasing mechanisms to maintain object lifetime.

Define windows process

Answer - A process is an instance of a running application.
Each process is allocated its own block of available RAM space.
No process can access another process code or data.
If the process crashes, it dies alone without taking the entire OS or a bunch of other applications down.

Advantages of .Net Web Services

Web Services are supported on a wide range of platforms.

Web services may extend its interface and add new methods without affecting the clients as long as they still provide the old methods and parameters.

  • A client makes a request to a web service, the web service returns the result, and the connection is closed. There is no permanent connection. This makes it easy to scale up and support many clients at a time.
  • Firewalls can pose a challenge for distributed object technologies. The only thing that almost always gets through firewalls is HTTP traffic on ports 80 and 443. Because web services use HTTP, they can pass through firewalls without explicit configuration.

Explain in brief Web Service Standards.

Following are the standards used by web services:

WSDL
WSDL is used to create interface definition for a web services. It describes all about methods to the client, i.e. methods available in a web service, their parameters and return values.

SOAP

SOAP, Simple Object Access Protocol is a communication protocol, a way to structure data, based on XML. The web services use SOAP message format to encode information before sending.

HTTP
The SOAP message format in web services uses HTTP as communication protocol, i.e. SOAP messages are sent over HTTP channels.

DISCO
It is used to create discovery documents that provide links to multiple web service endpoints. The DISCO standard creates a single file that groups a list of related web services. A company can publish a DISCO file on its server that contains links to all the web services it provides.

UDDI
A standard for creating business registries that catalog companies, the web services they provide, and the corresponding URLs for their WSDL contracts.

Define the specifications that help in the discovery of a web service.

DISCO

DISCO, an abbreviation of discovery, is a file that groups together a list of related web services. A company that offers web services publishes a DISCO file on its server that has links of all the web services it provides. The client requests this file to see all the available web services. This standard is useful when client already know about a company that offers web services. You can also use DISCO standard while working in local network. It is not helpful to find all web services over the internet.

UDDI

UDDI (Universal Description, Discovery, and Integration) offers centralized directory for web services over the internet. It hosts web services from different companies and can be used by the clients to find web services of their specific need. To make web services shared publicly, they have to be published in UDDI.

What are the data types supported by Web Services?

.Net web services are built on XML-based standards for exchanging data. This means .NET web services can support only those data types that can be recognized by the XML schema standard. There are many proprietary .Net objects such as FileSteam, Eventlog etc. are not supported in the web services. These data types are .Net specific types that are not universally recognized, i.e. .Net specific only.

You can even exchange custom objects using .Net web services. The only limitation is that only public data members are transmitted, and all public members and properties must use one of the other supported data types.

You can use DataSet and DataTable to return information from database but can't use other ADO.NET objects such as DataColumns and DataRows.

.Net offers a distributed technology called .Net remoting that can plays around wide range of .Net specific data type. But unfortunately, .Net remoting doesn't support client other than .Net.

Testing and consuming a .Net web service.

Testing a Web Service

.NET has a test web page that ASP.NET uses automatically when you request the URL of an .asmx file in a browser. This page uses reflection to read and show information about the web services, such as the names of the methods it provides.

Consuming a Web Service

Web services are built on XML standard. So, a client needs to equip itself to understand XML-based message in order to exchange messages. The .Net framework provides proxy component that enable clients to interact with web services. The proxy has all necessary information that can be utilized by the client application to share data with web services.

The proxy class wraps the calls to the web service's methods. It generates SOAP message format and manages the transmission of the messages over the network (using HTTP). When it receives the response message, it converts the results back to the corresponding .NET data types.

You can create a proxy class in .NET in two ways:

By using wsdl.exe command-line tool
By using Visual Studio web reference feature