AnsweredAssumed Answered

User Credentials Sample Issues Outside My Network

Question asked by patrickrwild on Sep 23, 2015

I am trying to implement the User Credentials sample to under stand how the ServiceInfoTask works. I want to use the ServiceInfoTask to generate local .goeodatabase as in the Local Geodatabase Editing Editing sample.

 

First of all, are there credentials available for the sample services provided? Am I missing something here? Is there a way to see how this sample is intended to behave?

 

I replace the the serviceURL and baseMapURL property strings with my own REST endpoints and run in AppPlayer. I think everything runs correctely on my network, but the sample has issues when I try to access my services outside of my network.

 

On my network under User Credentials I see my username then '..Invalid Date'. Under Service task I see '..Successfully connected to the Service info task'. Under Feature Layer I see '..Feature Layer Complete', '..Table Name: Main Line Valves' (which would be layer 0), '..6 fields', '..Editable?: false'. Under Map Info I see '..Layer Count: 2' this feature service actually has 6 (0-5) layers, '..Layer names: Main Line Valves'.

No Map is displayed.

 

Off my network under User Credentials I see my username then '..Invalid Date'. Under Service task I see '..Successfully connected to the Service info task'. Then nothing under Feature Layer or Map Info.

 

In the QT console the final few lines display:

qt.network.ssl: QSslSocket: cannot call unresolved function SSL_get0_next_proto_negotiated

qt.network.ssl: QSslSocket: cannot call unresolved function SSL_get0_next_proto_negotiated

qt.network.ssl: QSslSocket: cannot call unresolved function SSL_get0_next_proto_negotiated

qml: Layer create error: Authentication required.

 

My ArcGIS Server is 10.3; User Store: Windows Domain, Role Store: Windows Domain, Authentication Tier: Web, Authentication Mode: Web.

Web web server is running IIS7 and my Webadaptors are 10.3. Everything runs through ports 443 and 6443.

 

My ultimate goal is an app where the user access our secure services, takes that data offline then periodically updates the app .geodatabase, there will be no need to sync data from the device to the server.

 

Any thoughts or ideas are greatly appreciated.

PW

 

 

Edit/Update:

 

Looking at ServiceInfoTask qml I see it's using tokens:

userCredText.text = " .." + userCredentials.token;

userCredText.text += "\n\r .." + userCredentials.tokenExpiry;

 

I created a service on a different 10.3 server; User Store: Windows Domain, Role Store: ArcGIS Server Built-in, Authentication Tier: GIS Server, Authentication Mode: ArcGIS Tokens. Web web server is running IIS7 and my Webadaptors are 10.3. Everything runs through ports 443 and 6443.

 

On my network under User Credentials I see my username then '..<token string>', '..<todaysdateandtime>'. Service Task, Feature layer and Map Info display values as before. Still nothing in the map viewer.

Great! Should have looked closer before my initial post, obviously this sample is coded for token authentication.

 

However, when I take my PC machine off our network I receive '>ERROR for serviceTaskInfo  ..3 ..Host <mydomain>.com not found'.

Would this be because service directory browsing is disabled on this GIS server?

Edit: This only happens when running from Qt. When launched fro AppPlayer it runs as expected, sans map...

 

Oddly, on a Mac, when run off network (I currently have no option to bring this machine into our network) I see the token and 'Successfully connected to the Service info task' and then the application abruptly quits/crashes with no error. In the Qt console the final line reads: "/Users/patrickwild/Applications/ArcGIS/AppStudio/AppRun.app/Contents/MacOS/AppRun" finished

 

I did update to Beta 4 on the Mac but not on the PC...

 

My question now, can the ServiceInfoTask be amended to accept web tier authentication?

 

Thanks again...

Outcomes