jhash
jhash

Reputation: 759

No connection could be made because the target machine actively refused it

I can access web service on my iis by IE. But when I want to access web service by emulator,it raises No connection could be made because the target machine actively refused it. I am using VS 2008.Emulator can access internet. I updated my web referance as localhost or http://127.0.0.1/ but it doesnt work. Anonymus access is enabled on web service and I dont use proxy server.What can be problem?

Upvotes: 1

Views: 4187

Answers (2)

ctacke
ctacke

Reputation: 67168

127.0.0.1 (a.k.a. localhost) means "the machine holding the current socket." If you're on the emulator, that translates to "connect to the emulator itself", so basically you're attempting to connect to a web server on the emullator not the PC that's hosting it (it's a VM, so they are effectively two distinctly separate machines) and that's failing for obvious reasons.

Use the PC's IP address or hostname.

Upvotes: 1

Jess
Jess

Reputation: 3049

The last time I saw this was because the server didn't have its actual IP. I don't believe the emulator isn't going to have access to the computer's 127.0.0.1 address. Have you tried using the actual IP address?

Upvotes: 0

Related Questions