Deploying Web App Builder App to Custom URL - App Not Loading

2019
6
Jump to solution
06-08-2018 11:34 AM
AndrewSchwartz
New Contributor II

I have been trying to deploy a simple web app to our website for the last two days, but have not been able to get it to load. I have gone through the process several times, but I must be missing something. The web app (http://www.webapptestbed3.epd-pgh.com/) displays the loading bars for a bit and then times out.

Here is what I have done so far:

1. Installed Web App Builder 2.8

2. Registered web App Builder

3. Opened Web App Builder and created a simple web app that points to a map and data on our ArcGIS Online account that is all shared publicly. The Web App successfully launches from within Web App Builder.

4. Downloaded the Web App as a zip file from Web App Builder, unzipped it, and deployed it to a test domain using an FTP: http://www.webapptestbed3.epd-pgh.com/

Set up a Proxy following these directions: https://community.esri.com/groups/technical-support/blog/2015/04/07/setting-up-a-proxy

This is the code for my proxy.config file, I’m using the ClientId and ClientSecret from my registered Web App Builder 2.8:

<?xml version="1.0" encoding="utf-8" ?>

<ProxyConfig allowedReferers="*"

             mustMatch="true">

    <serverUrls>

        <serverUrl url="http://services.arcgisonline.com"

                   matchAll="true"/>

        <serverUrl url="http://http://pc31.epd-pgh.office"

                   matchAll="true"/>

 

        <serverUrl url="https://epd-pgh.maps.arcgis.com"

           clientId="…"

           clientSecret="…"

            oauth2Endpoint="https://epd-pgh.maps.arcgis.com/sharing/oauth2"

           matchAll="true"/>

    </serverUrls>

</ProxyConfig>

 

5. To test the proxy, per the readme file, I entered http://pc31.epd-pgh.office/DotNet/proxy.ashx?ping into my browser and received this response:

{ "Proxy Version": "1.1.2", "Configuration File": "OK", "Log File": "Not Exist/Readable"}

6. Then I tested if I could access a service through the proxy by entering http://services.arcgisonline.com/ArcGIS/rest/services/?f=pjson into my browser. The json displayed in my browser.

7. Next I opened the config.json file for the Web App I had downloaded and updated the poxy URL:

 

  "wabVersion": "2.8",

  "isTemplateApp": true,

  "isWebTier": false,

  "httpProxy": {

    "useProxy": true,

    "alwaysUseProxy": false,

    "url": "http://pc31.epd-pgh.office/DotNet/proxy.ashx",

    "rules": []

  },

 

8. Then I added the App following these instructions: http://doc.arcgis.com/en/arcgis-online/manage-data/add-items.htm 

I wasn’t sure whether the data source should be https://pc31.epd-pgh.office:3344/webappbuilder/apps/6/  or http://www.webapptestbed3.epd-pgh.com/  so I tried both. I registered each and received an AppId for each.

9. I tried adding each AppId in the config.json file, saving, and replacing via the FTP, but neither worked.

I am still only getting the loading screen when I go to http://www.webapptestbed3.epd-pgh.com/. I feel like I have followed all the instructions perfectly – and I know the Web App Builder install and proxy are working correctly. What am I doing wrong?

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Esteemed Contributor

Susan

  1. If you move your proxy to the external web server you should be good to go. Normally you would want your WAB App to be in s sub folder of your web server though so you can have more than one site on your web server. So instead of webapptestbed3.edp-pgh.com/ it would be webapptestbed3.edp-pgh.com/something/
  2. If you are using AGOL and not on premise Portal then your portal url can be http OR https so just switch to using http for the url (in your main config.json).

View solution in original post

6 Replies
RobertScheitlin__GISP
MVP Esteemed Contributor

Susan,

   I see a couple of issues with your configuration.

  1. In step 6 and 7 you are using an internal url for your proxy. You proxy that you use needs to be an external url address.
  2. You have a mix of http and https urls in your app main config.json. The biggest issue is that your portal url is https and your app is using http.
AndrewSchwartz
New Contributor II

Hi Robert,

Thanks for the quick response!

1. That's what I thought, but all the instructions seemed to indicate otherwise. Would uploading the DotNet to http://www.webapptestbed3.epd-pgh.com/ solve this problem? Or should it be somewhere else outside the WebApp's folder?

2. I did not realize this would be an issue. Does this mean the domain we host the app on must be https? Our portal is standard ArcGIS Online.

Best,

Susan

0 Kudos
RobertScheitlin__GISP
MVP Esteemed Contributor

Susan

  1. If you move your proxy to the external web server you should be good to go. Normally you would want your WAB App to be in s sub folder of your web server though so you can have more than one site on your web server. So instead of webapptestbed3.edp-pgh.com/ it would be webapptestbed3.edp-pgh.com/something/
  2. If you are using AGOL and not on premise Portal then your portal url can be http OR https so just switch to using http for the url (in your main config.json).
AndrewSchwartz
New Contributor II

Thank you Robert, my test map is now loading correctly!

0 Kudos
SantoshV
New Contributor II

Hi,

 I am facing a similar issue where the page is not loading,.

I have followed all the steps downloaded the WAB and deployed it on my IIS

 

Proxy

<?xml version="1.0" encoding="utf-8" ?>

<ProxyConfig allowedReferers="*"

             mustMatch="true">

    <serverUrls>                   

        <serverUrl url="http://services.arcgisonline.com"

                   matchAll="false"/>

                <serverUrl url="https://mycompany.server.com/arcgis/rest/services"  

            username="portaladmin"  

    password="server3434"  

    matchAll="false" /> 

                </serverUrls>

</ProxyConfig>

 

My WAB config.json

  },

  "wabVersion": "2.12",

  "isTemplateApp": true,

  "isWebTier": false,

  "httpProxy": {

    "useProxy": true,

    "alwaysUseProxy": false,

    "url": "http://localhost/DotNet/proxy.ashx",

    "rules": [ ]

               

  }

 

Not sure what is wrong here, can you please help me

0 Kudos
RobertScheitlin__GISP
MVP Esteemed Contributor

Santosh,

  Once your app is deployed to your IIS machine you should never be using a localhost url anymore. You need to use the public url of your Web server or at least the server machine name.

0 Kudos