Hello,
I am experiencing an issue while trying to load a WMS layer in my .NET MAUI application using the ArcGIS Runtime SDK. The WMS layer works fine on iOS, but on Android and WinUI, I encounter the following error:
Misused header name, 'Content-Encoding'. Make sure request headers are used with HttpRequestMessage, response headers with HttpResponseMessage, and content headers with HttpContent objects.
Here is the code snippet I am using to load the WMS layer:
private async Task<WmsLayer> GetWMSLayer(WMS wMS)
{
try
{
WmsLayer myWmsLayer = new(new Uri(wMS.url), new List<string> { wMS.layername });
await myWmsLayer.LoadAsync();
return myWmsLayer;
}
catch (Exception ex)
{
await Application.Current.MainPage.DisplayAlert("Error", ex.ToString(), "OK");
}
return null;
}
The WMS layer URL is: https://geo4.service24.rlp.de/wms/rp_dop40.fcgi
Layer name: rp_dop40
I have ensured that all NuGet packages are up to date. However, the issue persists. Any guidance on resolving this issue would be greatly appreciated.
Thank you in advance for your assistance!