1

We have a server application that has one module installed on a separate server, and want to use WCF for the two modules to communicate with each other. I've narrowed it down to hosting the WCF either in IIS7/WAS or in WAS without IIS. The main purpose of the primary application is actually to serve as a tcp/ip sockets based server that processes some data that comes in. Would IIS7 or WAS be best for this type of project?

If we did go with WAS, would it makes sense to build a console app to host in WAS?

4

2 回答 2

3

在 IIS7 中托管是 WAS - 它们不是排他性的。我相信您要问的是我应该“自我托管”还是使用 IIS7。

如果您使用 IIS,那么您不需要扮演您自己的服务主机的角色,并且在崩溃后重新启动将为您处理。

如果您使用自托管服务,那么您将需要编写托管该服务的程序(如果您想要始终打开的东西,通常是一个 Windows 服务),您将需要手动处理崩溃和重新启动。

然而,自托管程序可以更快(不是很多,但有时这很重要 -测量它)并且会占用更少的内存。WAS 还可能受到 IIS 的连接限制(例如,在 Vista 下为 10)的限制,具体取决于所使用的协议。

于 2009-09-22T18:01:23.427 回答
2

The only reason IIS7 can host non-HTTP services is that it uses WAS to do so. Your choices are not mutually exclusive.

于 2009-09-22T17:52:47.267 回答