防火墙后面的WCF服务–如何设置端口转发? [英] WCF Service behind firewall – How to set up port forwarding?

查看:96
本文介绍了防火墙后面的WCF服务–如何设置端口转发?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚开始WCF编程.我已经在防火墙后面的工作计算机上建立了一个自托管的测试Web服务.在http://localhost:8000/MyTestService.我可以通过浏览器访问服务页面;一切正常.

I'm just getting into WCF programming. I've set up a self-hosted test web service on my work computer, which is behind a firewall; it's at http://localhost:8000/MyTestService. I can access the service page through the browser; all working fine.

现在,我想从位于其他网络上的家用计算机访问该服务.我设置了一个动态dns(称为mydomain.dyndns.org)以指向我的工作路由器.经过测试,dyndns指向正确的地址.

Now I want to access that service from my home computer, which is on a different network. I have a dynamic dns (call it mydomain.dyndns.org) set up to point to my work router. Have tested, dyndns is pointing to the right address.

现在,我已经在家用计算机上安装了一个测试应用程序以连接到我的Web服务.因此,我将NAT配置为将端口8000上的转发请求转发到工作计算机上的同一端口号.

Now I have installed a test app on my home computer to connect to my web service. So I configured my NAT for forward requests on port 8000 to my work computer, on the same port number.

现在,在家用计算机上,打开浏览器并导航到http://mydomain.dyndns.org:8000/MyTestService.什么也没做.

On my home computer I now open a browser and navigate to http://mydomain.dyndns.org:8000/MyTestService. Nothing doing.

很明显,我缺少有关NAT和端口转发的一些基本知识...但是,正如我所说的,我在编程方面还是个新手,我真的很感谢这里的一些指导!

Obviously I'm missing something really fundamental about NATs and port forwarding... but as I say, I'm kinda new at this aspect of programming, and I'd really appreciate some guidance here!

推荐答案

您看到错误消息还是空白页面?您可以从防火墙后面的计算机检查canyouseeme.org端口是否真正打开吗?您可以使用sysinternals tcpview之类的工具检查连接尝试是否不仅是路由器也可以到达这台计算机?

Do you see an error or an empty page? Can you check canyouseeme.org from the computer behind the firewall that the port is really open? Can you check with tools like sysinternals tcpview that the connection attempt reaches this computer and not just the router?

这篇关于防火墙后面的WCF服务–如何设置端口转发?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆