Avatar of MichaelMarom
MichaelMarom asked on

What is the meaning of that error, and how to fix it ?

Hi,

I wrote an application in Winforms that communicate asynchronously with a web service.
My problem is that sometimes (not always) (when I call methods asynchronously of the web service)  I got the TargetInvocationException with following inner exception message :
"An error occured during asynchronous processing, an unique state object is required to enable multiple synchronous operations to be saved".
The COMPlus exception code of this exception is 0xe0434f4d
and the HResult is 0x80131604.
This error occured at the Main method of the "Program.cs" file.
When that exception is occured my application is terminated.
Please tell me why this error is occured, and how to fix it.

Thanks
Michael
C#

Avatar of undefined
Last Comment
MichaelMarom

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
dkloeck

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
ASKER
MichaelMarom

Thanks, I had solved it before, by putting the web service functionality in a thread.
The problem was created because each method at the web service was called asynchronously more than one time in the same time.
I give you the question's point.

Thanks for your answer.
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck