AnsweredAssumed Answered

ArcGisRestTokenRequest Expiration

Question asked by jparfitt on Sep 1, 2016
Latest reply on Sep 1, 2016 by jparfitt

I'm using a .NET web application to generate tokens with ArcGIS Server (10.2.1).

 

When I do this everything works fine:

 

new ArcGisRestTokenRequest {
Username = ConfigurationManager.AppSettings["ags.user"],
Password = ConfigurationManager.AppSettings["ags.pass"],
ClientType = ArcGisRestTokenClientType.HttpReferer,
Referer = AppName,
Expiration = new TimeSpan(days: 0, hours: 0, minutes: 60, seconds: 0)
}

 

If I set my Expiration to anything other than 60 I get an invalid request (my short tokens in manager are 180 minutes and my long tokens are 1 day.)

 

This fails, with a generic invalid token request even if I do 61... any ideas why?

 

If I leave it blank will it default to my manager (180 minutes)?

 

new ArcGisRestTokenRequest {
Username = ConfigurationManager.AppSettings["ags.user"],
Password = ConfigurationManager.AppSettings["ags.pass"],
ClientType = ArcGisRestTokenClientType.HttpReferer,
Referer = AppName,
Expiration = new TimeSpan(days: 0, hours: 0, minutes: 61, seconds: 0)
}

Outcomes