从Android Xamarin(VS2015)消耗.net Webservice(asmx)时出错

时间:2015-09-18 10:56:57

标签: web-services visual-studio xamarin visual-studio-2015 asmx

我在VS2015中创建了一个Web服务。我的Web服务有一个函数 SignUpUser 它将采用3个参数并以整数形式返回结果。

    MyFirstWebService.Service Serv = new MyFirstWebService.Service();
    int result = Serv.SignUpUser("abc", "password", "abc@gmail.com");

从VS2015的按钮点击事件调用上面的代码(Xamarin Android) 但它给我的错误如下

system.net.webexception error connectfailure (connection refused)
at system.net.sockets.socketexception:connection refused
at system.net.webconnection.connect(system.net.httpwebrequest request)

我检查了很多链接,无处不在,而不是 localhost 使用 10.0.2.2 http://localhost:58614/Service.asmx但它不起作用。我已经使用C#windows应用程序测试了我的web服务,它没有任何问题。我特别错过了吗?

0 个答案:

没有答案
相关问题