I'm trying to learn how to bring the Arcgis Server 10.1 built-in authentication to the rest of my .net application. I was wondering if anyone has tried, and could share their experience/suggestions. I've read the documentation at https://developers.arcgis.com/en/authentication/non-oauth2.html, but I'm not familiar with how to use tokens. I would refer to a .Net SDK, but I don't know which one to pick from all the Microsoft options. Can anyone point me to any resources regarding this topic?
Seems I've found my solution. I first generate the token from /arcgis/tokens/generateToken. Then write the token to a cookie named, agstoken. From there, I just have to test the validity of the token. The easiest method I could come up with is to try access a folder that requires authentication. If I don't get an http 400 code, then I know I'm logged in/have a valid cookie.
I would have gone with appending the token to a url, but it seems that appending does not work when trying to access private directories.
Seems I've found my solution. I first generate the token from /arcgis/tokens/generateToken. Then write the token to a cookie named, agstoken. From there, I just have to test the validity of the token. The easiest method I could come up with is to try access a folder that requires authentication. If I don't get an http 400 code, then I know I'm logged in/have a valid cookie.
I would have gone with appending the token to a url, but it seems that appending does not work when trying to access private directories.