Solved

C# Clipboard.setdataobject throwing error

Posted on 2012-12-25
6
1,199 Views
Last Modified: 2013-03-02
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
0
Comment
Question by:Prak290679
  • 3
  • 2
6 Comments
 
LVL 75

Expert Comment

by:käµfm³d 👽
ID: 38720518
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?
0
 

Author Comment

by:Prak290679
ID: 38720527
Yes. You are right.
0
 
LVL 75

Expert Comment

by:käµfm³d 👽
ID: 38720551
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.
0
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 
LVL 15

Accepted Solution

by:
Ess Kay earned 500 total points
ID: 38721798
You can use showave flash to do it on client machine. close question and open a new one
0
 

Author Comment

by:Prak290679
ID: 38722277
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.
0
 

Author Comment

by:Prak290679
ID: 38945819
I've requested that this question be deleted for the following reason:

NA
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For most people, the WrapPanel seems like a magic when they switch from WinForms to WPF. Most of us will think that the code that is used to write a control like that would be difficult. However, most of the work is done by the WPF engine, and the W…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question