Created attachment 24531 [details]
Repro for failure with HTTPS + ClientCertificate
It seems HttpWebRequest with HTTPS + Client Certificate fails since the release 10.10: not totally sure if it is broken since the 10.8 or 10.10, but the code built with the most up-to-date release available on march 5th 2017 correctly runs on all iOS devices above iOS 8.1.
I have attached a repro: I have deployed a WCF server on a Windows Azure VM that is currently listening on two endpoints. Both of them require HTTPS, and one of them requires HTTPS + Client Certificates.
In the repro, there is also a WindowsForms client that works successfully on both endpoints.
In the project XFClient.iOS, the call works correctly with HTTPS, but timed-out with HTTPS + ClientCertificates: A System.Net.WebException: Error getting response stream(ReadDone1): ReceiveFailure occurred
is raised after a while.
Thank you so much for the bug report.
Please include your full build logs, crash reports (if any) and all version information.
To get full build logs just set the log verbosity to diagnostic at the following locations:
- On Visual Studio for Mac: Preferences > Projects > Build
- On Visual Studio for Windows: Tools > Options > Projects and Solutions > Build and Run
On Visual Studio Windows you also want to add `-v -v -v -v` to the mtouch additional arguments by right-clicking the project in the solution explorer and selecting `Properties`.
Note: this is done automatically on Visual Studio for Mac when the log verbosity is set to diagnostic.
Easiest way to get exact version information:
- On Visual Studio for Mac: "Visual Studio" menu, "About Visual Studio" item, "Show Details" button.
- On Visual Studio for Windows: "Help menu", "About Microsoft Visual Studio" item.
Then copy/paste the version information (you can use the "Copy Information" button).
Created attachment 24539 [details]
Build logs with diagnostics verbosity
Created attachment 24540 [details]
I can confirm the issue.
When deploying XFClient.iOS on either simulator or device, if you press "Endpoint 2" (the one that requires client certificates) you get a System.Net.WebException: Error getting response stream(ReadDone1): ReceiveFailure occurred after a while.
I tried this with different XI version from Xcode 9 (10.99) all the way back to XI 10.8 and it doesn't work with any of those, this is not a regression.
Please keep the WCF server on a Windows Azure VM up until we fix the issue.
Not persuaded it is not regression as I have a Xamarin.iOS application published on iTunes on March 5th 2017 that works with HTTPS + Client Certificates with exactly the same code as in the repro.
It may have been broken between Xamarin XI 10.6 and 10.8, so far as 10.8 has removed the old Mono SSL/TLS provider.
Martin, do we have any workaround for this?