locked
WebServer Error RRS feed

  • Question

  • User550592031 posted

    hi, my web site is online on 2 server now(2008 r2)

    but when i try to run it on another server i get this message...

    Please help me...


    Server Error in '/' Application.


    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.

    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.InvalidOperationException: 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.

    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:

    [InvalidOperationException: 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.]
       System.Windows.Forms.MessageBox.ShowCore(IWin32Window owner, String text, String caption, MessageBoxButtons buttons, MessageBoxIcon icon, MessageBoxDefaultButton defaultButton, MessageBoxOptions options, Boolean showHelp) +633
       System.Windows.Forms.MessageBox.Show(IWin32Window owner, String text, String caption, MessageBoxButtons buttons, MessageBoxIcon icon, MessageBoxDefaultButton defaultButton, MessageBoxOptions options) +45
       Microsoft.VisualBasic.Interaction.MsgBox(Object Prompt, MsgBoxStyle Buttons, Object Title) +384
       Web_Monitor.StationsStatusGlance.Search() in E:\Web_Monitor\Web_Monitor\Web_Monitor\index.aspx.vb:907
       Web_Monitor.StationsStatusGlance.Page_Load(Object sender, EventArgs e) in E:\Web_Monitor\Web_Monitor\Web_Monitor\index.aspx.vb:97
       System.Web.UI.Control.LoadRecursive() +71
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3048
    



    Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1

    Monday, August 19, 2013 4:04 AM

Answers

  • User-760709272 posted

    If you don't use it directly, something you are referencing in Web_Monitor.StationsStatusGlance.Search() is using it.  There is a link to Windows.Forms so it looks like you are using a control or library that is intended for use in a dektop app.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, August 19, 2013 5:18 AM

All replies

  • User-760709272 posted

    You can't use MessageBox in server-side code.  The messagebox shows on ther server that a) doesn't have access to the desktop b) there is no-one there to click "ok" so it stays there forever, hanging your code.

    If this worked locally it was because you were running your IIS as the logged-in user so IIS did have access to the desktop.

    Monday, August 19, 2013 4:44 AM
  • User550592031 posted

    i don't use msgbox in my code, i guess when error accurded and server try to show message box this error accurded too.

    Monday, August 19, 2013 4:58 AM
  • User-760709272 posted

    If you don't use it directly, something you are referencing in Web_Monitor.StationsStatusGlance.Search() is using it.  There is a link to Windows.Forms so it looks like you are using a control or library that is intended for use in a dektop app.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, August 19, 2013 5:18 AM