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!
Solved! Go to Solution.
Looks like this server is returning "Content-Encoding" in the Vary header which is causing some issues for our caching. I've logged an internal bug to fix this and just ignore invalid values.
Looks like this server is returning "Content-Encoding" in the Vary header which is causing some issues for our caching. I've logged an internal bug to fix this and just ignore invalid values.
Thank you for your prompt response and for identifying the issue with the "Content-Encoding" in the Vary header. I appreciate that you've logged an internal bug to address this problem.
Fix was just merged and should be in v200.5