1 Replies - 2944 Views - Last Post: 23 February 2011 - 05:07 AM Rate Topic: -----

#1 Rady007  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 23-February 11

Errors in Accessing ASP.NET after uploading

Posted 23 February 2011 - 01:31 AM

Rady007

Dear sir,

Hello! I am a IT student. I have some problems that need someone like you to help me. The problem is like that, after I completed my web developing assignment in ASP.NET, I tried to run all pages in localhost, but no error happened. Therefore, I started to upload it to a hosting domain. However, after uploading complete I tried to test the pages then it show this below error.



<!-- Web.Config Configuration File -->

<configuration>
<system.web>
<customErrors mode="Off"/>
</system.web>
</configuration>


Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.

<!-- Web.Config Configuration File -->

<configuration>
<system.web>
<customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
</system.web>
</configuration>



Moreover, after reading the errors I began to correct it by changing in the web.config file, I change <customErrors mode="off"/> like shown below.

<configuration>
<system.web>
<customErrors mode="Off"/>
</system.web>
</configuration>
Nevertheless, this above error disappeared, but the new error occured. This new error message is like below.


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:

Line 43: Sub QuickBooking()
Line 44: If txtname.Text = "" Then
Line 45: MsgBox("Please input your full name", MsgBoxStyle.Information, "Full Name")
Line 46: txtname.Focus()
Line 47: ElseIf txtphoneno.Text = "" Then


Source File: C:\HostingSpaces\grandppgolf\grandphnompenhgolf.com\wwwroot\AboutUs.aspx Line: 45

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) +2662442
System.Windows.Forms.MessageBox.Show(IWin32Window owner, String text, String caption, MessageBoxButtons buttons, MessageBoxIcon icon, MessageBoxDefaultButton defaultButton, MessageBoxOptions options) +26
Microsoft.VisualBasic.Interaction.MsgBox(Object Prompt, MsgBoxStyle Buttons, Object Title) +560
ASP.aboutus_aspx.QuickBooking() in C:\HostingSpaces\grandppgolf\grandphnompenhgolf.com\wwwroot\AboutUs.aspx:45
ASP.aboutus_aspx._Lambda$__1(Object a0, EventArgs a1) in C:\HostingSpaces\grandppgolf\grandphnompenhgolf.com\wwwroot\AboutUs.aspx:178
System.Web.UI.WebControls.Button.onclick(EventArgs e) +111
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +110
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565


Version Information: Microsoft .NET Framework Version:2.0.50727.4206; ASP.NET Version:2.0.50727.4209



Thus, via the my descriptions about the errors I found in my upload ASP.NET pages to the hosting domain, please kind to help me by any effective comments.

I am looking forward to hearing from you.Please send me your comments through this email: ********************

Thanks you in advance for you take time and supports,

Mod Edit: Please keep all collaboration in the forums. Part of being a community is about shared help.

Is This A Good Question/Topic? 0
  • +

Replies To: Errors in Accessing ASP.NET after uploading

#2 Nakor  Icon User is offline

  • Professional Lurker
  • member icon

Reputation: 448
  • View blog
  • Posts: 1,504
  • Joined: 28-April 09

Re: Errors in Accessing ASP.NET after uploading

Posted 23 February 2011 - 05:07 AM

MsgBox is a Windows Forms method, it can't be used in asp.net pages. You would instead need to call a javascript alert box to display your message.

This post has been edited by Nakor: 23 February 2011 - 05:07 AM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1