Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- string url = ConfigurationManager.AppSettings["ArcGIS_Server_URL"] + "/tokens/generateToken/?f=pjson";
- string data = string.Format("username={0}&password={1}&client=requestip&expiration={2}", username, password, ConfigurationManager.AppSettings["TokenExpirationTime"]);
- url = string.Format("{0}&{1}", url, data);
- // Create a new web request
- CustomWebRequest request = new CustomWebRequest(url, "POST");
- //Get Response
- string requestResult = request.GetResponse();
- Generate Token request should not contain username and password in the query string
Add Comment
Please, Sign In to add comment