473,657 Members | 2,604 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Can't get line number or compiler error on exception?

Hey,

I want to be able to get a sensible exception message that I can actually use to
fix my code using asp.net... I was able to set up the Application_Err or event, and
email exceptions to myself, but they only include "Message" and "StackTrace "...
Every email I've gotten includes no information about the error in a way that would
help me fix it.

I've tried using "GetBaseExcepti on", and "InnerException "... But all I get are
emails like this:

Error Caught in Application_Err or event
Error in: http://domain.com/error2.aspx
Error Message: External component has thrown an exception.
Stack Trace: at
System.Web.Comp ilation.BaseCom piler.ThrowIfCo mpilerErrors(Co mpilerResults results,
CodeDomProvider codeProvider, CodeCompileUnit sourceData, String sourceFile, String
sourceString)
at System.Web.Comp ilation.BaseCom piler.GetCompil edType()
at System.Web.UI.P ageParser.Compi leIntoType()
at System.Web.UI.T emplateParser.G etParserCacheIt emThroughCompil ation()

No line numbers, no descriptions of the errors, nothing. Is there something in this
message that I can parse out, to find the actual error message? Where do the
compiler error messages that I get when I'm working on the code come from, and how
can I access them? I've tried using the "ASPError" object in IIS, but it returns all
empty values when I transfer from an asp.net page.

Sigh...

Eric
Nov 18 '05 #1
1 4313
Eric Gibson wrote:
Hey,

I want to be able to get a sensible exception message that I can
actually use to fix my code using asp.net...


I spoke too soon... It just hit me why asp.net can't produce line number/compiler
messages like ASP. Because it's not interpreted like ASP, it's compiled... So
obviously I can't get compiler messages, if it's already compiled into executable
code...

I'll just have to dump all the contents of the collections/variables and try to
reproduce the error...

Eric
Nov 18 '05 #2

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

Similar topics

3
52007
by: Kim Haines | last post by:
I need help finding where an error is occuring in my code. I use a try-catch block like this in my global.asa: try { //my code } catch (e) { Application('errormsg') = ("An exception occurred in the script. Error name: " + e.name
47
12174
by: Mountain Bikn' Guy | last post by:
Take some standard code such as shown below. It simply loops to add up a series of terms and it produces the correct result. // sum numbers with a loop public int DoSumLooping(int iterations) { int result = 0; for(int i = 1;i <=iterations;i++) { result += i;
18
4335
by: Jen | last post by:
I'm using Microsoft's own VB.NET FTP Example: http://support.microsoft.com/default.aspx?scid=kb;en-us;832679 I can get the program to create directories, change directories, etc., but I can't get it to upload a file to the FTP server. I just get a "Cannot connect to remote server" error after this TRY: s = New Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp)
14
7027
by: Marcus | last post by:
I have a function that simply returns TRUE if it can connect to a particular Sql Server 2005 express, or FALSE if it cannot. I am getting some strange error codes returned when the computer that sql server resides on is not reachable. The error is different depending on the connection string that I use. If I use the following connection string: "server=192.1.1.1; Initial Catalog=master; uid=The_User; password=The_Password; Connect...
26
3046
by: Bill Reid | last post by:
Bear with me, as I am not a "professional" programmer, but I was working on part of program that reads parts of four text files into a buffer which I re-allocate the size as I read each file. I read some of the items from the bottom up of the buffer, and some from the top down, moving the bottom items back to the new re-allocated bottom on every file read. Then when I've read all four files, I sort the top and bottom items separately...
8
2841
by: Herb | last post by:
In my design environment this works fine, but when I deploy it I get an error. I have a class "MessageBox" defined in my "App_Code" folder. My aspx file contains the line "Imports MessageBox" at the top. When I deploy and run the website I get the following error. Server Error in '/' Application. --------------------------------------------------------------------------------
0
2943
by: sauce | last post by:
Hi, Hm this error has gotten me really frustrated....I wrote a cgi script implementing threads using the threading module, but ran into these errors from my web server: Exception in thread Thread-2: Traceback (most recent call last): File "/usr/lib64/python2.3/threading.py", line 436, in __bootstrap self.run() File "test.py", line 214, in run current.start() File "/usr/lib64/python2.3/threading.py", line 410, in start...
5
4485
by: IdleBrain | last post by:
I am trying to log the Application name, Method name, line number and column number whenever an exception is generated in an C# 2005 application using the following code. Problem is that the line number that is being obtained by stackFrame.GetFileLineNumber() represents AnotherForm.LogMessage function's line number. I am trying to write the line number of the statement which is causing an exception and not the LogMessage function's line...
2
3194
by: =?Utf-8?B?QXJ0aHVyIFBhcmtlcg==?= | last post by:
I've been having a problem occasionally with exceptions having the wrong line number listed. The situation is this: I have a function with a try-catch, and in the catch it logs the message and stack trace from the exception. The code generates an index-out-of-bounds exception. When I look at the line number listed in the stack trace, it is the first line of code in the function, which has nothing to do with array indexes. One time this...
0
8385
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
8303
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8723
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
8502
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,...
1
6162
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5632
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();...
0
4150
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2726
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
1941
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.