问题不是使用basichttpBinding调用wcf函数并显示错误。上没有出现要路由错误的主机。
未处理异常: System.Net.WebException: Error: 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");
}
}
}发布于 2013-11-25 18:44:38
你有什么执照?如果您只有独立许可,您将不被允许访问web/wcf服务,并且必须依赖rest服务。
我找到了一条艰难的道路,但随后我就不再使用ASP.Net Web来创建我的服务了。买营业执照既简单又便宜。
https://stackoverflow.com/questions/18111440
复制相似问题