简体   繁体   中英

asp.net Unable to connect to the remote server

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 webSvc = 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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