开发者

No connection could be made because the target machine actively refused it.127.0.0.1:1234

开发者 https://www.devze.com 2023-01-08 00:25 出处:网络
I wrote a webservice by aspx in vs2008 and a windows applocation by c# in vs2008. Yhe winapp uses the webservice. I put my webservice website in wwwroot and now I can access it through local net.I cre

I wrote a webservice by aspx in vs2008 and a windows applocation by c# in vs2008. Yhe winapp uses the webservice. I put my webservice website in wwwroot and now I can access it through local net. I create exe file from my win app.My problem is: when I want to run my winapp on another computer in that local net, one exception occurred: no connection could be made because the target machine actively refused it.127.0.0.1:1234.

Please help me to figure out it.

Also I've changed my IIS server开发者_开发技巧 port to 1234.And this port state is listening.And my webbsite is on the 10.10.10.1 IP Addr.


127.0.0.1 is the loopback address. This address allows a local machine to talk to itself. It is only useful if both your client and service are on the same machine. If you run your client on a different machine, then you need to be sure that it is using the "real" address of the machine hosting the service.

You probably have 127.0.0.1 hardcoded in a service definition in your app.config file. Find this and change it to use the correct address.


If that is your error message.

no connection could be made because the target machine actively refused it.127.0.0.1:1234

and you are

run my winapp on another computer in that local net

Then you are pointing your 'winapp' at the local computer when you should be pointing it at 10.10.10.1

0

精彩评论

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