简体   繁体   English

拒绝访问Web服务,但是我可以浏览到它

[英]access denied to a webservice, however I can browse to it

I am trying to access http://ws.geonames.org/countryInfo which I can browse to fine, however in my code I am getting access denied I am not sure why, I am testing the service by having the following code on page_load 我正在尝试访问http://ws.geonames.org/countryInfo ,可以正常浏览,但是在我的代码中我拒绝访问,我不确定为什么,我通过在page_load上包含以下代码来测试服务

XmlDocument xml = new XmlDocument();
xml.Load("http://ws.geonames.org/countryInfo");

I also just found out if I create an app and use IIS express the webservice returns data fine however running on IIS 7 is when the problem occurs. 我还发现如果我创建了一个应用程序并使用IIS表示Web服务可以很好地返回数据,但是在问题发生时在IIS 7上运行。

DotNetOpenAuth...CreatRequest breaks on server (Works on my machine ;-) DotNetOpenAuth ... CreatRequest在服务器上中断(在我的机器上工作;-)

basically it was the proxy, I changed the applicationpool identity to me and it went through he proxy fine. 基本上是代理,我将applicationpool身份更改为我,并通过了他的代理。 Why IIS express was getting through and not IIS 7.5 I am not sure. 我不确定为什么IIS Express会通过而不是IIS 7.5。 hope it helps. 希望能帮助到你。

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

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