Powered by Blogger.

Saturday, March 1, 2014

Hosting in ASP.NET and Hosting in a Windows Service



Here we will discuss about the advantages and disadvantages of Hosting in ASP.NET and Hosting in a Windows Service.

Also you can check out:

- Generics tutorial in C#.Net

- Left outer join and Right outer join in SQL Server

- How to disable right click by using jQuery in asp.net?

Hosting in a Windows Service.
When you host a remote object in ASP.NET:
1-The object is accessed using the HTTP protocol.
2-It has an endpoint that is accessible by a URL.
3-It inherits the security features offered by IIS and ASP.NET.

Advantages
If you host remote objects in IIS, you benefit from the following advantages:

Authentication, authorization, and secure communication features provided by
IIS and ASP.NET are immediately available.

You can use the auditing features of IIS.

You have a high degree of control over the hosting executable through the
<processModel>  element in Machine.config. You can control thread manage-
ment, fault tolerance, memory management, and so on.

Disadvantages
If you use ASP.NET to host remote objects, you should know disadvantages:

It requires the use of the HTTP channel which is slower than the TCP channel.
User profiles are not loaded by ASP.NET. Various encryption techniques  may require user profiles.

If the object is being accessed from code running in an ASP.NET Web application, you may have to use Basic authentication.

Hosting in a Windows Service.
When you host a remote object in a Windows service, the remote object lives in an application domain contained within the service process.

You must provide a custom authentication solution.

Authorization is possible only if you implement a custom authentication solution.

Advantages
If you host remote objects in Windows services, you benefit from the following advantages:

High degree of activation control over the host process

Inherits the benefits of Windows service architecture

User profiles are automatically loaded
Disadvantages
You must provide custom authentication and authorization solutions.

You must provide secure communication solutions.



0 comments

Post a Comment