0
問題是沒有使用basichttpBinding調用wcf函數並顯示錯誤。 在Visual Studio中沒有主機路由錯誤。BasicHttpBinding錯誤 - Xamarin
未處理的異常: System.Net.WebException:錯誤:ConnectFailure(否主機路由)
using System;
using System.Collections.Generic;
using System.Linq;
using MonoTouch.Foundation;
using MonoTouch.UIKit;
using HelloWorld_App4.localhost;
namespace HelloWorld_App4
{
public class Application
{
// This is the main entry point of the application.
static void Main(string[] args)
{
// if you want to use a different Application Delegate class from "AppDelegate"
// you can specify it here.
localhost.Service1 obj = new localhost.Service1();
obj.GetData(32, true);
UIApplication.Main(args, null, "AppDelegate");
}
}
}