question

manish avatar image
manish asked ·

Trying to send FAX from C# ASP.Net code on Windows 7 - .Net 4.0. has anyone done this? any help will be appreciated

below is the C# code.  suggest any changes if required. This returns authorization failure code = 1.  do I need to change any settings or configuration on ringcentral setup? if you can point to any mistakes following code is making.
====
var formData = new System.Collections.Specialized.NameValueCollection(); formData["Username"] = "Username";
formData["Password"] = "Alphanumeric Password";
formData["Recipient"] = "8664376797";
formData["Coverpagetext"] = "Test Fax Content";
 formData["Resolution"] = "High";
 string serverUrl = " https://service.ringcentral.com/faxapi.asp";
 Uri RequestUri = new Uri(serverUrl);
 using (var multiPartContent = new MultipartFormDataContent())
 {
     foreach (string key in formData)
     {
           multiPartContent.Add(new StringContent(formData[key]), "\"" + key + "\"");
     }
HttpRequestMessage httpRequest = new HttpRequestMessage();
httpRequest.Method = HttpMethod.Post;
httpRequest.RequestUri = RequestUri;
httpRequest.Content = multiPartContent;
try
{
     HttpClient httpClient = new HttpClient();
     var httpResponse1 =    httpClient.SendAsync(httpRequest);
     var result = httpResponse1.Result;
     Response.Write(result.Content);
 }
 finally
 {
     if (httpRequest != null)
     { httpRequest.Dispose();
     }
 }
topic-default
1 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

1 Answer

· Write an Answer
mike avatar image
mike answered ·
Hi Manish,  I see you opened a case for this issue and they stated "The FaxOut API works with HTML but we do not have samples of codes for the other languages".  Sorry we were unable to help with this issue. 

Mike 
Share
1 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Customer Spaces