473,563 Members | 2,697 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Customize Error Message

Hello,

When an error occurs, is it possible to customize the message abit? For
example, currently after Source Error and Stack Trace it shows Version
Information, but can I add the Machine IP Address and Currently Logged In
Username to this as well? Possibly even the Server IP? This would greatly
help us track down where the error message comes from when someone emails or
prints out the message for us to resolve bugs.

Thanks ...

Alex
Aug 28 '07 #1
1 1388
"Alex" <sa*****@gmail. comwrote in message
news:ev******** ******@TK2MSFTN GP06.phx.gbl...
When an error occurs, is it possible to customize the message abit? For
example, currently after Source Error and Stack Trace it shows Version
Information, but can I add the Machine IP Address and Currently Logged In
Username to this as well? Possibly even the Server IP? This would
greatly help us track down where the error message comes from when someone
emails or prints out the message for us to resolve bugs.
I do this in a global ErrorHandler method which not only includes the
details you mentioned but also things like the entire ServerVariables
collection etc...

This is then emailed to me, and ASP.NET (having caught the exception)
redirects to a friendly page telling the user that an error occurred and
that the webmaster has been informed etc...
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Aug 28 '07 #2

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

Similar topics

3
1737
by: Chris Kilmer | last post by:
I would like to be able to customize the path structure that VS.NET 2003 creates for projects. 1. I'd like to be able to create a project without VS.NET creating a folder for that project. I've already created a folder where I want the project to go, however, VS.NET won't use the existing folder, it wants to create it's own. 2. I also...
1
1445
by: Shabam | last post by:
When I set validateRequest="true", and a user tries to submit html into the form, the server returns with a huge error page detailing what wasn't allowed. Is there a way to customize just this error page to something more friendly? I want to use different error pages for other things, but for this one I'd like to customize it. Is this...
3
2349
by: Mark | last post by:
Hello, What I am trying todo is use .NET serialization to take a Guid property that is an attribute in the XML document and have its output to be the same as Guid.NewGuid().ToString().ToUpper().Replace("-","") I have a working copy of this type of class that will work generating an element with the output i have and the following is an...
14
759
by: deko | last post by:
The below code dials a phone number when the subform datasheet cell containing the number is double clicked. The problem is that the dialer application (c:\windows\dialer.exe) pops up windows on the screen, requiring user intervention to click "Talk" or "Hang Up". I want to customize the behavior of the application so that no pop ups are...
23
6971
by: George | last post by:
Is there a way to customize the open file common dialog? I am trying to modify the button text so I can create a delete file common dialog. I need the same functionality of the open file common dialog but just need to change the button text from "open" to "delete". Any ideas? Thanks
1
1192
by: henry | last post by:
Hi all, When user upload a file, there is a size limit (default is 4M). And we can change this size limit by changging the config file. If a user upload a file bigger than this size, an DNS error will be displayed. Now my question is whether we can customize this error message? Displaying a DNS error page is quite misleading to normal...
3
1711
by: SMG | last post by:
Hi All, From where I can customize 404 error. I.e. the error is printed below.. Server Error in '/sharekhan' Application. The resource cannot be found. Description: HTTP 404. The resource you are looking for (or one of its
5
1916
by: Sun Jian | last post by:
Hi, I am trying to customize the asp.net validation to achieve the following: Upon submitting the form, client side validation will run, and it will stop at the first error detected. For example if both UserID and Password text fields are required but neither is filled in, I'd like to display the error message (a dialogbox) "Please enter...
7
5049
by: DC | last post by:
Hi, there is a 500;13 page one can configure in the website properties, but ..Net Framework 1.1 also delivers the "server too busy" message sometimes and the IIS custom error page does not seem to catch that. How would I customize the error page then? Regards DC
0
7659
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...
0
7580
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7882
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. ...
1
7634
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...
0
7945
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...
0
6244
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
3634
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3618
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
916
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...

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.