简体   繁体   English

如何为自托管的basic-http WCF服务打开Windows 7防火墙

[英]How to open Windows 7 firewall for self hosted basic-http WCF service

I have added a rule to the firewall to open TCP port 8080 used by my WCF-service app (self hosted basic-http). 我已经向防火墙添加了一条规则来打开我的WCF服务应用程序使用的TCP端口8080(自托管的basic-http)。 Everything works fine as along as I check "All applications..." and not the specific exe-file of my app in the rule. 一切正常,因为我检查“所有应用程序...”而不是规则中我的应用程序的特定exe文件。 Ive googled the problem and found out that a deamon process (SMSvcHost.exe) is used to host the service, but only when using net-tcp and Im using basic-http. 我搜索了问题,发现一个deamon进程(SMSvcHost.exe)用于托管服务,但只有在使用net-tcp和Im使用basic-http时。 The client is a Windows Phone 7-app so I cant use net-tcp. 客户端是Windows Phone 7应用程序,所以我不能使用net-tcp。 But what daemon-process is being used for basic-http? 但是什么守护进程被用于basic-http? And what would be the easiest way of adding this rule to the firewall programatically when my service-app is starting for the first time? 当我的service-app第一次启动时,以编程方式将此规则添加到防火墙的最简单方法是什么?

I know W3WP.exe handles the app pools, but I'm not sure about the HTTP hosting. 我知道W3WP.exe处理应用程序池,但我不确定HTTP托管。 I've personally never done a rule that applied a certain port to an application, but rather one or the other. 我个人从来没有做过将某个端口应用于应用程序的规则,而是一个或另一个。

I hope that at least is something helpful :) 我希望至少是有用的东西:)

Try using the netstat command with the -o option to figure out which PID is listening on that port. 尝试使用带有-o选项的netstat命令来确定哪个PID正在侦听该端口。 Then look Task Manager to figure out which exe belongs to that PID. 然后查看任务管理器以确定哪个exe属于该PID。

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

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