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
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.
I'm afraid I no longer use this forum due to the new point allocation system.
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.
I'm afraid I no longer use this forum due to the new point allocation system.
Member
10 Points
19 Posts
WebServer Error
Aug 19, 2013 04:04 AM|Sourcenew|LINK
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:
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1
All-Star
37441 Points
9076 Posts
Re: WebServer Error
Aug 19, 2013 04:44 AM|AidyF|LINK
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.
Member
10 Points
19 Posts
Re: WebServer Error
Aug 19, 2013 04:58 AM|Sourcenew|LINK
i don't use msgbox in my code, i guess when error accurded and server try to show message box this error accurded too.
All-Star
37441 Points
9076 Posts
Re: WebServer Error
Aug 19, 2013 05:18 AM|AidyF|LINK
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.