PDA

View Full Version : رفع مشکل خطای شمار 7



sunboy
جمعه 08 خرداد 1383, 16:02 عصر
با سلام

دوستان من تازه از شر یه خطا راهت شده بودم که این خطا یهنی خطای شماره هفت طبق PDFاقای نصیری می اد یعنی این


Server Error in '/WebApplication1' 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:


Line 23:
Line 24: Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Line 25: MsgBox("load")
Line 26: End Sub
Line 27: End Class


Source File: d:\inetpub\wwwroot\WebApplication1\WebForm1.aspx.v b Line: 25

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(IWin32Win dow owner, String text, String caption, MessageBoxButtons buttons, MessageBoxIcon icon, MessageBoxDefaultButton defaultButton, MessageBoxOptions options)
System.Windows.Forms.MessageBox.Show(IWin32Window owner, String text, String caption, MessageBoxButtons buttons, MessageBoxIcon icon, MessageBoxDefaultButton defaultButton, MessageBoxOptions options)
Microsoft.VisualBasic.Interaction.MsgBox(Object Prompt, MsgBoxStyle Buttons, Object Title)
WebApplication1.WebForm1.Button1_Click(Object sender, EventArgs e) in d:\inetpub\wwwroot\WebApplication1\WebForm1.aspx.v b:25
System.Web.UI.WebControls.Button.OnClick(EventArgs e)
System.Web.UI.WebControls.Button.System.Web.UI.IPo stBackEventHandler.RaisePostBackEvent(String eventArgument)
System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler sourceControl, String eventArgument)
System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData)
System.Web.UI.Page.ProcessRequestMain()




--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.0.3705.0; ASP.NET Version:1.0.3705.0

من هیچ کاری هم روی فولدر مجازی نکردم

حالا ما چی کار کنیم از شر این یکی هم خلاص شیم
مرسی

sanaz_amiri
جمعه 08 خرداد 1383, 18:29 عصر
سلام
من فکر نکنم بتونید msgbox استفاده کنید به جای اون باید از دستور alert استفاده کنید