Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. InvalidOperationException was unhandled by user code

InvalidOperationException was unhandled by user code

Scheduled Pinned Locked Moved ASP.NET
helpsysadminquestionworkspace
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    Elizma
    wrote on last edited by
    #1

    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

    N P 2 Replies Last reply
    0
    • E 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

      N Offline
      N Offline
      N a v a n e e t h
      wrote on last edited by
      #2

      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

      E 1 Reply Last reply
      0
      • N N a v a n e e t h

        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

        E Offline
        E Offline
        Elizma
        wrote on last edited by
        #3

        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

        1 Reply Last reply
        0
        • E 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

          P Offline
          P Offline
          Paddy Boyd
          wrote on last edited by
          #4

          Can you show a snippet of how you are streaming the file to the client?

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups