I am developing an app using Xamarin.Forms for android and ios. When running on iOS, I get this error message when calling my WCF:
MonoTouch does not support dynamic proxy code generation. Override this method or its caller to return specific client proxy instance
So, I created this method per Monotouch/WCF: How to consume the wcf service without svcutil :
protected override IService1 CreateChannel()
{
return new Service1ClientChannel(this);
}
Which led to me having to create the Service1ClientChannel class. Then, per the same link, I implement the methods like so:
public CheckIfUserNameExistsResponse CheckIfUserNameExists(CheckIfUserNameExistsRequest request)
{
object[] _args = new object[1];
_args[0] = request;
return (CheckIfUserNameExistsResponse)base.Invoke("CheckIfUserNameExists", _args);
}
The problem I have is: base.Invoke doesn't exists. Only base.BeginInvoke and base.EndInvoke. So what am I doing wrong? Why in the link above do they have access to "Invoke"? When I checked the ChannelBase definition, there is no "Invoke". Per this link it is supposed to exist: https://learn.microsoft.com/en-us/dotnet/api/system.servicemodel.clientbase-1.channelbase-1.invoke?view=xamarinandroid-7.1&viewFallbackFrom=netframework-4.7.2