Select to view content in your preferred language

Working with WebAppBuilder behind a corporative http proxy

14359
17
Jump to solution
07-31-2014 05:54 AM
AlexisRodriguez
Occasional Contributor

As some users before, our team was experiencing problems with WebAppBuilder and ArcGIS Portal login, once nodejs was already initiated and portal url was verified successfully. Our users credentials were never validated and we were unable to login (incorrect username or password message). We recently found out that it was due to some kind of compatibility issue with our corporative http proxy.

Does anyone know how to configure WebAppBuilder to work behind a corporative http proxy? Thanks!

1 Solution

Accepted Solutions
JunshanLiu
Frequent Contributor

Hi Alexis,

Could you follow the following steps to have a try?

1. Open server/proxy.js

2. Add the following line before line 36 and line 45:

   proxy: 'your proxy url',

3. restart node server

This line code will enable node js to use your proxy.

View solution in original post

17 Replies
ZhifangWang
Esri Regular Contributor

Hi Alexis,

Thanks for providing the information.

Could you please describe what is your office network environment? What kind your proxy is or the steps to setup your proxy network? So we can reproduce your problem and find a workaround.

Thanks!

0 Kudos
AlexisRodriguez
Occasional Contributor

Hi Zhifang,

AFAIK, due to the fact that we are not the network administrators, we are behind a http(s) proxy which captures all mentioned traffic to the Internet being itself who finally sends/gets the contents, making first a filter of the contents asked and evaluating if they are convenient for the environment we are in.

So, in any application who needs access to the Internet, it is mandatory to configure this proxy to access any content. I.e. configuring it on Internet Explorer (or whichever browser you use) under the label “Connections”à LAN Settings à Proxy Server.

With this firewall/proxy deployment, there is no machine except the proxy server who has http(s) access. While the traffic is sent via Chrome, we can access arcgisonline as the proxy is configured in the browser, but, we have sniffed http traffic by application and we noticed that the web app builder sends traffic by itself (the server mounted) so it cannot access the Internet, with the result of not being able to validate our application on arcgisonline.

Thanks. Best regards.

0 Kudos
ZhifangWang
Esri Regular Contributor

Hi Alexis,

Thanks for providing the details, this helps a lot. Please following the instructions given by Junshan below to see if you can managed to log into Portal.

0 Kudos
JunshanLiu
Frequent Contributor

Hi Alexis,

Could you follow the following steps to have a try?

1. Open server/proxy.js

2. Add the following line before line 36 and line 45:

   proxy: 'your proxy url',

3. restart node server

This line code will enable node js to use your proxy.

AlexisRodriguez
Occasional Contributor

Hi Junshan,

Everything went right with that modification.

Thank you very much!

0 Kudos
JunshanLiu
Frequent Contributor

Hi Alexis,

Thanks!

We'll add "proxy" command line parameter in the next release, so user can set the proxy without touch code.

TarigAhmed1
Deactivated User

Hi Junshan

That still didn't work for me .. see attached screenshots ... not sure what I'm missing or doing wrong

proxy.pngnode_x86.exe server.js 80 Portal login_08052014.png

0 Kudos
AlexisRodriguez
Occasional Contributor

Hi Tarig,

First of all, I think you have made a mistake in the code. After putting your proxy you have forgotten to add a comma (",") at the end of the line (in both types of requests - lines 36 and 45), therefore a SyntaxError message is shown in command window.

Besides, I don't know how you have your network configured but maybe you should have to write your whole http proxy server URL. For instance, in our case, we had to write it with the protocol and port as well:

proxy: 'http://proxy.our.company.com:port'

Regards!

0 Kudos
TarigAhmed1
Deactivated User

Hi Alexis ...

Oh wow .. I had to do both of your points above and it worked like a charm.

Thank you so much ....

Best,

Tarig