ASP.NET Web Services and .NET Remoting
1.Protocol
Can be accessed only over HTTP
Can be accessed over any protocol (including TCP, HTTP, SMTP and so on)
2.State Management
Web services work in a stateless environment
Provide support for both stateful and stateless environments through Singleton and SingleCall objects
3.Type System
Web services support only the datatypes defined in the XSD type system, limiting the number of objects that can be serialized.
Using binary communication, .NET Remoting can provide support for rich type system
4.Interoperability
Web services support interoperability across platforms, and are ideal for heterogeneous environments.
.NET remoting requires the client be built using .NET, enforcing homogenous environment.
5.Reliability
Highly reliable due to the fact that Web services are always hosted in IIS
Can also take advantage of IIS for fault isolation. If IIS is not used, application needs to provide plumbing for ensuring the reliability of the application.
6.Extensibility
Provides extensibility by allowing us to intercept the SOAP messages during the serialization and deserialization stages.
Very extensible by allowing us to customize the different components of the .NET remoting framework.
7.Ease-of-Programming
Easy-to-create and deploy.
Complex to program.
difference ASP.NET Web Services and .NET Remoting
Labels: Remoting
Remoting-3
Q48. What is Multi-tasking?
Ans. It is a feature of operating systems through which multiple programs may run on the operating system at the same time, just like a scenario where a Notepad, a Calculator and the Control Panel are open at the same time.
Q49. What is Multi-threading?
Ans. When an application performs different tasks at the same time, the application is said to exhibit multithreading as several threads of a process are running.2
Q50. What is a Thread?
Ans. A thread is an activity started by a process and its the basic unit to which an operating system allocates processor resources.
Q51. What does AddressOf in VB.NET operator do?
Ans. The AddressOf operator is used in VB.NET to create a delegate object to a method in order to point to it.
Q52. How to refer to the current thread of a method in .NET?
Ans. In order to refer to the current thread in .NET, the Thread.CurrentThread method can be used. It is a public static property.
Q53. How to pause the execution of a thread in .NET?
Ans. The thread execution can be paused by invoking the Thread.Sleep(IntegerValue) method where IntegerValue is an integer that determines the milliseconds time frame for which the thread in context has to sleep.
Q54. How can we force a thread to sleep for an infinite period?
Ans. Call the Thread.Interupt() method.
Q55. What is Suspend and Resume in .NET Threading?
Ans. Just like a song may be paused and played using a music player, a thread may be paused using Thread.Suspend method and may be started again using the Thread.Resume method. Note that sleep method immediately forces the thread to sleep whereas the suspend method waits for the thread to be in a persistable position before pausing its activity.
Q56. How can we prevent a deadlock in .Net threading?
Ans. Using methods like Monitoring, Interlocked classes, Wait handles, Event raising from between threads, using the ThreadState property.
Labels: Remoting