473,508 Members | 2,490 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 "<customErrors 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 1308
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***************@TK2MSFTNGP15.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 "<customErrors 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**************@TK2MSFTNGP15.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
2552
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...
0
2104
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...
7
1770
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...
13
7564
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...
4
1552
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
13586
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...
0
1268
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...
2
13481
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...
3
1931
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...
0
7231
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,...
0
7133
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...
0
7336
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,...
0
7405
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...
1
7066
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...
0
7504
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...
0
5643
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,...
1
5059
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...
0
435
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...

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.