InvalidOperationException was unhandled by user code
-
Hi Clever People. I have create an application that exports data to Excel. It first writes the data to a FileStream where it will ask you if you want to open or save the Excel file. Now the problem is that it works very well on our one server. Unfortunately we decided to move all applications accross to a different server. They both are identical where setup is concerned, but for some or other reason I am getting the Following Error when trying to Export to Excel. InvalidOperationException was unhandled by user code. Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application. Can anyone tell me what we might have missed please? Kind regards, Elizma
-
Hi Clever People. I have create an application that exports data to Excel. It first writes the data to a FileStream where it will ask you if you want to open or save the Excel file. Now the problem is that it works very well on our one server. Unfortunately we decided to move all applications accross to a different server. They both are identical where setup is concerned, but for some or other reason I am getting the Following Error when trying to Export to Excel. InvalidOperationException was unhandled by user code. Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application. Can anyone tell me what we might have missed please? Kind regards, Elizma
Elizma wrote:
Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application.
I have not experienced this yet. But Google[^] returned many many results
All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia My Website | Ask smart questions
-
Elizma wrote:
Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application.
I have not experienced this yet. But Google[^] returned many many results
All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia My Website | Ask smart questions
Hi There, Thanx for your reply. I also googled it before I came to post my question here. Unfortunatley nowhere in the over 600 results does it actually state what is causing it. They also cover the MsgBox problems. I am not making use of it. I am using the normal Filestream objects. Like I said. It works on our one server, but not on the new server. I am trying to figure out what we missed with the new server. Kind Regards, Elizma
-
Hi Clever People. I have create an application that exports data to Excel. It first writes the data to a FileStream where it will ask you if you want to open or save the Excel file. Now the problem is that it works very well on our one server. Unfortunately we decided to move all applications accross to a different server. They both are identical where setup is concerned, but for some or other reason I am getting the Following Error when trying to Export to Excel. InvalidOperationException was unhandled by user code. Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application. Can anyone tell me what we might have missed please? Kind regards, Elizma
Can you show a snippet of how you are streaming the file to the client?