DotNet Proxy - Random login prompts

6804
23
06-24-2016 12:03 PM
ChrisSmith7
Frequent Contributor


Hey guys, I am having a situation where the login prompt randomly shows when using v1.1.0 of the DotNet proxy against secured services (using login-based authentication).

I am unable to reproduce consistently - there's no rhyme or reason - and logging hasn't helped to tamp-down the culprit. I see others have encountered this as well:

Login prompt appearing randomly · Issue #300 · Esri/resource-proxy · GitHub

I had to many problems with login based authentication I just gave up. It seems to be extremely buggy and inconsistent.

Has anyone had any luck in resolving the issue? Bjorn Svensson​, do you have any recommendations for me to try, or maybe some caveats/known issues not indicated on GitHub? If I reload the page, the prompt will disappear and authenticate without having to manually enter credentials. Additionally, manually entering creds allows the app to continue functioning when the prompt displays. Really, it works the majority of the time, but... we need it to work 100% of the time!

A little bit about my set-up, if helpful:

* ArcGIS 10.3 on a Win 2k12 VM

* Web adaptor sourced on another Win 2k12 VM

* v1.1.0 of the DotNet API

* v3.16 of the JSAPI

* secured map service using login auth; xy event layer view from an MS SQL Server slice

* multiple maps embedded within iFrames on the host page; iFrames are hosted from the same server/project

* map service used as a FeatureLayer in the mapping app

Thanks!

0 Kudos
23 Replies
RebeccaStrauch__GISP
MVP Emeritus

Just a couple things to check...more to do with ArcGIS Server than JS:

  • Make sure the password for the account you have doing the AD validation for ArcGIS Server has not expired.  I always get  weird results when this happens.
  • Check the Lifespace for short-lived tokens under the AGS Manager Security Settings.  Maybe up it so once logged in for the day, it remains active (not sure how switching browsers of software works since testing this myself right now).  I think the default is 60 minutes.

         

ChrisSmith7
Frequent Contributor

Thanks, Rebecca. That has me thinking... Could this be a quirk of the way we load balance?

We have one GIS server, and one web adaptor, but quite a few host apps, each on their own server, with at least two server mirrors a piece. So, when a user visits one of our sites, they will hit app server A (or another), but on the next page, or refresh, they may hit app server B (or C, D, etc). Each web site embeds an iframe hosted from within the same code base on the same app server, calling out to their centralized GIS server/web adaptor for its resources.

I bet this is mucking with persistence of authentication! We have run into other issues load balancing this way, but unfortunately, this is something I can't change. We've found workarounds persisting stuff through the db rather than rely on .NETs built-in handling.

0 Kudos
RebeccaStrauch__GISP
MVP Emeritus

Definitely can't help you there since we have a pretty basic, one server setup.....but it does sound like you might be on to something.    Maybe there is a setting somewhere to make sure they sync their credentials more often?  I'm not even sure that is a thing, but I know our AD changes always have a lag, so maybe there is something you can look into.

0 Kudos
ChrisSmith7
Frequent Contributor

I went ahead and upped the token timeouts - I'll report back once we have a clear understanding as to whether or not it worked!

0 Kudos
ChrisSmith7
Frequent Contributor

Unfortunately, the issue remains. If I can't figure this out, I might need to look into intercepting the log-in and reloading the map since everything appears to work again after this.

0 Kudos
BjornSvensson
Esri Regular Contributor

Chris, you might want to try contacting Esri Support - they have a lot of experience helping customers with the resource proxy.

ChrisSmith7
Frequent Contributor

Thanks, I was seriously contemplating doing so, but I wasn't sure if it was something Esri would provide support for over the phone since it is an ASL project on GitHub.

0 Kudos
RebeccaStrauch__GISP
MVP Emeritus

Yes, they do help with the proxy from git hub.  I had a case in a couple weeks ago and they helped.  It is sometimes hard to get the correct group however...ArcGIS Server vs ArcGIS Online vs Desktop which I think is where I ended up. I started using the -referrer option of the proxy which works, as long as it is being called from a web page (e.g. WAB or JavaScript page).  I have not been able to get it to work with something like OpenData which doesn't have a way to specify a proxy.

ChrisSmith7
Frequent Contributor

I opened a case - I'll follow-up with any resolution as soon as I have one. Hopefully, someone else out there has encountered a similar issue and has already gone through the trobuleshooting!

Something else I can rule-out - load balancing of our host app - I just realized this isn't a factor for localhost, where it occasionally manifests. Esri seems to preliminary think it may be related to the usage of the web adapter in our set-up

0 Kudos