简体   繁体   English

部署 WCF 服务

[英]Deploying a WCF Service

I will be deploying my first WCF service in the next few days on a Test server (MS Server 2003 O/S).在接下来的几天里,我将在测试服务器(MS Server 2003 O/S)上部署我的第一个 WCF 服务。 This particular service will do nothing more than run some queries against a SQL Server 2005 (most likely on the same box) and return the values to the caller.这个特定的服务只会对 SQL Server 2005(很可能在同一个盒子上)运行一些查询并将值返回给调用者。

My question is, unlike the "classic" web services, with WCF I now have choices as to deployment/bindings.我的问题是,与“经典”web 服务不同,使用 WCF 我现在可以选择部署/绑定。 Are there pros/cons to hosting this thing with IIS versus setting it up as a Windows service?使用 IIS 托管这个东西与将其设置为 Windows 服务有优缺点吗? Is one faster than the other?一个比另一个快吗? The callers to this (at least for now) will be internal, on the intranet.对此(至少现在)的调用者将是内部的,在 Intranet 上。 Is there a difference if they use HTTP or TCP?如果他们使用 HTTP 或 TCP 有区别吗? Again, are there speed differences?同样,有速度差异吗?

Hopefully my question makes sense.希望我的问题是有道理的。 I've been boning up on WCF services just the past few days.就在过去的几天里,我一直在研究 WCF 服务。 I'm happy to clarify if needed.如果需要,我很乐意澄清。

If the callers are on the intranet, your best bet will be to host in a windows service (or WAS on Server 2008) and use the TCP transport protocol.如果调用者在 Intranet 上,最好的办法是托管在 windows 服务(或 Server 2008 上的 WAS)中,并使用 TCP 传输协议。 TCP is faster and more secure than the HTTP based protocols that you're limited to with IIS. TCP 比基于 HTTP 的协议更快、更安全,您只能使用 IIS。

There's a workaround for it but you can't use custom Basic auth if you host it on IIS.有一个解决方法,但如果您将其托管在 IIS 上, 则无法使用自定义基本身份验证。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM