string tokenService = "http://hostname/ArcGIS/tokens?request=getToken&username=test&password=my.password&expiration=30"; System.Net.WebRequest request = System.Net.WebRequest.Create(tokenService); System.Net.WebResponse response = request.GetResponse(); System.IO.Stream responseStream = response.GetResponseStream(); System.IO.StreamReader readStream = new System.IO.StreamReader(responseStream); theToken = readStream.ReadToEnd();
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.