[stackoverflow] [progress Openedge Abl] How To Use Multi-threaded .net Object In Openedge

Status
Not open for further replies.
A

Andrew Stalker

Guest
I am using the .NET SmtpClient class to send an email from an AppServer procedure. I have implemented some simple code to test, based on the syntax found here: https://msdn.microsoft.com/en-us/library/system.net.mail.smtpclient(v=vs.110).aspx

All of the OpenEdge syntax is correct (using the class browser, it is simple to translate the code), but the problem line is here:

mailClient:send(mailMessage).


When running the code the following error is shown:

You are trying to use a multi-threaded .NET object in a way that is not supported. The ABL cannot be called on a thread other than the main thread. (15740) The ABL is single threaded. You will see this error if you use a .NET object that employs multiple threads and attempts to call back to the ABL on a thread other than the main processing thread.

My question is how do you use a multi-threaded .NET object in ABL since it is single threaded.

Initially documentation suggested using the WAIT-FOR statement, however this did not change the result.

Continue reading...
 
Status
Not open for further replies.
Top