Link to home
Start Free TrialLog in
Avatar of Prak290679
Prak290679

asked on

C# Clipboard.setdataobject throwing error

Requested Clipboard operation did not succeed.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Runtime.InteropServices.ExternalException: Requested Clipboard operation did not succeed.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.  

Stack Trace:


[ExternalException (0x800401d0): Requested Clipboard operation did not succeed.]
   System.Windows.Forms.Clipboard.SetDataObject(Object data, Boolean copy, Int32 retryTimes, Int32 retryDelay) +1198
   System.Windows.Forms.Clipboard.Clear() +144
   System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +154
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3707
Avatar of kaufmed
kaufmed
Flag of United States of America image

Is this an ASP.NET application (you have it tagged as such). If so, you realize that when referring to the "Clipboard" you are dealing with that on the server, not the client machine, yes?
Avatar of Prak290679
Prak290679

ASKER

Yes. You are right.
Does that mean you were attempting to set the clipboard on the client's machine? I believe there is a way to do this with a Flash plugin, but I haven't done so myself. I'm sure you could find an example of it online.
ASKER CERTIFIED SOLUTION
Avatar of Ess Kay
Ess Kay
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I am sorry. I am not setting clipboard in the client machine. I am settin it in the server code.
It worked pretty well in the development server since both client and server are same machine.But, when I installed in UAT server, it does not work.

Also, curious to know if I can use execcommand("Copy") using javascript..its just like using copy and paste of right click in any screen..

thanks.
I've requested that this question be deleted for the following reason:

NA