web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

Exception thrown: 'System.Net.WebException' in System.Web.Services.dll

(0) ShareShare
ReportReport
Posted on by 160

Hi!:

I had an error, CLRInterop in Ax 2,009 calling a C# class.

Now, I don't have the issue in Ax.

But, in the C# class, I get this message calling the send method

(user, password and class with document).

public class Send
{
    public String returnValue;
public String SendDocument(String _User, String _Password, DocumentoElectronico documentoElectronico) { System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls; AXV5ElectronicInvoice.WebService.Service service = new Service(); System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls; try { EnviarResponse enviarResponse = new EnviarResponse(); var responseCode = service.Enviar(_User, _Password, documentoElectronico); returnValue = responseCode.ToString();  return returnValue; } catch(Exception ex)         { returnValue = ex.Message; return returnValue;         } } }
What can be wrong?. The site only ask for user, password and class instance.



I have the same question (0)
  • Martin Dráb Profile Picture
    237,801 Most Valuable Professional on at

    You mentioned the the type of the exception, but nothing more. Please tell us what the message says, what is the value of the StackTrace property, and if there is an InnerException, share its details too.

    Trying to find a solution without knowing what error we got is close to impossible.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 664 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 522 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 303 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans