.net - Why do we need a Web API or a WCF Service to be self-hosted? -


please me understand, why need web api or wcf service self-hosted.

better if can explain practical situation.

i self-host wcf , webapi services, because:

  • i don't have mess around iis, virtual directories, app pool , recycling habits

  • i can define own, custom addresses - http://myserver:7711/services/myservice.svc etc. - no limitation because of iis hosting *.svc file in virtual directory

  • all protocols (including net.tcp, net.pipe etc.) supported - iis supports http/https, , (windows activation services) support others addon - more configuration , hassles

  • i can stick services simple console app , launch them when needed (for e.g. debugging), , stop them again

  • i can host services in own windows service, under own control, can start , stop needed - don't have rely on iis , infrastructure, don't have deal drawbacks of iis etc.

for me - quite enough reasons learn use self-hosting wcf , webapi services - always!


Comments