Hello Guys and Girls,
im working on a Project which i have to change from http to https.
Since the app runs in a Mobile Iron Environment i have to use a NSUrlConnection.
Now when im trying to use the following code (which worked with http) i get the error in the title.
`Console.WriteLine("RequestClass not null");
String xmlSerialized= SerializeXML<cRequestClass>(reQuestClass);
byte[] Content = Encoding.UTF8.GetBytes(xmlSerialized);
Console.WriteLine("Class Converted");
var request = new NSMutableUrlRequest(NSUrl.FromString(@WebserverURL), NSUrlRequestCachePolicy.ReloadIgnoringCacheData, 40);
request.HttpMethod = "POST";
request.ShouldHandleCookies = true;
request.Body = NSData.FromArray(Content);
Console.WriteLine("Start Connecting");
Task<NSUrlAsyncResult> result = NSUrlConnection.SendRequestAsync(request, OpsQueue);
Console.WriteLine("Result Received Async");
NSData data = result.Result.Data;
Console.WriteLine("Data transformed");
ReturnValue = data.ToString();
Console.WriteLine(ReturnValue);`
Only for development purpose i tried to add a new key to my info.plist. But without any results.
<key>NSAppTransportSecurity</key>
<dict>
<key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key>
<true/>
<key>NSIncludesSubdomains</key>
<true/>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
I working on it for a Week now and only found some java snippets with information on some Delegates ("willSendRequestForAuthenticationChallenge", which i couldnt successful implement.
Thank you for your Help.