Runtime Error

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pavya
    New Member
    • Feb 2008
    • 5

    Runtime Error

    Hi to all,

    I am sending an email by using VB with ASP.Net. The code is as follows...

    MMsg = New MailMessage
    MMsg.From = GetUserEmail()
    MMsg.To = txtto.Text
    MMsg.Subject = "Invitation...! "
    MMsg.Body = Invitation
    MMsg.Priority = MailPriority.Hi gh
    SmtpMail.SmtpSe rver = "MyServername"
    SmtpMail.Send(M Msg)

    it works fine whenever running this on local network but it shows an runtime error after publishing on web. The error messsage is as follows...


    Runtime Error
    Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.

    Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors > tag within a "web.config " configuration file located in the root directory of the current web application. This <customErrors > tag should then have its "mode" attribute set to "Off".




    Anybody can help why this error occurs?

    Thanks
  • DrBunchman
    Recognized Expert Contributor
    • Jan 2008
    • 979

    #2
    Hi there

    If you read this error carefully you'll notice that it is a generic error message indicating that something has gone wrong rather than a specific error message. To find out the actual cause of the problem you need to either:

    Create a custom error tag as described above or

    Log on to the server which hosts this site (if you can) and browse the site from there.

    Doing either of these will give you the actual exception being thrown.

    Hope this helps,

    Dr B

    Comment

    • Plater
      Recognized Expert Expert
      • Apr 2007
      • 7872

      #3
      There is a setting in the web.config file that dictates if "real" error messages are shown, it is set to "not show" them currently. You can enable this feature (I recomend only temporarly)and view where the real error is comming from.

      I would guess that the server you publish to, does not have various email-related settings configured in its IIS?

      Comment

      Working...