App Deployment/Proxy

2164
15
Jump to solution
03-04-2016 09:41 AM
RudoDuncan
New Contributor II

I am trying to deploy my app on our dev server and I get the splash screen then it asks me to log in before I can actually using the application.

I followed the steps to get the rest service list when I was testing the proxy.config file. Then, when I changed the LAN Settings to use the proxy server (to deploy on  phqdevvm08 dev server) it would not work. I'm not sure if I changed something in the proxy.config or the apps config.json because it's not reading my username and password when I put it in the proxy.config.

0 Kudos
1 Solution

Accepted Solutions
AravindStoryMaps
Esri Regular Contributor

Ok, let's forget ArcGIS Server for now.

For clientID and clientSecret, you will use the values that are provided when you create a new application.

Here's the workflow to do that:

1. Go into ArcGIS Online.

2. Click on My Content -> Add Item -> An Application.

3. Choose "web mapping" and then under the URL, type the URL of the application where you are hosting it on IIS dev server. Then proceed to enter a title for it, a tag and then click Ok.

4. When the item is successfully added, now in item details, there should be a BLUE link in description: REGISTER.

5. Click on it to reveal a clientID and clientSecret. Copy these values into proxy.config file.

You are not encouraged to enter the username and password of ArcGIS Online in the proxy.config file. That is not considered best practice.

Do these steps and see if your browser still prompts for this credential again. If it does, there is an issue with the proxy.

Cheers,

Aravind

View solution in original post

0 Kudos
15 Replies
RobertScheitlin__GISP
MVP Esteemed Contributor

Rudo,

   You need to add your portal url to the proxy.config and based on the image of your config.json I can not tell if you have the httpProxy url set in there or not.

0 Kudos
RudoDuncan
New Contributor II

Would it look like this? First url has the services and second would be my arcgis online account, then I would put my user and password in here right?

I changed the proxy address from here to based on what was in the LAN settings. Is that the URL you are reffering to? Where do I code it in the config.json?

0 Kudos
RobertScheitlin__GISP
MVP Esteemed Contributor

Rudo,

   The proxy is a web application that you setup on your web server and it will have a url that you use to access and test it. You need to put that url in the main config.json of your wab app in the httpProxy object under the url property (look towards the bottom of the config,json to find the httpProxy object).

0 Kudos
AravindStoryMaps
Esri Regular Contributor

Rudo,

Robert is asking you to add this proxy rule in the config.json file:

rules1-1024x475.png

Reference link: Setting up a proxy with Web AppBuilder Developer Edition | Support Services Blog

RudoDuncan
New Contributor II

I tried that and now I am getting this error from the console log.

0 Kudos
RobertScheitlin__GISP
MVP Esteemed Contributor

Rudo,

   It sounds like you have entered something other than this in the proxy.config for your orgs url then:

<serverUrl url="http://phoenix.maps.arcgis.com" username="xxxx" password="yyyy" matchAll="true"/>

Do not give a specific url when you add it to the proxy.config.

0 Kudos
RudoDuncan
New Contributor II

I added that and I got this error.

This is my proxy.config file.

This is my config.json

There is something I am missing and I bet it's something very simple.

0 Kudos
RobertScheitlin__GISP
MVP Esteemed Contributor
Rudo,



  Did you test the proxy yet? Using the ping parameter or just add a ESRI sample server url (like outlined in the proxy resource doc)?


0 Kudos
RudoDuncan
New Contributor II

For the second rule, should I use my http://phqgis01:6080/arcgis/rest/services/ and list every service?

0 Kudos