Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3979980
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T05:14:11+00:00 2026-05-20T05:14:11+00:00

I like to user custom errors in my site. The Idea is to trap

  • 0

I like to user custom errors in my site.
The Idea is to trap errors and display friendly meaningful messages to users.
The real error details (line number, Page …) will sent to me by e-mail.
I am programming in VB.NET.
Until now every code that i found about this say’s that i must use the global.asax for it.
I do not like to use global.asax, I just like to make an error page that will sent me a -email with all the error details.
Until now, i go to the web.config file and insert this line:

<customErrors defaultRedirect="test.aspx" mode="On"></customErrors>

test.aspx looks like this:

Sub Page_Error(sender as Object, e as EventArgs) Dim ctxOBJ As HttpContext Dim exceptionOBJ As Exception Dim errorInfoTXT As String ctxOBJ = HttpContext.Current() exceptionOBJ = ctxOBJ.Server.GetLastError() errorInfoTXT = "
Offending URL: " & ctxOBJ.Request.Url.ToString() & _ "
Source: " & exceptionOBJ.Source.ToString() & _ "
Message: " & exceptionOBJ.Message.ToString() & _ "
Stack trace: " & exceptionOBJ.StackTrace.ToString() & _ "

Target Site: " & exceptionOBJ.TargetSite.ToString() ctxOBJ.Response.Write (errorInfoTXT) ctxOBJ.Server.ClearError () End Sub

When here is an error in some page its redirect me to test.aspx but not showing any error.

Thanks,

Roy Shoa.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T05:14:12+00:00Added an answer on May 20, 2026 at 5:14 am

    You just need to change this to

    Sub Page_Load(sender as Object, e as EventArgs)
    

    It’s not the error page that’s erroring, so its error event never fires.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a custom user control with a textbox on it and I'd like
we've created a custom webpart to display announcements from all lists a user has
i have in the database typical tables like user, usergroup, and they have relations.
How do I create subdomain like http://user.mywebsite.example ? Do I have to access .htaccess
I'm embedding a Flash video into an HTML and would like the user to
Has anyone used delegates with exchnage web services? I would like one user to
I'm working on a time sheet application, where I'd like the user to be
We would like to have user defined formulas in our c++ program. e.g. The
I'd like to allow user to change the setting of app. But I am
i want something like this the user enter a website link i need check

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.