Hi,
following scenario:
Server: Custom Data Abstract on a Rasperry Pi under Mono connected to a revers proxy with openvpn (for now a WinInetHttpClientChannel)
Client: Xamarin.Forms PCL for iOS, Android and UWP connected to the reverse proyy with HTTPS. The https request to the reverse proxy is passed via http to the Data Abstract server on the Raspi.
This is my Client Login Method
public async Task<Boolean> LogOnAsync(String userId, String password)
{
if (String.IsNullOrEmpty(userId))
{
this.IsLoggedOn = false;
return await Task.FromResult(false);
}
bool result = false;
try
{
result = await (new RemObjects.DataAbstract.Server.BaseLoginService_AsyncProxy(this.fMessage, this.fClientChannel, "LoginService")).LoginExAsync(String.Format(DataModule.ConnectionString, userId, password));
}
catch (Exception ex)
{
this.ErrorCode = ex.Message;
System.Diagnostics.Debug.WriteLine("LOGIN Error: " + ex.Message);
}
this.IsLoggedOn = true;
return result;
}
This works fine on iOS and UWP(Desktop and Mobile) also Data Access, but not on Android (Marshmallow).
But direct Access via HTTP to the Raspi works fine on Android too.
I get this error: “SecureChannelFailure (The authentication or decryption has failed.)”
StackTrace:
at RemObjects.SDK.WinInetHttpClientChannel+AsyncState.get_Message () [0x0004e] in c:\ci\b\rofx\932\RemObjects SDK for .NET\Source\RemObjects.SDK\ClientChannels\WinInetHttpClientChannel.cs:296
at RemObjects.DataAbstract.Server.BaseLoginService_AsyncProxy.EndLoginEx (System.IAsyncResult __AsyncResult) [0x00000] in c:\CI\b\rofx\932\Data Abstract for .NET\Source\RemObjects.DataAbstract.Server\DataAbstract4_Intf.pas:1868
at System.Threading.Tasks.TaskFactory1[TResult].FromAsyncCoreLogic (System.IAsyncResult iar, System.Func
2[T,TResult] endFunction, System.Action1[T] endAction, System.Threading.Tasks.Task
1[TResult] promise, System.Boolean requiresSynchronization) [0x00014] in /Users/builder/data/lanes/3511/501e63ce/source/mono/mcs/class/referencesource/mscorlib/system/threading/Tasks/FutureFactory.cs:550
— End of stack trace from previous location where exception was thrown —
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Users/builder/data/lanes/3511/501e63ce/source/mono/mcs/class/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:143
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00047] in /Users/builder/data/lanes/3511/501e63ce/source/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:187
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x0002e] in /Users/builder/data/lanes/3511/501e63ce/source/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:156
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x0000b] in /Users/builder/data/lanes/3511/501e63ce/source/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:128
at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult () [0x00000] in /Users/builder/data/lanes/3511/501e63ce/source/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:357
at PMWconnect.DataModule+d__36.MoveNext () [0x0011a] in C:\Users\Helmut\documents\visual studio 2015\Projects\PMWconnect\DataModule.cs:126
ex.InnerException.StackTrace:
at Mono.Security.Protocol.Tls.SslStreamBase.EndRead (System.IAsyncResult asyncResult) [0x00051] in /Users/builder/data/lanes/3511/501e63ce/source/mono/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/SslStreamBase.cs:883
at Mono.Net.Security.Private.LegacySslStream.EndAuthenticateAsClient (System.IAsyncResult asyncResult) [0x00011] in /Users/builder/data/lanes/3511/501e63ce/source/mono/mcs/class/System/Mono.Net.Security/LegacySslStream.cs:475
at Mono.Net.Security.Private.LegacySslStream.AuthenticateAsClient (System.String targetHost, System.Security.Cryptography.X509Certificates.X509CertificateCollection clientCertificates, System.Security.Authentication.SslProtocols enabledSslProtocols, System.Boolean checkCertificateRevocation) [0x00000] in /Users/builder/data/lanes/3511/501e63ce/source/mono/mcs/class/System/Mono.Net.Security/LegacySslStream.cs:445
at Mono.Net.Security.MonoTlsStream.CreateStream (System.Byte[] buffer) [0x0004e] in /Users/builder/data/lanes/3511/501e63ce/source/mono/mcs/class/System/Mono.Net.Security/MonoTlsStream.cs:106
Any ideas ??
Regards
Helmut