问题描述
我的asp.net系统必须在客户端的服务器上使用Web服务来检索XML数据。 Web服务受IP地址保护,因此只有当消费者来自已知IP地址时才会返回正确的结果。我正在开发我的asp.net系统,并且为了测试系统,我的客户端有我的公共IP地址(IP地址范围,以便其他开发人员也可以测试)将其添加到他们的IP地址列表中。我可以直接从我的浏览器访问Web服务。但是,我无法从我的asp.net代码访问Web服务。 (他们现在将我重定向到他们的登录页面而不是向我发送XML数据。)我对我的开发(本地)环境的IP地址的理解是我的asp.net系统使用本地主机但是当它到达web服务时web服务从我的公共IP地址看到我的请求。 (如localhost - >私有IP地址 - >公共IP地址)是吗?在那种情况下,我的asp.net代码中应该做些什么?或者我认为完全错了?
提前谢谢。
Hi,
My asp.net system has to consume a web service on my client''s server to retrieve XML data. The web service is secured by IP address so that it only returns the right result only when the consumer is from a known IP Address. I''m still developing my asp.net system, and for me to test the system, my client has my public IP address (range of IP address so that other developers can test as well) to add it to their IP address list. I can access to the web service directly from my browser. However, I''m not able to access to the web service from my asp.net code. (They redirect me to their login page right now instead of sending me XML data.) My understanding of IP address of my development (local) environment is that my asp.net system uses local host but when it reaches to the web service the web service sees my request as from my public IP address. (like localhost -> private ip address -> public ip address) Is that right? In that case, is there anything I should do in my asp.net code? Or am I thinking totally wrong?
Thank you in advance.
推荐答案
这篇关于使用由IP地址保护的Web服务:IP地址无法识别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!