残念なことに、Monotouchでapp.configファイルを使用することはできません。コード内にすべてのバインディングを作成する必要があります。私たちのプロジェクトの一つで、これは我々がやっていることです:あなたは値が正確に一致することを保証し、通過して、サーバーのapp.configファイルに発見されたすべてのプロパティを設定する必要が
public static ServiceClient GetClient()
{
BasicHttpBinding binding = new BasicHttpBinding();
binding.OpenTimeout = new TimeSpan(0,0,10);
binding.CloseTimeout = new TimeSpan(0,0,10);
binding.SendTimeout = new TimeSpan(0,0,10);
binding.HostNameComparisonMode = HostNameComparisonMode.StrongWildcard;
binding.BypassProxyOnLocal = false;
binding.AllowCookies = false;
// snip - we set all the properties found in the serverside config file in code here
EndPointAddress endpointAddress = new EndpointAddress("https://www.domain.com/ServiceClient.svc");
ServiceClient client = new ServiceClient(binding, endpointAddress);
return client;
}
、そうでない場合は、このウォン仕事はありません。 (私があなたの質問に誤解した場合、私は謝ります!)。
あなたはそれが正しいです。それは私がやったことで、私は別の問題で終わります。ここに掲載されています。http://stackoverflow.com/questions/6667030/make-this-wcf-client-code-work-on-mono-and-monotouch-on-the -マック – Krumelur