For anybody having issues with CORS config on their IIS arcgis web adaptor, here's what I added to the web.config under wwwroot\arcgis-
I added the following under the <system.webServer> section-
<httpProtocol>
<customHeaders>
<!--<add name="Access-Control-Allow-Origin" value="*" />-->
<add name="Access-Control-Allow-Methods" value="GET,PUT,POST,DELETE,OPTIONS" />
<add name="Access-Control-Allow-Headers" value="Content-Type" />
</customHeaders>
</httpProtocol>
The request header for Access-Control-Allow-Origin was already defined someplace, I could not figure out where, so that part I left commented out. Only needed everything below that.
http://[yourmachine]/DotNet/proxy.ashx?http://services.arcgisonline.com/ArcGIS/rest/services/?f=pjson
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.