Esri / resource-proxy

Proxy files for DotNet, Java and PHP.
Apache License 2.0
372 stars 321 forks source link

The proxy server application .Net version does not work for ArcGIS server 10.61 #540

Closed junchengzhang closed 2 years ago

junchengzhang commented 4 years ago

I try to use the proxy app (1.1.2) to access secured service in ArcGIS server 10.61, it just go blank page and stay blank forever. I used it for ArcGIS server 10.41 it works well.

the entry I put in proxy.config is like this:

<serverUrl url="https://hosting_server.com/arcgis/rest/services"
            username="myUserName" password="MyPassword"  domain="MyEntrerpriseDoman"  matchAll="true"/>

Dave@GDOT

Dima11235813 commented 4 years ago

What are your errors?

How are you authenticating. If you're using domain, I believe, that implies manual user login.

If you want the proxy to get a token, you'll need to set mustMatch="false" for the proxyConfig element (a value of true requires an explicit list of referrer urls) and you'll also need to remove the domain

Additionally, it would be useful if you provided the server response and request that the proxy is forwarding so it's clearer what your issue truly is.

junchengzhang commented 4 years ago

Dear Proxy app author,

In the past we used in version 10.41, we add url entry in proxy.config with siteadmin username and password to authorize the access. But in version 10.61, it does not seem to be able to log in with siteadmin username in rest end with windows authentication enabled. so I am trying to use domain username, I tried your suggestion but it still isn't working.

I don't quite understand your last sentence "it would be useful if you provided the server response and request that the proxy is forwarding so it's clearer what your issue truly is" could you provide more details? How can I use proxy in ArcGIS server10.61 service in GIS application to prevent login popup in runtime?

I appreciate your help.

Best regards

Juncheng @GDOT

On Wed, Jun 24, 2020 at 3:10 PM Dmitri L notifications@github.com wrote:

What are your errors?

How are you authenticating. If you're using domain, I believe, that implies manual user login.

If you want the proxy to get a token, you'll need to set mustMatch="false" for the proxyConfig element and you'll also need to remove the domain

Additionally, it would be useful if you provided the server response and request that the proxy is forwarding so it's clearer what your issue truly is.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Esri/resource-proxy/issues/540#issuecomment-649011954, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFASFTYCLVNC2447QIAGCUDRYJFSFANCNFSM4OC77PKQ .

-- Best Regards

bsvensson commented 4 years ago

Hi @junchengzhang , if it works for you with 10.4.1 but not with 10.6.1, it's more likely due to differences in the Enterprise setup/configuration, than the resource proxy. I would recommend you contact Esri support for further debugging/help.

junchengzhang commented 4 years ago

I did contact ESRI support, however, they said there is a report issue on proxy with new version and suggested me to contact author, and the only difference here on our service is in version 10.41 we use build in user name like siteadmin, but in version 10.61, we have to use domain user. the rest are the same.

we added domain user name and password in the proxy config file but it does not work.

If the proxy server application support domain user, could you provide me the working sample entry within proxy.confg file. I appreciate your help.

Best regards Dave

On Wed, Jul 22, 2020 at 1:02 PM Bjorn Svensson notifications@github.com wrote:

Hi @junchengzhang https://github.com/junchengzhang , if it works for you with 10.4.1 but not with 10.6.1, it's more likely due to differences in the Enterprise setup/configuration, than the resource proxy. I would recommend you contact Esri support for further debugging/help.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Esri/resource-proxy/issues/540#issuecomment-662571799, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFASFT6RUKTRXNTGFKG2UMTR44LTBANCNFSM4OC77PKQ .

-- Best Regards

junchengzhang commented 4 years ago

I added entry this in proxy.config

            <serverUrl url="

https://rnhp.dot.ga.gov/hosting/rest/services/TPROWM/MapServer" matchAll="true" username="c0004975" password="GDOTEGIS" domain="GDOT-AD"/> then I get blank page, the developer tools error like this:

Request URL: http://localhost/proxy/login/config/dojo.js

  1. Request Method: GET
  2. Status Code: 404 Not Found

  3. Remote Address:
  4. Referrer Policy: no-referrer-when-downgrade

On Thu, Jul 30, 2020 at 5:11 PM J. Zhang jczhang1998@gmail.com wrote:

I did contact ESRI support, however, they said there is a report issue on proxy with new version and suggested me to contact author, and the only difference here on our service is in version 10.41 we use build in user name like siteadmin, but in version 10.61, we have to use domain user. the rest are the same.

we added domain user name and password in the proxy config file but it does not work.

If the proxy server application support domain user, could you provide me the working sample entry within proxy.confg file. I appreciate your help.

Best regards Dave

On Wed, Jul 22, 2020 at 1:02 PM Bjorn Svensson notifications@github.com wrote:

Hi @junchengzhang https://github.com/junchengzhang , if it works for you with 10.4.1 but not with 10.6.1, it's more likely due to differences in the Enterprise setup/configuration, than the resource proxy. I would recommend you contact Esri support for further debugging/help.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Esri/resource-proxy/issues/540#issuecomment-662571799, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFASFT6RUKTRXNTGFKG2UMTR44LTBANCNFSM4OC77PKQ .

-- Best Regards

-- Best Regards

junchengzhang commented 4 years ago

I added following entry into proxy.config

<serverUrl url=" https://rnhp.dot.ga.gov/hosting/rest/services/TPROWM/MapServer" matchAll="true" username="C0004975" Domain="GDOT-AD" password="GDOTEGIS"/>

and get error message as following: Server Error in '/' Application.

*The remote server returned an error: (401) Unauthorized.*Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Net.WebException: The remote server returned an error: (401) Unauthorized.

Source Error:

Line 560: req.Referer = PROXY_REFERER; Line 561: writeRequestPostBody(req, bytes);Line 562: return req.GetResponse();Line 563: } Line 564:

Source File: c:\inetpub\wwwroot\Proxy\proxy.ashx Line: 562

Stack Trace:

[WebException: The remote server returned an error: (401) Unauthorized.] System.Net.HttpWebRequest.GetResponse() +1686 proxy.doHTTPRequest(String uri, String method, NetworkCredential credentials) in c:\inetpub\wwwroot\Proxy\proxy.ashx:562 proxy.getNewTokenIfCredentialsAreSpecified(ServerUrl su, String reqUrl) in c:\inetpub\wwwroot\Proxy\proxy.ashx:649 proxy.ProcessRequest(HttpContext context) in c:\inetpub\wwwroot\Proxy\proxy.ashx:260 System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +790 System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +195 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +88

On Wed, Jun 24, 2020 at 3:10 PM Dmitri L notifications@github.com wrote:

What are your errors?

How are you authenticating. If you're using domain, I believe, that implies manual user login.

If you want the proxy to get a token, you'll need to set mustMatch="false" for the proxyConfig element and you'll also need to remove the domain

Additionally, it would be useful if you provided the server response and request that the proxy is forwarding so it's clearer what your issue truly is.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Esri/resource-proxy/issues/540#issuecomment-649011954, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFASFTYCLVNC2447QIAGCUDRYJFSFANCNFSM4OC77PKQ .

-- Best Regards

github-actions[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you need additional assistance please contact Esri Technical Support. Thank you for your contributions.

github-actions[bot] commented 2 years ago

This issue has been automatically closed due to inactivity. If you need additional assistance please contact Esri Technical Support.

junchengzhang commented 2 years ago

I think now I figured it out, windows authentication would means application authorize user through operating system which is windows log in user name. Trying to authorize IWA secured service through proxy in this case does not make sense. So I use separate server that secure the service with built-in user and it is working fine.

Thank you for your help.

Best regards

Dave

On Wed., Jun. 24, 2020, 3:10 p.m. Dmitri L @.***> wrote:

What are your errors?

How are you authenticating. If you're using domain, I believe, that implies manual user login.

If you want the proxy to get a token, you'll need to set mustMatch="false" for the proxyConfig element and you'll also need to remove the domain

Additionally, it would be useful if you provided the server response and request that the proxy is forwarding so it's clearer what your issue truly is.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Esri/resource-proxy/issues/540#issuecomment-649011954, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFASFTYCLVNC2447QIAGCUDRYJFSFANCNFSM4OC77PKQ .