I've set up a web service that uses ESRI's REST API spec. This allows me to make requests using the (Silverlight)/WPF SDK. If I turn on windows authentication though, I get a 401 error when using GeoProcessor.ExecuteAsynch.

I can successfully call the same url with a WebClient with credentials set:

WebClient c = new WebClient();
c.Credentials = CredentialCache.DefaultCredentials;

If I use WebClient, then I have to deserialize ESRI's json, which is non-trivial, so I'd really like to use Geoprocessor.ExecuteAsynch instead.

Is there some way to send credentials with Geoprocessor?


According to the documentation: Secure services it should be possible to secure the services. By using Token or windows credentials. On the base class TaskBase there is a Token and ProxyURL property for token based and Proxy based security. But I can't find any reference to exactly how to set the windows credentials. Only a statement that it is possible:

There are two approaches to accessing a secured service using HTTP/Windows authentication:

  1. Prompt the user to provide authentication credentials. Provide a dialog in the Silverlight application or use the browser to handle a challenge response from a secure service. The browser will provide a standard authentication dialog to enter a username and password. If using HTTP Basic authnication all communication with a service should be handled over a secure connection (HTTPS).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.