private bool fetchAndPassBackToClient(System.Net.WebResponse serverResponse, HttpResponse clientResponse, bool ignoreAuthenticationErrors) { if (serverResponse != null) { if (serverResponse.ContentType == "application/vnd.ogc.wms_xml") clientResponse.ContentType = "text/xml"; else clientResponse.ContentType = serverResponse.ContentType; using (Stream byteStream = serverResponse.GetResponseStream()) { ....
I just encountered this problem as well, and fortunately found this thread that clarified what the cause was. Since I need to use a proxy for the GetCapabilities request, I've just edited the proxy so that a ContentType of 'application/vnd.ogc.wms_xml' with 'text/xml' before the response is returned. If you're using the current DotNet version of the resource-proxy Esri has hosted on GitHub ( https://github.com/Esri/resource-proxy), you can make this change near the start of the fetchAndPassBackToClient method in the proxy.ashx file (around line 293): private bool fetchAndPassBackToClient(System.Net.WebResponse serverResponse, HttpResponse clientResponse, bool ignoreAuthenticationErrors) { if (serverResponse != null) { if (serverResponse.ContentType == "application/vnd.ogc.wms_xml") clientResponse.ContentType = "text/xml"; else clientResponse.ContentType = serverResponse.ContentType; using (Stream byteStream = serverResponse.GetResponseStream()) { ....
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.