Month: May 2020
-
Cannot load Counter Name data because an invalid index ” was read from the registry
Cannot load Counter Name data because an invalid index ” was read from the registry When we are trying to read system performance counters, some time we will get this type of error on machines. “Cannot load Counter Name data because an invalid index ” was read from the registry” To fix the issue: Click…
-
Java.IO.IOException: ‘Cleartext HTTP traffic to xxx.xxx.xxx.xxx not permitted’
Goto Android Project, then click on properties, Click on AssemblyInfo.csAdd: [assembly: Application(UsesCleartextTraffic =true)]
-
RESTSHARP: GET / POST/ DOWNLOAD and UPLOAD with and without Authentication
//GET: var client = new RestClient(“http://www.example.com/”); client.Authenticator = new HttpBasicAuthenticator(“username”, “password”); var request = new RestRequest(URI, Method.GET); request.AddQueryParameter(“id”, customid); var queryResult = client.Execute(request).Content; //POST: var client = new RestClient(“http://www.example.com/”); client.Authenticator = new HttpBasicAuthenticator(“username”, “password”); var request = new RestRequest(URI, Method.POST); request.RequestFormat = DataFormat.Json; request.AddQueryParameter(“id”, customid); request.AddBody(Parameters); IRestResponse response = client.Execute(request); //DOWNLOAD FILE: var client =…