c# - "500 Internal Server Error" occur when passing the HTTP request using EA Azure Billing API -


this code applicable azure ea customers. can't able guess browser setting issue or account relates issues. checked code ea account

static void main(string[] args) { string token ="xxxx" string url = "https://ea.azure.com/rest/{portalnumber}/usage-report?month=2/5/2016&type=summary"; string = callrestapi(url,token); }         static string callrestapi(string url, string token) { webrequest request = webrequest.create(url); request.headers.add("authorization", "bearer " + token);              request.headers.add("api-version", "1.0"); httpwebresponse response = (httpwebresponse)request.getresponse(); streamreader reader = new streamreader (response.getresponsestream()); return  reader.readtoend();  } 


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -