Forum Discussion
ASMX web service client .NET 6 (IOS)
Hello,
We need to migrate own Xamarin iOS application to .NET 6 iOS. But we can't call ASMX web services (available with Xamarin iOS). Web References is not available with visual studio for .NET 6 projects. We have only Connected Services but it's not supported. Have you an idea for that? Connected services will be supported?
You will find more information here: https://docs.microsoft.com/en-us/answers/questions/689592/asmx-web-service-client-net-6-ios.html?childToView=692119
- JamesMontemagnoMicrosoftCan you do ... Right Click -> Add -> Connected Service -> Service References (OpenAPI, gRPC, WCF) and that wsdl from your asmx url still should work when you add a wcf web service reference.
- jona-applCopper Contributor
Yes, I can use that. It works with Windows and Mac apps. But with iOS, I can call nothing.
I have this exception with each calls:
ex {System.PlatformNotSupportedException: Operation is not supported on this platform. at System.Net.Http.NSUrlSessionHandler.set_ServerCertificateCustomValidationCallback(Func`5 value) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags i…}
- JamesMontemagnoMicrosoftGotcha, you may have had a different HTTP stack selected as https is required for NSURL based sessions unless you added a ATS exception.
https://docs.microsoft.com/en-us/xamarin/cross-platform/macios/http-stack
and also https://docs.microsoft.com/en-us/xamarin/xamarin-forms/data-cloud/web-services/asmx
I would check your older project and se if you had the info.plis with different info or different settings in your csproj
for example
```
<MtouchHttpClientHandler>HttpClientHandler</MtouchHttpClientHandler>
``