4

我的服务(TCP)之前在 IIS7 中安装了 bin,这是对此的要求:

Internet  Information Services
- Web Management Tools (all)
- Wold Wide Web Services
-- Application Development Features (all - CGI)
-- Common Http Features (all)
-- Health and Diagnostics
--- HTTP Logging
--- Request Monitor
-- Performance Features
--- Static Content Compression
-- Security
--- Basic Authentication
--- Client Certificate Mapping Authentication
--- IIS Client Certificate Mapping Authentication
--- Request Filtering
--- URL Authorization
--- Windows Authentication
Microsoft .NET framework 3.0
- Windows Communication Foundation HTTP Activation (for WAS)
- Windows Communication Foundation Non-HTTP Activation
Windows Process Activation Service
- .NET Environment
- Configuration APIs
- Process Model

现在我已更改为 .NET WCF Selfhost,这让我想知道需要哪些组件?我可以删除 Internet 信息服务和 Windows 进程激活服务,这是真的吗?

我只需要保留 .NET 框架 X.0 吗?

4

3 回答 3

2

WCF 自托管绝对不需要 IIS 或任何其他服务。它只需要支持 WCF 的 .NET Framework 版本(3.5 及更高版本)。TCPBinding 支持多种功能,包括可靠性、事务和安全性。

框架 ——.Net 3.5 或更高版本。

安全性 ——基本/Windows 身份验证。

访问
-- 创建代理 (svcutil/Channelfactory) 足以访问 Selfhosted wcf 服务。

其他 ——不需要 IIS 或任何其他服务

希望这有帮助..在这里

于 2013-01-14T14:31:16.727 回答
1

是的,WCF 自托管意味着自托管。您不依赖于 IIS 或 WPA。

在 msdn 上查看此链接。您使用第 8 点中提到的 ServiceHost 来制作实际的托管组件。

下面是一个将 WCF 服务作为 HTTP 服务自托管的片段。

  var baseAddress = new Uri("http://localhost:3124/");
  var host = new WebServiceHost(typeof(SSOUser), baseAddress);
  var sep = host.AddServiceEndpoint(typeof(ISSOUser), new WebHttpBinding(), "");
  sep.Behaviors.Add(new WebHttpBehavior());
  host.Open();

与 IIS 托管等相比,您可能会错过的是,您需要将服务主机放在正在运行的应用程序或 Windows 服务中,以使其连续侦听端点。但这可能不会让你感到惊讶:)

于 2013-01-14T14:37:58.693 回答
0

任何附加组件。wcf selfhost 仅需要框架 3/3.5/4/4.5

于 2013-01-14T13:32:37.770 回答