none
Strange error UserInteractive mode RRS feed

  • Question

  • I am receiving this error occasionally.

     

    "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."

     

    Now I only receive this error when I have an incorrect config file that contains connection string and other info. This session the error occured when I tried to do a search and it failed because of the connection string. The question is what causes this error and is it a concern?

    Friday, April 25, 2008 10:05 PM

Answers

  • Having a service interact with the desktop is tricky business.  For one, there might not even be a desktop when no user is logged-in.  For another, Vista clamped-down on the "Allow service to interact with the desktop" option due to a nasty security problem.  Last but not least, a user is going to be seriously mystified by a message box with a cryptic error message popping up out of nowhere.  Services should log their errors in the Event Log.  If necessary, use a separate GUI app that runs in the system tray and talks to the service through Remoting.  A balloon can provide unintrusive alerts.
    Saturday, April 26, 2008 12:25 PM
    Moderator

All replies

  • These are members in the MessageBox options enumeration.  I guess in your code you are showing a messagebox when there in an invalid config?  This is a service or some task maybe that runs under a different user?
    Saturday, April 26, 2008 6:25 AM
  • Having a service interact with the desktop is tricky business.  For one, there might not even be a desktop when no user is logged-in.  For another, Vista clamped-down on the "Allow service to interact with the desktop" option due to a nasty security problem.  Last but not least, a user is going to be seriously mystified by a message box with a cryptic error message popping up out of nowhere.  Services should log their errors in the Event Log.  If necessary, use a separate GUI app that runs in the system tray and talks to the service through Remoting.  A balloon can provide unintrusive alerts.
    Saturday, April 26, 2008 12:25 PM
    Moderator
  • but considering that i have full access to the server, is there a way to enable the UserInteractive mode so that i can fully use all the functionalities of my Asp.Net application?

    Thanks in advance
    Tuesday, June 10, 2008 8:33 PM