473,670 Members | 2,521 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Source code in the runtime error page

Hello,

I have to debug an ASP.NET project which is hosted on the remote server, and
it is not possible to achieve the same environment on localhost. So, I need
to debug on the remote site. Problem with the remote is, that when runtime
error occours, I nicely get the error description, stack trace, but under
the "source error" subheading, instead of the source code with line numbers
and code fragment, I see text "An unhandled exception was generated during
the execution of the current web request. Information regarding the origin
and location of the exception can be identified using the exception stack
trace below."
Is there any way to get the source code fragment on the remote location? I
have put in the "<customErr ors mode="Off"/>" section in my web.config file,
perhaps there is some other setting to enable the code fragment? I have
copied both the "pdb" and "cs" files of the codebehind library, where the
error occours. My wild guess is that maybe the ASP.NET process does not have
rights to read the CS file? Though it's kind of unlikely, because it has to
fetch the dlls from there anyway...

Thank you for any clues,

Pavils
Nov 19 '05 #1
5 1318
Is the remote application compiled with debug symbols?

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Neither a follower nor a lender be.

"Pavils Jurjans" <pa****@mailbox .riga.lv> wrote in message
news:%2******** *******@TK2MSFT NGP15.phx.gbl.. .
Hello,

I have to debug an ASP.NET project which is hosted on the remote server,
and it is not possible to achieve the same environment on localhost. So, I
need to debug on the remote site. Problem with the remote is, that when
runtime error occours, I nicely get the error description, stack trace,
but under the "source error" subheading, instead of the source code with
line numbers and code fragment, I see text "An unhandled exception was
generated during the execution of the current web request. Information
regarding the origin and location of the exception can be identified using
the exception stack trace below."
Is there any way to get the source code fragment on the remote location? I
have put in the "<customErr ors mode="Off"/>" section in my web.config
file, perhaps there is some other setting to enable the code fragment? I
have copied both the "pdb" and "cs" files of the codebehind library, where
the error occours. My wild guess is that maybe the ASP.NET process does
not have rights to read the CS file? Though it's kind of unlikely, because
it has to fetch the dlls from there anyway...

Thank you for any clues,

Pavils

Nov 19 '05 #2
> Is the remote application compiled with debug symbols?

As I said, the pdb file for the buggy library is there. Exactly the same
file set, stored locally, gives me the feature I need - shows the code. When
copiend on the remote, there is no code fragmen in the error information.

Pavils
Nov 19 '05 #3
I didn't ask if a pdb file was present. I asked if the esxecutable DLL was
compiled with debug symbols. There is a difference. Simply putting a pdb
file into the same directory as an executable DLL doesn't mean that you will
get any debugging information from the app. The DLL must be compiled with
debug symbols, and it must match the pdb.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Neither a follower nor a lender be.

"Pavils Jurjans" <pa****@mailbox .riga.lv> wrote in message
news:eg******** ******@TK2MSFTN GP15.phx.gbl...
Is the remote application compiled with debug symbols?


As I said, the pdb file for the buggy library is there. Exactly the same
file set, stored locally, gives me the feature I need - shows the code.
When copiend on the remote, there is no code fragmen in the error
information.

Pavils

Nov 19 '05 #4
>I didn't ask if a pdb file was present. I asked if the esxecutable DLL was
compiled with debug symbols. There is a difference. Simply putting a pdb
file into the same directory as an executable DLL doesn't mean that you
will get any debugging information from the app. The DLL must be compiled
with debug symbols, and it must match the pdb.


The DLL what is compiled on my local machine, is compiled with /debug
switch. The same DLL was copied to the remote machine, together with the PDB
file what was created in the compilation.

-- Pavils
Nov 19 '05 #5
Ok, I've detected the problem.

The PDB file contains *full path* to the source CS file, so when the error
is intercepted, ASP.NET looks for the source file in that location, and
since the paths on my local machine and remote server differ, then the
application on the remote site fails to find the source file and thus is
unable to show the code fragment with line numbers.

I mirrored the folder structure and matched the drive letter on my local
machine, compiled the lib with the debug symbols, and when I copied the
built PDB file, the remote site was able to retrieve the source code and
show it.

Of course, it's sort of hassle to maintain the project path just like it is
on the remote server. Is there some way to tell the compiler to use some
alternate source code reference path, when building the PDB file?

Pavils
Nov 19 '05 #6

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

Similar topics

1
2569
by: M.E.Farmer | last post by:
Hello c.l.py!, I have just finished this and decided to share. PySourceColor is a module to convert Python source into colored html. Yes it has been done before, but I like this better:) You can easily define your own colorscheme. example usage: # Highlight PySourceColor.py python PySourceColor.py or # Show help
0
2116
by: Unigroup of New York | last post by:
Content-Type: multipart/mixed; boundary="------------C465DF38DCB38DD2AF7117E0" Lines: 327 Date: Tue, 15 Feb 2005 23:36:38 -0500 NNTP-Posting-Host: 24.46.113.251 X-Complaints-To: abuse@cv.net X-Trace: fe12.lga 1108528794 24.46.113.251 (Tue, 15 Feb 2005 21:39:54 MST) NNTP-Posting-Date: Tue, 15 Feb 2005 21:39:54 MST Xref: number1.nntp.dca.giganews.com comp.lang.python:398656
7
1777
by: Jan Gregor | last post by:
Hello folks I want to apply changes in my source code without stopping jython and JVM. Preferable are modifications directly to instances of classes. My application is a desktop app using swing library. Python solutions also interest me. Solution similiar to "lisp way" is ideal.
13
7573
by: R Reyes | last post by:
is there a way to avoid the validateRequest error page in my code behind file? i can't seem to find a way to handle the error w/o an error code or exception being thrown... i am NOT looking for a link that explains what it does and what it doesn't do OR the pros/cons, as i've already read through many of those. i just want to know if i can code some sort of exception to catch for it so that the ugly yellow/white microsoft generic page...
4
1556
by: VB Programmer | last post by:
If I try ANY aspx pages on my server, even INVALID, bogus pages, I get a "Runtime Error". Any idea why? Here is the full message: Server Error in '/' Application. ---------------------------------------------------------------------------- ----
4
13603
by: Pat | last post by:
In my Web.config i have :- <customErrors mode="On" defaultRedirect="genericerror.htm"> <error statusCode="404" redirect="pagenotfound.aspx"/> </customErrors to get page not found error but instead i keep getting a RUN TIME error below: Any ideas.. Runtime Error
0
1275
by: John Lafrowda | last post by:
Dear all, here is a simple problem that I cannot overcome: I'm trying to write a client/server application in Visual Basic .net. The server is an executable (.exe) project, the clients are class library (.dll) projects. The server loads the clients from their DLL-files at runtime using reflection tools, such as: ClientAssembly = System.Reflection.Assembly.LoadFrom(Client_To_Load_File_Name)
2
13504
by: Mikey | last post by:
Sample VB .NET source code to create mailing labels or customized letters using MS Word MailMerge This VB .NET source code will start MS Word and call methods and set properties in MS Word to execute a MailMerge to create mailing labels or customized letters. A label name known to MS Word MailMerge mailing label wizard may be used or a template file containing the field names Line1 thru Line5 for each record to be printed. If a...
3
1946
by: nnaveenraju | last post by:
Hi Gurus, I am new to Ajax and JAVA. I am able to call the servlet class from the JSP page using AJAX. The servlet class is called successfully. I am processing some data and the data has to passed back to the front end JSP. I have used the following code
0
8896
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
8810
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
8590
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
7410
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6211
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
5683
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
4208
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...
0
4387
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2798
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

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.