Last post Mar 21, 2016 03:33 AM by Yohann Lu
Mar 21, 2016 01:45 AM|EastCoder|LINK
Just for the subject, who can give me explaination or some other helpful links？ thanks for your in advanced.
Mar 21, 2016 02:55 AM|Yohann Lu|LINK
As far as I know, IIS and Self hosting have some differences in the below.
1: Hosting in Internet Information Services(IIS).
IIS takes care of creation of service instances, disposal of service instances, recycling and other activities that it does for an ASP.NET website.
When a request comes in, the ServiceHost is constructed, then the service class being hosted is instantiated, and the request is handled. Nothing needs to be running around the clock. But at the same time, this setup requires more time and effort every time
a message comes in, and you as a programmer don’t have much control over your service host.
2: Hosting in a Console or Desktop application(Self hosting).
Self hosting has the major benefits of providing our full control. All the control of starting the service, stopping the service and error handling/logging can be done in our host application. The amount of code that needs to be written to self host a Web
API service is very small and it is very easy too. Now the decision for choosing self hosting is purely on the requirements of whether or not you want so much control on the service.
The following MSDN Article, Hosting and Consuming WCF Services probably has all the information you need.
Mar 21, 2016 03:15 AM|EastCoder|LINK
thanks for your cool reply, besides that, what's difference in
webapi with above two ways. I have got the difference of the
WCF which you provided.
Mar 21, 2016 03:33 AM|Yohann Lu|LINK
I found the following post in the below may be helpful to you.
Self hosting or IIS hosted?