<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic WMSLayer bypasses  proxy when using GetFeatureInfo. in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/wmslayer-bypasses-proxy-when-using-getfeatureinfo/m-p/1044417#M72381</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;We are displaying an ESRI for JS 4.17 map on an Angular 9 spa within an asp.net web app.&lt;/P&gt;&lt;P&gt;We are trying to access EAGLE-I, WMS layer within our application.&lt;/P&gt;&lt;P&gt;In our asp.net application, we have the ESRI proxy downloaded from &lt;A href="https://github.com/Esri/resource-proxy" target="_blank" rel="noopener"&gt;https://github.com/Esri/resource-proxy&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;Our proxy configuration for the EAGLE-I url looks like this:&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;FONT size="2"&gt;&lt;EM&gt; &amp;lt;serverUrl url="&lt;A href="https://eagle-i.doe.gov" target="_blank" rel="noopener"&gt;https://eagle-i.doe.gov&lt;/A&gt;" matchAll="true" useAppPoolIdentity="false" accessToken="secret-token-number" &amp;nbsp;tokenParamName="eiApiKey" rateLimit="-1" rateLimitPeriod="60" /&amp;gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Loading a layer works perfectly.&amp;nbsp; The WMS url is correctly forwarded through our proxy:&amp;nbsp; &lt;A href="http://localhost/SOCCSWebClient/gisapi/proxy.ashx?https://eagle-i.doe.gov/api/mapservices/geoserver/ows?width=1479&amp;amp;height=541&amp;amp;bbox=-18183495.26887799%2C2146991.791759475%2C-3713048.5701585496%2C7440103.126449953&amp;amp;format=image%2Fpng&amp;amp;request=GetMap&amp;amp;service=WMS&amp;amp;styles=&amp;amp;transparent=true&amp;amp;version=1.3.0&amp;amp;crs=EPSG%3A3857&amp;amp;layers=eagle-i%3Acoal_mines" target="_blank" rel="noopener"&gt;http://localhost/SOCCSWebClient/gisapi/proxy.ashx?https://eagle-i.doe.gov/api/mapservices/geoserver/ows?width=1479&amp;amp;height=541&amp;amp;bbox=-18183495.26887799%2C2146991.791759475%2C-3713048.5701585496%2C7440103.126449953&amp;amp;format=image%2Fpng&amp;amp;request=GetMap&amp;amp;service=WMS&amp;amp;styles=&amp;amp;transparent=true&amp;amp;version=1.3.0&amp;amp;crs=EPSG%3A3857&amp;amp;layers=eagle-i%3Acoal_mines&lt;/A&gt;.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mapok.jpg" style="width: 411px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/10251i03A4B87A17A44BAD/image-size/large?v=v2&amp;amp;px=999" role="button" title="mapok.jpg" alt="mapok.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But, when I click a feature from the map to view it’s popup, I get 401 error because the &lt;STRONG&gt;GetFeatureInfo&lt;/STRONG&gt; call, first uses the proxy, but executes again without the proxy.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="popupNotOk.png" style="width: 376px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/10253i6B3E6A84B20C5469/image-dimensions/376x260?v=v2" width="376" height="260" role="button" title="popupNotOk.png" alt="popupNotOk.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I see in the network tab of chrome's developer tools is the WMSLayer calls correctly the first time and then calls again, incorrectly a second time.&lt;/P&gt;&lt;P&gt;Good call:&lt;/P&gt;&lt;P&gt;&lt;A href="http://localhost/SOCCSWebClient/gisapi/proxy.ashx?https://eagle-i.doe.gov/api/mapservices/geoserver/ows?bbox=-18183495.26887799%2C2171451.6408107243%2C-3713048.5701585487%2C7415643.277398704&amp;amp;format=image%2Fpng&amp;amp;request=GetFeatureInfo&amp;amp;service=WMS&amp;amp;styles=&amp;amp;transparent=true&amp;amp;version=1.3.0&amp;amp;crs=EPSG%3A3857&amp;amp;layers=eagle-i%3Acoal_mines&amp;amp;query_layers=eagle-i%3Acoal_mines&amp;amp;info_format=text%2Fhtml&amp;amp;feature_count=25&amp;amp;width=1479&amp;amp;height=536&amp;amp;I=704&amp;amp;J=373" target="_blank" rel="noopener"&gt;http://localhost/SOCCSWebClient/gisapi/proxy.ashx?https://eagle-i.doe.gov/api/mapservices/geoserver/ows?bbox=-18183495.26887799%2C2171451.6408107243%2C-3713048.5701585487%2C7415643.277398704&amp;amp;format=image%2Fpng&amp;amp;request=&lt;STRONG&gt;GetFeatureInfo&lt;/STRONG&gt;&amp;amp;service=WMS&amp;amp;styles=&amp;amp;transparent=true&amp;amp;version=1.3.0&amp;amp;crs=EPSG%3A3857&amp;amp;layers=eagle-i%3Acoal_mines&amp;amp;query_layers=eagle-i%3Acoal_mines&amp;amp;info_format=text%2Fhtml&amp;amp;feature_count=25&amp;amp;width=1479&amp;amp;height=536&amp;amp;I=704&amp;amp;J=373&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Quickly negated by bad call:&lt;/P&gt;&lt;P&gt;&lt;A href="https://eagle-i.doe.gov/api/mapservices/geoserver/ows?bbox=-18183495.26887799,2171451.6408107243,-3713048.5701585487,7415643.277398704&amp;amp;format=image/png&amp;amp;request=GetFeatureInfo&amp;amp;service=WMS&amp;amp;styles=&amp;amp;transparent=true&amp;amp;version=1.3.0&amp;amp;crs=EPSG:3857&amp;amp;layers=eagle-i:coal_mines&amp;amp;query_layers=eagle-i:coal_mines&amp;amp;info_format=text/html&amp;amp;feature_count=25&amp;amp;width=1479&amp;amp;height=536&amp;amp;I=704&amp;amp;J=373" target="_blank" rel="noopener"&gt;https://eagle-i.doe.gov/api/mapservices/geoserver/ows?bbox=-18183495.26887799,2171451.6408107243,-3713048.5701585487,7415643.277398704&amp;amp;format=image/png&amp;amp;request=&lt;STRONG&gt;GetFeatureInfo&lt;/STRONG&gt;&amp;amp;service=WMS&amp;amp;styles=&amp;amp;transparent=true&amp;amp;version=1.3.0&amp;amp;crs=EPSG:3857&amp;amp;layers=eagle-i:coal_mines&amp;amp;query_layers=eagle-i:coal_mines&amp;amp;info_format=text/html&amp;amp;feature_count=25&amp;amp;width=1479&amp;amp;height=536&amp;amp;I=704&amp;amp;J=373&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Any suggestion on how to fix this would be appreciated.&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
    <pubDate>Tue, 06 Apr 2021 21:50:21 GMT</pubDate>
    <dc:creator>EugeneStaten</dc:creator>
    <dc:date>2021-04-06T21:50:21Z</dc:date>
    <item>
      <title>WMSLayer bypasses  proxy when using GetFeatureInfo.</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/wmslayer-bypasses-proxy-when-using-getfeatureinfo/m-p/1044417#M72381</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;We are displaying an ESRI for JS 4.17 map on an Angular 9 spa within an asp.net web app.&lt;/P&gt;&lt;P&gt;We are trying to access EAGLE-I, WMS layer within our application.&lt;/P&gt;&lt;P&gt;In our asp.net application, we have the ESRI proxy downloaded from &lt;A href="https://github.com/Esri/resource-proxy" target="_blank" rel="noopener"&gt;https://github.com/Esri/resource-proxy&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;Our proxy configuration for the EAGLE-I url looks like this:&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;FONT size="2"&gt;&lt;EM&gt; &amp;lt;serverUrl url="&lt;A href="https://eagle-i.doe.gov" target="_blank" rel="noopener"&gt;https://eagle-i.doe.gov&lt;/A&gt;" matchAll="true" useAppPoolIdentity="false" accessToken="secret-token-number" &amp;nbsp;tokenParamName="eiApiKey" rateLimit="-1" rateLimitPeriod="60" /&amp;gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Loading a layer works perfectly.&amp;nbsp; The WMS url is correctly forwarded through our proxy:&amp;nbsp; &lt;A href="http://localhost/SOCCSWebClient/gisapi/proxy.ashx?https://eagle-i.doe.gov/api/mapservices/geoserver/ows?width=1479&amp;amp;height=541&amp;amp;bbox=-18183495.26887799%2C2146991.791759475%2C-3713048.5701585496%2C7440103.126449953&amp;amp;format=image%2Fpng&amp;amp;request=GetMap&amp;amp;service=WMS&amp;amp;styles=&amp;amp;transparent=true&amp;amp;version=1.3.0&amp;amp;crs=EPSG%3A3857&amp;amp;layers=eagle-i%3Acoal_mines" target="_blank" rel="noopener"&gt;http://localhost/SOCCSWebClient/gisapi/proxy.ashx?https://eagle-i.doe.gov/api/mapservices/geoserver/ows?width=1479&amp;amp;height=541&amp;amp;bbox=-18183495.26887799%2C2146991.791759475%2C-3713048.5701585496%2C7440103.126449953&amp;amp;format=image%2Fpng&amp;amp;request=GetMap&amp;amp;service=WMS&amp;amp;styles=&amp;amp;transparent=true&amp;amp;version=1.3.0&amp;amp;crs=EPSG%3A3857&amp;amp;layers=eagle-i%3Acoal_mines&lt;/A&gt;.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mapok.jpg" style="width: 411px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/10251i03A4B87A17A44BAD/image-size/large?v=v2&amp;amp;px=999" role="button" title="mapok.jpg" alt="mapok.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But, when I click a feature from the map to view it’s popup, I get 401 error because the &lt;STRONG&gt;GetFeatureInfo&lt;/STRONG&gt; call, first uses the proxy, but executes again without the proxy.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="popupNotOk.png" style="width: 376px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/10253i6B3E6A84B20C5469/image-dimensions/376x260?v=v2" width="376" height="260" role="button" title="popupNotOk.png" alt="popupNotOk.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I see in the network tab of chrome's developer tools is the WMSLayer calls correctly the first time and then calls again, incorrectly a second time.&lt;/P&gt;&lt;P&gt;Good call:&lt;/P&gt;&lt;P&gt;&lt;A href="http://localhost/SOCCSWebClient/gisapi/proxy.ashx?https://eagle-i.doe.gov/api/mapservices/geoserver/ows?bbox=-18183495.26887799%2C2171451.6408107243%2C-3713048.5701585487%2C7415643.277398704&amp;amp;format=image%2Fpng&amp;amp;request=GetFeatureInfo&amp;amp;service=WMS&amp;amp;styles=&amp;amp;transparent=true&amp;amp;version=1.3.0&amp;amp;crs=EPSG%3A3857&amp;amp;layers=eagle-i%3Acoal_mines&amp;amp;query_layers=eagle-i%3Acoal_mines&amp;amp;info_format=text%2Fhtml&amp;amp;feature_count=25&amp;amp;width=1479&amp;amp;height=536&amp;amp;I=704&amp;amp;J=373" target="_blank" rel="noopener"&gt;http://localhost/SOCCSWebClient/gisapi/proxy.ashx?https://eagle-i.doe.gov/api/mapservices/geoserver/ows?bbox=-18183495.26887799%2C2171451.6408107243%2C-3713048.5701585487%2C7415643.277398704&amp;amp;format=image%2Fpng&amp;amp;request=&lt;STRONG&gt;GetFeatureInfo&lt;/STRONG&gt;&amp;amp;service=WMS&amp;amp;styles=&amp;amp;transparent=true&amp;amp;version=1.3.0&amp;amp;crs=EPSG%3A3857&amp;amp;layers=eagle-i%3Acoal_mines&amp;amp;query_layers=eagle-i%3Acoal_mines&amp;amp;info_format=text%2Fhtml&amp;amp;feature_count=25&amp;amp;width=1479&amp;amp;height=536&amp;amp;I=704&amp;amp;J=373&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Quickly negated by bad call:&lt;/P&gt;&lt;P&gt;&lt;A href="https://eagle-i.doe.gov/api/mapservices/geoserver/ows?bbox=-18183495.26887799,2171451.6408107243,-3713048.5701585487,7415643.277398704&amp;amp;format=image/png&amp;amp;request=GetFeatureInfo&amp;amp;service=WMS&amp;amp;styles=&amp;amp;transparent=true&amp;amp;version=1.3.0&amp;amp;crs=EPSG:3857&amp;amp;layers=eagle-i:coal_mines&amp;amp;query_layers=eagle-i:coal_mines&amp;amp;info_format=text/html&amp;amp;feature_count=25&amp;amp;width=1479&amp;amp;height=536&amp;amp;I=704&amp;amp;J=373" target="_blank" rel="noopener"&gt;https://eagle-i.doe.gov/api/mapservices/geoserver/ows?bbox=-18183495.26887799,2171451.6408107243,-3713048.5701585487,7415643.277398704&amp;amp;format=image/png&amp;amp;request=&lt;STRONG&gt;GetFeatureInfo&lt;/STRONG&gt;&amp;amp;service=WMS&amp;amp;styles=&amp;amp;transparent=true&amp;amp;version=1.3.0&amp;amp;crs=EPSG:3857&amp;amp;layers=eagle-i:coal_mines&amp;amp;query_layers=eagle-i:coal_mines&amp;amp;info_format=text/html&amp;amp;feature_count=25&amp;amp;width=1479&amp;amp;height=536&amp;amp;I=704&amp;amp;J=373&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Any suggestion on how to fix this would be appreciated.&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Apr 2021 21:50:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/wmslayer-bypasses-proxy-when-using-getfeatureinfo/m-p/1044417#M72381</guid>
      <dc:creator>EugeneStaten</dc:creator>
      <dc:date>2021-04-06T21:50:21Z</dc:date>
    </item>
  </channel>
</rss>

