Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

WCF iOS Monotouch does not support dynamic proxy code generation

$
0
0

Hi guys,

I am working on an App with WCF Service und I am already two days struggling with some Limitation on iOS. We have in PCL Project WCF reference, all has been good generated, but in our project we need to change Enpoint Address directly in Code. On Android everything is fine but on the iOS we are getting error due to WCF limitation on Monotouch:
"Monotouch does not support dynamic proxy code generation. Override this method or its caller to return specific client proxy instance.". Then as stated in Errormessage I have overridden the CreateChannel method in webservice reference:
protected override IServiceApp CreateChannel()
{
return new ServiceAppChannel(this);
}
ans also new class for Channel:
private class ServiceAppChannel : ChannelBase, IServiceApp
{
public ServiceOwiAppChannel(System.ServiceModel.ClientBase client) : base(client)
{

}

public IAsyncResult BeginCheckVersion(string ox, AsyncCallback callback, object asyncState)
{
object[] _args = new object[1];
_args[0] = ox;
return (IAsyncResult)base.BeginInvoke("CheckVersion", _args, callback, asyncState);
}

public string CheckVersion(string ox)
{
throw new NotImplementedException();
}

public string EndCheckVersion(IAsyncResult result)
{
object[] _args = new object[0];
return (string)base.EndInvoke("CheckVersion", _args, result);
}
But it's not working. Can you please help me out how to make this dynamic proxy generation work, or any idea how to do it properly ? Thanks in advance.


Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>