Error SSL when adding proxy .Net in arcgis api js

290
1
03-14-2022 02:04 PM
benchikh
New Contributor III

Hi

Actually Im working to integrate a proxy with .Net, and I have followed some examples on how to do that. but unfortunately I am not able to figure it out.

so I will explain what I have did:

1- I have downloaded the .Net proxy folder from the internet and have host it on my IIS, so I have test it and all looks OK

benchikh_0-1647290158629.png

2- next, I have updated my proxy.config file as below

<?xml version="1.0" encoding="utf-8" ?>
<ProxyConfig allowedReferers="*"
mustMatch="true">
<serverUrls>
<serverUrl url="https://domaine.ma/arcgis2/rest/services/JOUR/FeatureServer/"
matchAll="true"/>
</serverUrls>
</ProxyConfig>

3 - finally, I have added on my index js page the following code

urlUtils.addProxyRule({
urlPrefix: "https://domaine.ma/arcgis2/",
proxyUrl: "/ingPro/proxy.ashx"
});

so when I call my service, I got the below error

  1. code: 500
  2. message: "La connexion sous-jacente a été fermée : Impossible d'établir une relation de confiance pour le canal sécurisé SSL/TLS. https://domaine.ma/arcgis2/rest/services/JOUR/FeatureServer/0?f=json"

So could you please help me with the above error ?

Many thanks in advance

0 Kudos
1 Reply
Noah-Sager
Esri Regular Contributor

I don't think we promote using the Esri proxy anymore, but it looks like since you're calling from localhost over http, and the resources are accessible via https, that's the issue. If the app was hosted over https, then that might resolve the error.

0 Kudos