It is invalid to show modal dialog or ......

Discussion in 'ASP.NET / ASP.NET Core' started by plateheates, Sep 22, 2003.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. I've got following message.
    Please help me overcoming this problem.


    Server Error in '/pheprog' Application.
    > _____
    > It is invalid to show a modal dialog or form when the application is not
    > running in UserInteractive mode. 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: It is invalid to show
    > a modal dialog or form when the application is not running in
    > UserInteractive mode. 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: It is invalid to show a modal dialog or form
    > when the application is not running in UserInteractive mode. 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) +644
    > System.Windows.Forms.MessageBox.Show(IWin32Window owner, String text,
    > String caption, MessageBoxButtons buttons, MessageBoxIcon icon,
    > MessageBoxDefaultButton defaultButton, MessageBoxOptions options) +23
    > Microsoft.VisualBasic.Interaction.MsgBox(Object Prompt, MsgBoxStyle
    > Buttons, Object Title) +321
    > PHEProg.FluidProperty..ctor() in
    > c:inetpubwwwrootPHEProgFluidProperty.vb:231
    > PHEProg.Condition..ctor() in c:inetpubwwwrootPHEProgCondition.vb:70
    > PHEProg.ftmPHE.Button1_Click(Object sender, EventArgs e) in
    > c:inetpubwwwrootPHEProgfrmPHE.aspx.vb:112
    > System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108
    >
    > System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String
    > eventArgument) +57
    > System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
    > sourceControl, String eventArgument) +18
    > System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
    > +33
    > System.Web.UI.Page.ProcessRequestMain() +1277
    >
    >
    > _____
    >
    > Version Information:?Microsoft .NET Framework Version:1.1.4322.573;
    > ASP.NET Version:1.1.4322.903


    [xx(]
     
  2. Bruce

    Bruce DiscountASP.NET Staff

    pls post code that cause the error.

    In addition, please explain what you wish to do.

    I did some searching on goggle and found that this error is usually resulted when an asp application is try to open a message box.


    quote:Originally posted by plateheates

    I've got following message.
    Please help me overcoming this problem.


    Server Error in '/pheprog' Application.
    > _____
    > It is invalid to show a modal dialog or form when the application is not
    > running in UserInteractive mode. 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: It is invalid to show
    > a modal dialog or form when the application is not running in
    > UserInteractive mode. 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: It is invalid to show a modal dialog or form
    > when the application is not running in UserInteractive mode. 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) +644
    > System.Windows.Forms.MessageBox.Show(IWin32Window owner, String text,
    > String caption, MessageBoxButtons buttons, MessageBoxIcon icon,
    > MessageBoxDefaultButton defaultButton, MessageBoxOptions options) +23
    > Microsoft.VisualBasic.Interaction.MsgBox(Object Prompt, MsgBoxStyle
    > Buttons, Object Title) +321
    > PHEProg.FluidProperty..ctor() in
    > c:inetpubwwwrootPHEProgFluidProperty.vb:231
    > PHEProg.Condition..ctor() in c:inetpubwwwrootPHEProgCondition.vb:70
    > PHEProg.ftmPHE.Button1_Click(Object sender, EventArgs e) in
    > c:inetpubwwwrootPHEProgfrmPHE.aspx.vb:112
    > System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108
    >
    > System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String
    > eventArgument) +57
    > System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
    > sourceControl, String eventArgument) +18
    > System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
    > +33
    > System.Web.UI.Page.ProcessRequestMain() +1277
    >
    >
    > _____
    >
    > Version Information:?Microsoft .NET Framework Version:1.1.4322.573;
    > ASP.NET Version:1.1.4322.903


    [xx(]
    </blockquote id="quote"></font id="quote">
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page