Requested Clipboard operation did not succeed
Having a similar problem. Found this entry,
which basically says to set retryTimes
to 2 in the call:
Clipboard.SetDataObject(object data, bool copy, int retryTimes, int retryDelay)
Going to try it. Would be nice if anyone could post a reproducible test case.
EASY! I had the same issue and fixed it.
Just open Task Manager, search for rdpclip.exe
under Processes
, kill it. Then, open a new task and run it again.
I had this problem with an app but only when running it on an HP mini.
If I have C# express running so I can check the exception,
shutting down Google Chrome removes the problem.
reopening Google Chrome causes it to reappear.
But on my main 64 bit machine, no problem; and on my previous 32 bit machine, no problem either. Side effect of limited RAM perhaps?
Gerald
The root cause is likely to be that you are doing two operations, typically a copy and a paste, and assume that the clipboard will be available. What happens is, that you do a copy (to update the clipboard) and then other clipboard viewers are reacting to it when you try to paste. The defense is to have an except/sleep/retry mechanism around the paste operation, so that you can handle it gracefully. Telling the user to shut down rpdclip and such, won't fly in a production application. Also make sure that you're not (ab)using the clipboard as a crutch. The clipboard is provided for the convenience of the USER, not the PROGRAMMER.