Quantcast
Channel: Forums - Recent Threads
Viewing all articles
Browse latest Browse all 143529

Dynamics Web API v9.0 Error Occured

$
0
0

We are developing programs using the Dynamics Web API version 9.0.

There was no problem as of December 2017, but when I confirmed it on January 18, 2018, an error occurred.

----------------------------------

Error Detail:

An error occurred while sending the request

Unable to read data from transfer connection: Existing connection was forcibly disconnected to remote host.

----------------------------------

Error occurred with "httpClient.GetAsync".

----------------------------------

public async Task GetCrmUser()

{

using (HttpClient httpClient = GetHttpClient())
{

HttpResponseMessage response = await httpClient.GetAsync($"systemusers");

}

}

private HttpClient GetHttpClient()

{
HttpClient client = new HttpClient(new HttpClientHandler() { AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate });
client.BaseAddress = new Uri(appSetting.crmWebApi);
ADALService adalService = new ADALService();
string accessToken = adalService.GetAccessToken(appSetting.authUri, appSetting.crmUri, appSetting.clientId, appSetting.userName, appSetting.password);
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue(con.GetConstValue(con.authenticationHeaderValue), accessToken);
if (!string.IsNullOrEmpty(callerSystemUserGuid))
{
     client.DefaultRequestHeaders.Add(”Bearer”, callerSystemUserGuid);
}
return client;

}

----------------------------------

AccessToken has been acquired.

Also, it works well for instances of Dynamics 8.2 in the same tenant.

Is 9.0 no longer able to use the API in this way?

I want you to tell me something you know, if you have anything to know.


Viewing all articles
Browse latest Browse all 143529

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>