If am using below code to get authentication response from service.
using (var client = new HttpClient())
{
client.BaseAddress = new Uri
var content = new FormUrlEncodedContent(new[]
{
new KeyValuePair<string,>("username", _username),
new KeyValuePair<string,>("password", _password)
});
var response = client.PostAsync("api/authorize", content).Result;
}
However getting aggregate exception and inside it, below exceptions are given:
{"An error occurred while sending the request."}
{"Unable to connect to the remote server"}
{"No connection could be made because the target machine actively refused it 216.167.113.4:443"}
Have gone through some of the forums and one of the possible reason could be Firewall ( on which i have no rights to put it on in OFF mode)
But if I am able to access the same service through browser I am able to access.
So not sure whether its a firewall problem or not. Can anyone please suggest or guide me, how can I be sure of the root cause of this problem.
Struggling a lot with this issue, please help me out