0

WCFサービスへのアクセスに問題があります。私のサービスはMonoDroidアプリと同じソリューションで実行されており、VisualStudioによってホストされています。BasicHttpとして構成しました。参照はokを追加しますが、実行時に1つの単純なテストメソッドを呼び出すと、次のようになります。

System.Net.WebExceptionこれは非常に簡単ですこれはWebサービスです

public class Service1 : System.Web.Services.WebService
{

    [WebMethod]
    public string HelloWorld()
    {
        return "Hello World";
    }
}

そしてここに電話があります

        button.Click += delegate
        { 
       localhost.Service1 se = new localhost.Service1();
        button.Text= se.HelloWorld();
        };

添付ファイルのエラースナップショット

エラー

4

1 に答える 1

0

I agree that you need to add more information. However, I responded to this question sometime ago and this is what I am doing for the WCF stuff and it's working great for me.

Using Soap in Shared Mono Library for WP 7 and Android

This might help out.

One other thing that I just thought of. Do you have the internet option in the network manifest selected as shown here:

http://docs.xamarin.com/@api/deki/files/1026/=RequiredPermissionsVS.png

于 2012-06-04T15:39:57.737 に答える