AnsweredAssumed Answered

What is required for QueryTask Credentials ?

Question asked by ctsurveyors on Mar 6, 2012
Latest reply on Mar 26, 2012 by ctsurveyors
Hello

I'm trying to do a query during a Periodic Background Agent on a Secure Service and would like to just get the credentials from the app's local storage after the user has already sign in at least once.

Here is my code..
QueryTask queryTask =                 new QueryTask("http://servicesbeta4.esri.com/arcgis/rest/services/SaveTheBay/FeatureServer/0");             queryTask.Credentials = WHAT IS REQUIRED HERE????             queryTask.ExecuteCompleted += QueryTask_ExecuteCompleted;              ESRI.ArcGIS.Client.Tasks.Query query = new ESRI.ArcGIS.Client.Tasks.Query();             query.Where = "Confirmed = '1'";              // This query will just populate the drop-down, so no need to return geometry             query.ReturnGeometry = false;             query.OutFields.Add("*");             queryTask.ExecuteAsync(query);


What comes after
queryTask.Credentials = 


I know the username and password is "user1", but I just don't know how to submit that in code.

Thanks

Outcomes