Internal ONLY Web Map Sharing Issues

24474
91
Jump to solution
09-25-2015 08:36 AM
BrianO_keefe
Occasional Contributor III

So we have a webmap that is INTERNAL ONLY. We have to build the 'ArcGIS' map side online, then using WAB build the web map, prop it up on our internal server, and now it's asking for AGOL sign on. This is supposed to be used by Field Crews?! They will 'never' have AGOL accounts... what is the proper workflow for a situation like this?

91 Replies
BrianO_keefe
Occasional Contributor III

Ohhhhhhh...

I need to prop up this proxy on my Internal only server... then ALL of my internal only maps would use it... right?

RobertScheitlin__GISP
MVP Emeritus

yep

0 Kudos
BrianO_keefe
Occasional Contributor III

So one last question...

How do I put the AGOL username in the proxy? Am I pointing the <serverUrl url=" " /> to AGOL or My Map? And am I putting this in proxy.config?

0 Kudos
BrianO_keefe
Occasional Contributor III

<serverUrl url="http://localhost url to my map here"

  clientID="My Id Here"

  clientSecret="My Secret Here"

  matchAll="true">

</serverUrl>

{error: {code: 403,message:"403 - Forbidden: Access is denied.",details:[message:"Current proxy configuration settings do not allow requests which do not include a referer header."]}}

I'm banging my head against the keyboard at this point. Proxies make zero sense... I've created my application at developer.arcgis... I've installed (and tested) my proxy... I've propped up my WAB created map on our internal web server...

EVERYTIME I OPEN THE MAP I GET THE REQUEST FOR AGOL USER CREDENTIALS!

I'm losing my mind... time to get eat lunch...

0 Kudos
NatalieBuchwald
New Contributor III

I am having the same issue (trying to deploy a web app built using the Web AppBuilder on an internal server for internal use only) but I do not understand the proxy stuff. I went to the github url and downloaded the resource-proxy-1.1.0 file but now I have no idea what to do. There's a DotNet folder, Java folder, and a PHP folder. I'm assuming I use the Java folder but in the read me file it says:

* Install the contents of the Java folder as a Web Application in a web container such as Apache Tomcat.

* Test that the proxy is installed and available:

```

http://[yourmachine]:8080/Java/proxy.jsp?ping

```

* Test that the proxy is able to forward requests directly in the browser using:

```

http://[yourmachine]:8080/Java/proxy.jsp?http://services.arcgisonline.com/ArcGIS/rest/services/?f=pj...

I have no idea what any of this means. I looked into Apache Tomcat and had no idea what I was looking at. This is making me miss Flex. Can anyone provide any insight or step-by-step instructions for this goon that's in way over their head? Is this step necessary? Is this the only way to get around the ArcGIS Online login issue when deploying an app for internal use only?

0 Kudos
RobertScheitlin__GISP
MVP Emeritus
BrianO_keefe
Occasional Contributor III

So at this point I have followed the directions from this post EXACTLY.

Now I'm getting a whitescreen, with a frowny face, and the words :

Unable to create map: Unexpected token :

So I feel like I am closer to a solution...

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Brain,

  Here is a my steps for setting up the Proxy to bypass the login (they are a little different from that post).

1. Here is my proxy.config. Notice I am using username and password and not clientId and clientSecret:

EDIT: but I just tested with clientId and clientSecret and it works fine that way too.

<?xml version="1.0" encoding="utf-8" ?>
<ProxyConfig allowedReferers="*"
             mustMatch="true">
    <serverUrls>
        <serverUrl url="http://calhoun.maps.arcgis.com"
                   username="username"
                   password="password"
                   matchAll="true"/>
        <serverUrl url="http://services.arcgisonline.com"
                   matchAll="true"/>
        <serverUrl url="http://gis.calhouncounty.org"
                   matchAll="true"/>
        <serverUrl url="http://gislap183"
                   matchAll="true"/>
    </serverUrls>
</ProxyConfig>

2. My config.json is basically the same:

"httpProxy": {
    "useProxy": true,
    "alwaysUseProxy": false,
    "url": "/WAB/Proxy/proxy.ashx",
    "rules": [{
        "urlPrefix": "http://calhoun.maps.arcgis.com/",
        "proxyUrl": "/WAB/Proxy/proxy.ashx"
    }]
  }

3. My app registration is basically the same:

URL: http://gis.calhouncounty.org/ MY apps url (removed for obvious reasons)

API: JavaScript

App Type: browser

Purpose: Configurable

Redirect URI's: http://gis.calhouncounty.org

The big thing about step 3 is that the item is PUBLIC (the app item that you are registering). The webmap is still private and secured though.

BrianO_keefe
Occasional Contributor III

I was so hopeful.

I mimic'd your layout above almost exactly (obviously used my url's instead).

\wwwroot\DotNet\proxy.config

<ProxyConfig allowedReferers="*" mustMatch="true">
    <serverUrls>
        <serverUrl url="http://services.arcgisonline.com" matchAll="true"/>

  <serverUrl url="http://MyInternalOnlyServer" matchAll="true" />
  <serverUrl url="http://maps.cityoftulsa.org" matchAll="true" />
  <serverUrl url="http://cityoftulsa.maps.arcgis.com"
  username="myUsername"
  password="myPassword"
  matchAll="true" />

  </serverUrls>
</ProxyConfig>

\wwwroot\WebAppName\config.json

   "wabVersion":"1.3",
   "isTemplateApp":false,
   "isWebTier":false,
   "httpProxy":{  
      "useProxy":true,
      "alwaysUseProxy":false,
   "url" : "/DotNet/proxy.ashx",
      "rules":[
  "urlPrefix" : "http://cityoftulsa.maps.arcgis.com/",
  "proxyUrl":"/DotNet/proxy.ashx"
      ]
   },

2015-10-01_080129.png

2015-10-01_080401.png

And I still get this...

2015-10-01_080521.png

I just feel like this would be easier if I worked for Naperville... lol.

RobertScheitlin__GISP
MVP Emeritus

Brain,

   And the registered app is set to public right?

Example.jpg