3
votes

One of our teams here has just completed a project using both WCF and NServiceBus. When I reviewed the project I found that they had chosen to host the WCF services and NServiceBus in IIS instead of NServiceBus host.

When I queried as to why this was I was told that when they hosted WCF services (on TCP binding) in the NServiceBus Host that the WCF would regularly 'get stuck'. What this meant in practice that usually around once a day the WCF service would start actively refusing connections.

It is my understanding that IIS has custom code inside it to monitor the health of the WCF endpoints and restart them when they 'get stuck'. I would like to avoid hosting in IIS though as you don't get all the convention based goodness of using NServiceBus host.

Can anyone shed any more light on this issue or suggest ways we might be able to avoid the issue while using the NServicebusHost?

PS I Realise the description of the problem is a little vague I'm also hoping someone might be able to help me improve the question.

1
This situation is kind of weird for me, I would rather host WCF services in IIS and NServiceBus endpoint using NServiceBus.Host. Each of these applications supposed to have different to each other objects lifestyles, so I don't see any good point to host them in one place, does not add simplicity at all.xelibrion
Did I get it right that this NSB endpoint actually processes messages?xelibrion

1 Answers

4
votes

I can't understand the need to host everything in one container. Can't you host your WCF endpoints in IIS and your NSB endpoints via the generic host in a windows service. Then they can be managed as separate concerns.