How to prevent deployed app from having ArcGIS Online Sign In popup?

7651
21
07-30-2015 02:23 PM
MelanieHammond1
New Contributor III

I've seen several threads but it doesn't seem like anyone has come up with a good solution. My apologies if it is out there and I simply missed it.

I'm sure I'm like many users who created a map, published to server, shared to ArcGIS Online, but only shared internally and not PUBLIC. When I made my Web Map in AGOL I did the same thing. I shared it internally with some groups but did not share publically. I did the exact same thing with the app that I created in AGOL for use in WAB (what gives me the App ID).

Once I built my app in Web AppBuilder Dev edition I deployed to my Web Server. Site opens fine but asks for AGOL sign in. How do I configure this so that it does not throw that dialog and allows viewing?

I've tried following all of the proxy docs and the threads I have found and edited the proxy as well as the config in my app. Still no luck. Why is this so difficult? Why is it not on the Esri site somewhere?

Tags (2)
0 Kudos
21 Replies
C_EHoward
Occasional Contributor III

It did until the inconsistency of having the login screen came back. I am actually working with Esri support again on this matter. Hopefully I will have a resolution that is more permanent this time

But basically my workflow sets the AGOL user name/pass in the proxy and also references the proxy and any secure services in the applications config.json file. Supposedly, the user/pass you use cannot be any AGOL user, it has to be the one that is the content owner. But my issue with a log in screen persists even with a different web map owner/user.

When it works its great and when it doesnt, its frustrating.

You may have more flexibility since you are using the developer edition

0 Kudos
C_EHoward
Occasional Contributor III

Here is my workflow......apparently there is a new blog post too on using proxies with WAB

Setting up a proxy with Web AppBuilder Developer Edition | Support Services Blog - very similar to my workflow

  1. 1.         Download the most recent proxy from here (Download ZIP): https://github.com/Esri/resource-proxy
  2. 2.         Convert it to an application and test that it is working. Use the readme (https://github.com/Esri/resource-proxy/blob/master/DotNet/README.md)

for DotNet in the GitHub repository

  1. 3.         To proxy an unshared web map add the following serverUrl to the proxy.config: Example below.

<serverUrl url="http://OrgName.maps.arcgis.com/sharing/rest/content/items"

username = "UserName"

password = "password"

matchAll = "true"

/>

  1. 4.         Add a proxy rule to your WAB application in the config.json file to use the proxy when going to get the web map. Example Below.

"httpProxy":{

"useProxy": true,

"alwaysUseProxy": false,

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

"rules": [{

"urlPrefix": "http://OrgName.maps.arcgis.com",

"proxyUrl": "http://ProxyServerUrl/DotNet/proxy.ashx"

}]

}

  1. 5.         Next, add proxy rules for secure services in the proxy.config file: Example Below.

<serverUrl url = "http://ArcGisServer.domain.com/arcgis/rest/services"

matchAll = "true"

username = "UserName"

password = "password"

/>

  1. 6.         Add a second rule to the config.json file for the WAB application to go get this service when the app request it, note the syntax for multiple rules:

Example:

"rules":[{

"urlPrefix": "http://OrgName.maps.arcgis.com/sharing/rest/content/items",

"proxyUrl": "http://ProxyServerUrl/DotNet/proxy.ashx"

},

{

"urlPrefix": "http://OrgName.maps.arcgis.com/sharing/rest/content/items",

"proxyUrl": "http://ProxyServerUrl/DotNet/proxy.ashx"

}]

Naga_BilwanthGangarapu
New Contributor

Hi,

 I followed the same steps as you said, still no success to skip the message "Please Sign in to continue". I am not the owner of the webmap content. I am having permissions to view the webmap and utilize the same with web app builder development. The issue I am seeing after deploying the app in IIS. Could you please list what kind of access permissions should I required to access the private web map content.

Thanks in advance for your help

0 Kudos
DanSenner
Occasional Contributor

Good Morning Jonathan, I came across the forum post below and wanted to follow up with you.  I had followed the same set up you said in this forum, prior to doing so our IT department had us reach out to our ESRI rep and confirm that this sharing process was in compliance.  Our rep indicated to us that this was and grey area and that it was headed down the wrong path.  I have seen many other users saying they are doing this same process to share maps and apps. Are you under the same impression that this process is a grey area and headed down the wrong path regarding compliance?  Our IT department determined from our ESRI rep response that we should not follow this process.  It would seem to me that maybe others are getting different information because they are already doing this.  Any additional information you could provide would be very helpful.

Thanks
Dan

0 Kudos
C_EHoward
Occasional Contributor III

Very interesting, Dan. I have not encountered that ("gray area") in any of my (many) discussions with support analyst. Initially some told me the answer was to share with everyone, but when I explained that does not work and I need a solution, we got the proxy situation to work....and its been great. There is often a need to share information with various audiences that are not 'everyone' so there should be opportunity and support for such a workflow. I know we are supposed to embrace the open data 'eveyrone' concept and that largely is OK (people love our open data site), but if I make a story map to show sensitive locations of potential projects, my audience is not 'everyone.' We do not use Portal so this is how we do it.

0 Kudos
DanSenner
Occasional Contributor

This is a response that I received yesterday I thought I would share it.

0 Kudos
MegPeterson
New Contributor III

This thread was invaluable to me. Got rid of the sign-in.

Internal ONLY Web Map Sharing Issues

C_EHoward
Occasional Contributor III

I am glad this thread is helping people and making it more clear that you do not have to share all of your AGOL resources in order to have the data and layers display in applications.

I am following my own advice here and still have the intermittent login/no log in required issues. Is anyone else having the issue where sometimes things work and other times it does not? Support seems to be stumped too-- jsut when we think things are fixed, it is not.

0 Kudos
JonathanQuinn
Esri Notable Contributor

It seems unlikely that requesting the same resource or resources wouldn't prompt most times, but sometimes would.  Might be difficult to do, but if you run Fiddler or the developer tools while you use your application, you may be able to catch the request that requires a token, and then verify that your proxy is configured to proxy to that resource.

C_EHoward
Occasional Contributor III

Thanks for the reply. I went through a lot of these types tests with support yesterday (original analyst & a proxy expert) and everything appeared to be functioning. When I do get the login screen, I can log into the app just fine by merely refreshing the page- which does not make sense to me. It works fine for a time and then login required, but its haphazard. Only thing I can think of is there is some sort of time limit on an token(s) the proxy issues in order to bypass the AGOL credentials. But so far, no dice in consistency. I have another support date this afternoon....hoepfully will get to the bottom of this

0 Kudos