Question

I have the following problem, I try to call an web service from an Windows phone 6.5 while its connected to active sync to my desktop computer, in development debug environment.

So I dont have wlan connected on the phone, maybe that is the problem?

But when its connected to my desktop pc, by USB (Windows Mobile Device Center) i can browse the web and I can acess the ?wsdl meta data on the phone - to the web service. The webservice is running on my computer as an windows service.

I use an simple web reference to my local webservice:

private void button2_Click(object sender, EventArgs e)
{
    var method = new MobileCashier.TestReference.YvesTransfer();

    method.Timeout = 30000;
    bool bResult, bResultSpec;
    method.TestConnection(out bResult,out bResultSpec);

    MessageBox.Show(bResult.ToString());
    MessageBox.Show(bResultSpec.ToString());

    method.Dispose();
}

But when I run it on the phone in debug mode (or not debug) I get this error:

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

If I run the windows exe app on my desktop computer(the same as I deploy on the phone), or from another desktop computer then there is no problem.

Maybe I need wlan to make it accept the calls?

Can some one help me please?

Was it helpful?

Solution

Yes you do need Wlan activated on your cell to access a local webservice, you should essentially be in the same network of your desktop machine.

I would rather use any other wlan connected machine to test my webservice on another machine, and be sure of it, may be write a small testbed app to check the webservice.

you can also open your webservice wsdl page on your phone, and see if it opens well, now your code must be able to call your webservice from your desktop's hosted webservice.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top