Hosting a Service by Using WAS:-
WAS is a component of IIS 7.0 that enables you to host application in a similar way to how IIS 6.0 host application. The best part is that you are not limited to using the HTTP protocol. You can also use supported protocols such as TCP, named pipes and MSMQ. In addition, you do not have to install the entire IIS 7.0 package. You can opt to install just WAS and not include the Web Server.
Hosting a service through WAS is similar to hosting it through IIS. You still create a virtual directory that contains a service file with an .svc extension. The service file will include an @ServiceHost directive to specify the service name and code language. The actual code should reside in the App_Code subdirectory or be compiled in the bin directory. Configuration for WAS- Hosted service is also handled by the Web.config file. All exposed end points should be included in the System.Servicemodel section of the file.
Hosting a service in WAS means that you rely on a request to come in before the application domain hosting the service is created. By default, the application domain is recycled every 29 hours. This could be an issue if your service relies on in-memory state. For this reason, WAS is more suitable for service that rely on a percall session mode.
No comments :
Post a Comment