Copy link to clipboard
Copied
Hi,
I am getting the below error while making a https request from my Acrobat plugin, also below is the code that is used to make the api call
System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a receive. ---> System.ComponentModel.Win32Exception: No credentials are available in the security package
using (var httpClient = new HttpClient(handler))
{
try
{
using var fileStream = File.OpenRead(filePath);
using var requestMessage = new HttpRequestMessage(HttpMethod.Post, uri);
using var content = new MultipartFormDataContent
{
{ new StreamContent(fileStream), "file", "test.pdf" }
};
requestMessage.Content = content;
using var response = await httpClient.SendAsync(requestMessage);
MessageBox.Show(response.StatusCode.ToString());
//response.EnsureSuccessStatusCode();
}
catch (Exception e)
{
MessageBox.Show(e.ToString());
//throw;
}
}
Copy link to clipboard
Copied
What exactly do you mean by "plug-in"?
What language are you writing in? and on what platform?