Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/335.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/vba/16.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# WCF selfhost所需的组件?_C#_.net_Installation - Fatal编程技术网

C# WCF selfhost所需的组件?

C# WCF selfhost所需的组件?,c#,.net,installation,C#,.net,Installation,我的服务(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

我的服务(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 Process Activation服务吗


是保留.NET framework X.0所需的全部吗?

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

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

框架 --.Net 3.5或更高版本

安全性 --基本/Windows身份验证

访问
--创建代理(svcutil/Channelfactory)就足以访问自托管wcf服务

其他人 --不需要IIS或任何其他服务


希望这有帮助

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

看一看。您可以使用第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服务中,以使其继续侦听端点。但这可能并不奇怪:)

是的,您不应该需要IIS。但我建议您通过在新服务器上进行测试来证明这一点