Global.asax not firing

Discussion in 'ASP .Net' started by Eric Layman, Apr 24, 2007.

  1. Eric Layman

    Eric Layman Guest

    Hi everyone,

    Currently Im using Global.asax.vb to capture any errors and to send them via email to me.

    But I didn't get any emails when I purposely crash the web application.

    May I know what I am missing here?

    I've copied (shamelessly) the script from here:
    (I changed the email address of course)

    And my web.config's customerror mode is set to "Off"

    Do I need any special config on my IIS?

    Please advise

    Eric Layman, Apr 24, 2007
    1. Advertisements

  2. Are you sure that this
    is right for you?

    Did you tried to send any "normal" email from your application?
    Alexey Smirnov, Apr 24, 2007
    1. Advertisements

  3. Eric Layman

    Eric Layman Guest

    ----- Original Message -----
    From: "Alexey Smirnov" <>
    Newsgroups: microsoft.public.dotnet.framework.aspnet
    Sent: Tuesday, April 24, 2007 15:38
    Subject: Re: Global.asax not firing

    Yes. I tried to send normal mail and it works fine.

    I've removed the line SmtpMail.SmtpServer = "localhost"

    The other script that sends email also uses something similiar as above.
    Eric Layman, Apr 24, 2007
  4. Well, look at the following thread:

    If it doesn't help, try to debug your code to understand where the
    problem is - 1) global.asax doesn't work 2) Application_Error not
    fired 3) etc.
    Alexey Smirnov, Apr 24, 2007
  5. Eric Layman

    Eric Layman Guest


    I've tried another way to script the asax file .But I got this following
    error from visual studio's (visual web developer 2005 express edition)

    " runtime error: there is no build provider registered for the
    extension .asax. you can register one in the <compilation><buildproviders>
    section in machine.config or web.config. make sure is has a
    BuildProviderAppliesToAttribute which inclues the value 'web' or 'all'"

    What does that means?

    Btw, when I do aspx projects, i simply write from scratch. I don't build a
    solution nor project from scratch. Does it matters?

    I come from traditional asp background. Still adapting..

    Eric Layman, Apr 24, 2007
  6. Do you have the .Net Framework 1.1 installed ?

    Juan T. Llibre, Apr 24, 2007
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.