After Deploying a Web App from WAB on our own ArcGIS Servers we get intermittent portal login pages. Has anyone seen this? Our proxy authenticates fine and most times you never see the portal login page. When you do see the portal login, i can click the back button and it takes me directly to the web app without a login. Our internal portal page is causing a lot of problems by randomly requesting a login. Any help would be greatly appreciate.
Did you ever figure this out? How did you set up your proxy to authenticate with Portal? Thanks!
Well I didn't, but our GIS Developer figured it out. Here is the code he added that we use on every WAB project at the bottom of the config.json file.
"wabVersion": "2.4",
"isTemplateApp": true,
"isWebTier": false,
"httpProxyFile": {
"useProxyFile": true,
"alwaysUseProxyFile": false,
"url": "https://insertdomainname.com/ProxyFileDirectory/ProxyFile.ashx",
"rules": [
{ "urlPrefix": "https://insertdomainname.com/webadaptorname6", "ProxyFileUrl": "https://insertdomainname.com/ProxyFileDirectory/ProxyFile.ashx" },
{ "urlPrefix": "https://insertdomainname.com/webadaptorname7", "ProxyFileUrl": "https://insertdomainname.com/ProxyFileDirectory/ProxyFile.ashx" },
{ "urlPrefix": "https://insertdomainname.com/webadaptorname8", "ProxyFileUrl": "https://insertdomainname.com/ProxyFileDirectory/ProxyFile.ashx" },
{ "urlPrefix": "https://insertdomainname.com/webadaptorname5", "ProxyFileUrl": "https://insertdomainname.com/ProxyFileDirectory/ProxyFile.ashx" },
{ "urlPrefix": "https://services2.arcgis.com", "ProxyFileUrl": "https://insertdomainname.com/ProxyFileDirectory/ProxyFile.ashx" },
{ "urlPrefix": "https://internalserver/portal", "ProxyFileUrl": "https://insertdomainname.com/ProxyFileDirectory/ProxyFile.ashx" },
{ "urlPrefix": "https://insertdomainname.com/portal", "ProxyFileUrl": "https://insertdomainname.com/ProxyFileDirectory/ProxyFile.ashx" } ]
As you can see we have many webadaptors and use 10 ArcGIS servers. He also added the internal and external name of the Portal. Once this was added and supplied credentials in the proxy.ashx file, we stopped getting requests for authentication. I hope this helps! I can send you a link to setting up a proxy file as that will be needed as well.
Thanks for the quick reply! That's the part I was missing, I forgot the proxy was named in the app's config.json and not just the proxy file.
Update in case it helps anyone else: While I was no longer prompted to login, my print service still wasn't working, until I remembered I needed to configure it to print the secured services in my web map.
Print maps that contain secured services—Documentation (10.5) | ArcGIS Enterprise Then I saw that my vector basemaps weren't printing, until I redirected the app to a newer JS API that supported printing them.
Oh, and in regards to your original question: yes, I do sometimes see a login screen for the proxy still. Refreshing the page fixes it, however that's annoying and looks really bad for our customers who probably just navigate away from the page assuming it's broken. There's a thread here, but it doesn't seem to have been completely fixed yet Login prompt appearing randomly · Issue #300 · Esri/resource-proxy · GitHub
Great, I'm glad it worked for you!