开发者

When to know when to use a Windows or IIS service?

Essentially, my service consists of monitoring an Exchange mailbox. Once an email arrives the service parses it and inserts t开发者_运维问答he data in a database. From that description alone is quite clear that this is a prime example for a Windows service.

However, when would you you favor using an IIS service rather than a Windows service?

Also, are there any other types of services that can be hosted on Windows?


I take it your asking about hosting a WCF service in a windows service or IIS... I think with simple WCF services you should go with windows service, unless you need many of the features IIS provide you out of the box like app domain reloading, monitoring etc.

if your service demands a lot of features you can use IIS to help you achieve these features easier.

One thing I can argue is hosting your service in windows services is kinda faster as your servicehost will either be up and running or not available to process the requests as they come in , but with IIS your service-host will be constructed only when a request comes in, that means if no requests is being processed nothing really is running.

so either windows services while servicehost is always running to handle requests or IIS which takes more time to reconstruct your servicehost to handle incoming messages (on demand loading).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜