开发者

asp.net Unable to connect to the remote server

开发者 https://www.devze.com 2023-01-24 10:48 出处:网络
I have got this error Unable to connect to the remote server when I call the web service from the windows service. But I can visit this web service through IE and I also wrote another console app

I have got this error

Unable to connect to the remote server

when I call the web service from the windows service. But I can visit this web service through IE and I also wrote another console application to call the web service and it works fine, too.

The exception infomation is below:

A socket operation was attempted to an unreachable network 127.0.0.1:8888

Here is my code:

WebImageSVC web开发者_如何转开发Svc = new WebImageSVC();  
ConfigManager.LoadConfigManager();  
webSvc.Url = ConfigManager.WebSvcAddress;  
webSvc.Proxy = null;  
webSvc.CanUpload(0, "");

I try many methods, like turn off the firewall and anti-virus software, set the web services proxy property to null. but still cannot solve this issue.

Is there anyone meet this problem ? thanks a lot.


My guess is that it is a permissions issue. Try using OpenSCManager to change the credentials of your Windows service to run under a user that can access the Web service.

http://msdn.microsoft.com/en-us/library/ms681921(v=VS.85).aspx


You are redirected to 127.0.0.1:8888 is mostly used by system proxies. These are programs for anonymous surfing or web debugging like Fiddler. Close the proxy program.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号