473,806 Members | 2,248 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Error message different than Context.Server. GetLastError.Me ssage

I have an error routine in my Global.asax that gives me a different message
than asp.net when you let it give you the error page.

My error routine looks like:

*************** *************** *************** **********
Sub Application_Err or
Dim objMail As New MailMessage

objMail.From = "tf*@ftsolution s.com"
objMail.To = "tf*@ftsolution s.com"
objMail.Subject = "Error at Web site"
objMail.Body = Request.Path
objMail.Body &= vbNewLine
objMail.Body &= Context.Server. GetLastError.Me ssage
SmtpMail.Send(o bjMail)
Context.Server. ClearError()
End Sub
*************** *************** *************** ***

The message sent to me is:

/development/staffing/SkillsTestDispl ay.aspx
External component has thrown an exception.

The page that asp displays is:

*************** *************** *************** *****
Description: An error occurred during the compilation of a resource
required to service this request. Please review the following specific error
details and modify your source code appropriately.

Compiler Error Message: BC30451: Name 'Global' is not declared.

Source Error:

Line 34: Sub Page_Load(sende r as Object, e as EventArgs)
Line 35: dim temp as string
Line 36: temp = Global.tom()
Line 37:
Line 38: response.write( "temp = ")

Source File: c:\inetpub\wwwr oot\development \staffing\Skill sTestDisplay.as px
Line: 36
*************** *************** *************** *************** ********

Why don't I get the error:

Compiler Error Message: BC30451: Name 'Global' is not declared.

The message that an exception was thrown doesn't tell me anything.

Thanks,

Tom

Nov 19 '05 #1
0 1425

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
8315
by: ad | last post by:
I use GenericErrorPage.aspx for the redirect page when some error occur. I want to show some different according error statusCode . How can I get error statusCode form Server.GetLastError()?
25
17227
by: moondaddy | last post by:
I have an application where users need to upload images and in my web.config file I have a setting like this: <httpRuntime maxRequestLength="512" /> Which restricts image larger than 500k from being uploaded. I'm also using the HtmlInputFile control to do the uploading. My problem is that when the user's file size exceeds 512k, the page immediately redirects to the "The page cannot be displayed" error page which is very confusing. ...
1
1090
by: Lloyd Dupont | last post by:
I try to manage error in my application, I have set customErrors=On in the web config and redirect them to a custom web (.aspx) page of mine. unfortunately in case of error, for some reason, when I reach error.aspx Server.GetLastError() return null. I decided to use the error event in Global and write Session = Server.GetLastError(). unfortubately, while it works in 1.1, in 2.0 betat I get an exception kind
3
2322
by: Steve Taylor | last post by:
Here's what happening: - I have a global error trap set in global.asax defined as: protected void Application_Error(Object sender, EventArgs e) { HttpContext.Current.Server.Transfer("/salesnow/errors/SalesNow_Error.aspx"); } - My users are on occassion are getting the error: "Server Error in '/Salesnow' Application - Request timed out." - No aspx page is referenced anywhere in the *ugly* default error page.
6
2909
by: Plat | last post by:
I've Googled this for a while, to no avail. Hopefully someone can help me. Maybe I'm using the wrong terminology. Here's the scoop! Let's say I've got a simple *.ASPX page that has a syntax error. For example, broken.aspx might only contain the following line of code: <% Dim x as %> When I visit this page from my Web browser, I see all the helpful ASP.NET Server Error information, including:
3
511
by: tshad | last post by:
If you get an exception or SqlException, how do you get the actual message? Not the detailed breakdown, but the actual message. For example, in the following message, I would like to find just "Incorrect syntax near the keyword 'and'." or "System.Data.SqlClient.SqlException: Incorrect syntax near the keyword 'and'." instead of:
2
2150
by: tshad | last post by:
This has been driving me crazy. I have been trying to get the error handling working on my system and can get parts of it working and others won't work at all. I found that you can't access session variables from Application_Error event, but I need to so I don't need to set up traces to see what they are during an error. I am emailing the error condition to myself when it happens.
0
1979
by: Carl Gilbert | last post by:
Hi I have recently got the ASP.NET 2.0 Clubsite Starter Kit up and running on my 1&1 web space. Recently I have started getting lots of exceptions and white pages. I have put some code in global.asax to email me when an error occurs. The site doesn't get that much traffic, perhaps a couple of hundred hits a day. I've made some charts from the logs I get from 1&1 and the emails I received reporting bugs and there doesn't seem to be...
1
7471
by: ranju | last post by:
I am trying to spawn a process (say an exe file) with different user crendentials than that of the current user. 1) Called LogonUserEx() to logon the user and recieve a handle to the token that represents the logged-on user. 2) Called ImpersonateLoggedOnUSer() to let the calling thread impersonate the security context of logged on user. 3) Used CreateEnvironmentBlock() to get lpEnv
0
9718
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10617
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10364
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10370
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10109
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6876
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4328
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3849
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3008
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.