invalidoperationexception

System.InvalidOperationException on starting C# web server(form based) through SSH

I get this particular exception when starting the Cassini Web Server(to be run on a remote machine) after logging into the remote machine through SSH: Unhandled Exception: System.InvalidOperationException: Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation. Specify the...

.NET, XmlSerializer InvalidOperationException, due to XmlSchema definition?

I've uploaded a ZIP file containing both the XML file I'm trying to read and the corresponding XSD files to http://www.bonnland.de/FIBEX.zip I'm trying to deserialize the following XML (fragment) using XmlSerializer. While doing so I get the error: (Sorry for it being German I'll give a rough translation in italics) System.InvalidOper...

WPF DataGrid ComboBox causes InvalidOperationException

I am getting an InvalidOperationException('DeferRefresh' is not allowed during an AddNew or EditItem transaction.) from my datagrid when I try to edit the value of a combo box column. The items I am showing all have a reference to one other item in the same list so this is what I am using the combobox for. It is bound to the same collect...

Generating and passing complex content to the GUI thread in WPF/C#

I'm aware, and use, the xxx.Dispatcher.Invoke() method to get the background thread to manipulate GUI elements. I think I'm bumping up against something similar, but slightly different, where I want a long running background task to construct a tree of objects and when done hand it to the GUI for display. Attempting to do that results i...

WCF invalidoperationexception

Hi to all. I encounter this strange problem while using wcf services along with L2SQL DAL. The server is hosted at the localhost and contains an implementation of the correspondent interface. The client is familiar with the interface and occasionally queries the database via the exposed service using tcp transport. When client runs loca...

Why does this error not get caught?

I have the following code in my project, deleteselector is a form that has a datagridview (with autosize columns) on it. try { if (deleteSelector.ShowDialog() == DialogResult.OK) { } } catch (InvalidOperationException) { //Bug workaround } The try catch is because a pop-up form with a gridview on it trows a inval...

Socket/threading problem: The Undo operation encountered a context that is different from what was applied in the corresponding Set operation

Hi, I'm having problems with the above much asked-about error. We have a TCP/IP server application which has been working fine for some years. I now need to allow the application to accept connections from directly connected USB devices, by internally using a socket connection to patch through to localhost (127.0.0.1) within the server...

Highlight Search TextBlock

My goal is to create a custom TextBlock control that has a new dependency property, SearchText. This property will contain a regular expression. All occurrences of this regular expression in the text of the TextBlock will be highlighted using a custom style (another DP). My current implementation involves clearing all of the Inline obje...

InvalidOperationException when creating LinearGradientBrush in multi-threaded WPF app

In a static C# method, I do var brush = new LinearGradientBrush(_snazzyGradient);, and this line throws an exception. _snazzyGradient is defined as follows: private static readonly GradientStopCollection _snazzyGradient = new GradientStopCollection { new GradientStop((Color)ColorConverter.ConvertFromString("#DBF3FF"), 0...