Consuming Secured Service

Discussion created by rcoodey on Oct 18, 2012
Latest reply on Jul 3, 2013 by 024fpt
Our AGS 10.1 uses Windows Domain security and has a service that is secured with an AD group.  The map layers are already being setup in code behind so I added the line:

layer.Credentials = CredentialCache.DefaultCredentials

But when launching the WPF app the layer still throws an error "Token Required".  Sounds like I need to generate a token and pass that to the service... but I DO NOT want the user to have to type in their login/password... it needs to use their currently logged in windows account.  I see we can programmatically generate tokens, but again, don't want to prompt the user for login.

Any help on passing the users currently logged in credentials to the service layer would be great!  FYI, using the 2.4 API...

Thanks a lot!