WCF service blocked by Windows Firewall

白昼怎懂夜的黑 提交于 2019-12-18 21:17:56

问题


I've got a WCF service using a HttpBinding. The service is running in a self hosting process (A Windows Service) and this process is inside the Windows Firewall exceptions list.

If the Firewall is active and I'm trying to access the service using a C# client or Internet Explorer, the service does not respond. But if the Firewall is disabled the connection works like a charm.

Does anyone have expirence with WCF and the Windows Firewall? The problem came up on Windows 7 64bit. I didn't try another OS yet.

What am I supposed to do to get this working with an active Firewall?

Regards Michael

EDIT: I found a clue, that the http.sys has to be added to the firewall exceptions list, as wcf self hosting uses http.sys. Any advices, how to solve this?

EDIT: I tried opening all listening port manually, which works too, but is not an option, because I don't know them in advance.


回答1:


Try the MSDN article Configuring HTTP and HTTPS.




回答2:


As far as I know, adding self hosted WCF service process to firewall does not work, because it is not that process taking inbound calls, it only works if

  1. add service port to global port exception
  2. add WCF inbound daemon process to process exception, I'm not sure about http, but for net.tcp bindings, you need $FrameworkDir/SMSvcHost.exe instead of your process.


来源:https://stackoverflow.com/questions/3006117/wcf-service-blocked-by-windows-firewall

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!