473,464 Members | 1,499 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Error tracing on page

I understand it is built in behaviour that if an ASP.NET's web.config is set
to:
<customErrors
mode="RemoteOnly"
/>

then I only get a detailed error message on screen when the ASP.NET
application is executed on the IIS server itself. However, I note that
with the following

<customErrors
mode="Off"
/>

Whereas I could get a full detailed trace including line number and
stack-trace like the following on the IIS server on which the application was
developed (Windows XP Professional SP1, .NET Framework 1.1, Visual Studio
..net 2003):
Server Error in '/app8156' Application
--------------------------------------------------------------------------------

Could not find a part of the path "c:\test\app8156\xml\FormB.xml".
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information about
the error and where it originated in the code.

Exception Details: System.IO.DirectoryNotFoundException: Could not find a
part of the path "c:\dev\app8156\xml\FormB.xml".

Source Error:
Line 43: // Put user code to initialize the page here
Line 44: xmlFormInstance = new XmlDocument();
Line 45: xmlFormInstance.Load(Request.PhysicalApplicationPa th + "xml\\"+
Request.QueryString["form"]+".xml");
Line 46: TestString = "";
Line 47: if (Request.QueryString["ro"]=="1")
Source File: c:\dev\app8156\usercontrols\showform.ascx.cs Line: 45

Stack Trace:
[DirectoryNotFoundException: Could not find a part of the path
"c:\dev\app8156\xml\Form B.xml".]
System.IO.__Error.WinIOError(Int32 errorCode, String str) +287
System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access,
FileShare share, Int32 bufferSize, Boolean useAsync, String msgPath, Boolean
bFromProxy) +888
System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access,
FileShare share) +45
System.Xml.XmlDownloadManager.GetStream(Uri uri, ICredentials
credentials) +73
System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri, String role, Type
ofObjectToReturn) +55
System.Xml.XmlTextReader.CreateScanner() +384
System.Xml.XmlTextReader.Init() +23
System.Xml.XmlTextReader.Read() +530
System.Xml.XmlValidatingReader.ReadWithCollectText Token() +146
System.Xml.XmlValidatingReader.Read() +26
System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean
preserveWhitespace) +80
System.Xml.XmlDocument.Load(XmlReader reader) +72
System.Xml.XmlDocument.Load(String filename) +78
app8156.UserControls.ShowForm.OnInit(EventArgs e) in
c:\dev\app8156\usercontrols\showform.ascx.cs:45
System.Web.UI.Control.InitRecursive(Control namingContainer) +241
System.Web.UI.Control.InitRecursive(Control namingContainer) +179
System.Web.UI.Control.InitRecursive(Control namingContainer) +179
System.Web.UI.Page.ProcessRequestMain() +174


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET
Version:1.1.4322.573

When I copy the whole virtual directory (including the whole bin folder
containing debug info) to a Windows 2003 web server, I only get the following
partial information:
Server Error in '/app8156' Application
--------------------------------------------------------------------------------

Could not find a part of the path "X:\InetPub\wwwroot\app8156\xml\FormB.xml".
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information about
the error and where it originated in the code.

Exception Details: System.IO.DirectoryNotFoundException: Could not find a
part of the path "G:\InetPub\WebApps\app8156\xml\FormB.xml".

Source Error:

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.

Stack Trace:
[DirectoryNotFoundException: Could not find a part of the path
"G:\InetPub\WebApps\app8156\xml\FormB.xml".]
System.IO.__Error.WinIOError(Int32 errorCode, String str) +287
System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access,
FileShare share, Int32 bufferSize, Boolean useAsync, String msgPath, Boolean
bFromProxy) +888
System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access,
FileShare share) +45
System.Xml.XmlDownloadManager.GetStream(Uri uri, ICredentials
credentials) +73
System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri, String role, Type
ofObjectToReturn) +55
System.Xml.XmlTextReader.CreateScanner() +384
System.Xml.XmlTextReader.Init() +23
System.Xml.XmlTextReader.Read() +530
System.Xml.XmlValidatingReader.ReadWithCollectText Token() +146
System.Xml.XmlValidatingReader.Read() +26
System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean
preserveWhitespace) +80
System.Xml.XmlDocument.Load(XmlReader reader) +72
System.Xml.XmlDocument.Load(String filename) +78
app8156.UserControls.ShowForm.OnInit(EventArgs e) in
c:\dev\app8156\usercontrols\showform.ascx.cs:45
System.Web.UI.Control.InitRecursive(Control namingContainer) +241
System.Web.UI.Control.InitRecursive(Control namingContainer) +179
System.Web.UI.Control.InitRecursive(Control namingContainer) +179
System.Web.UI.Page.ProcessRequestMain() +197


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.2032; ASP.NET
Version:1.1.4322.2032

How can I enable my test IIS6 server with ASP.NET Framework 1.1 to display
full debug information?

Many Thanks

Nov 19 '05 #1
5 1805
Hi,

Welcome to ASPNET newsgroup.
As for the "full debug information" you mentioned, it was just as you have
found, depend on the configruation in the application config
file(web.config) 's

<customErrors ... /> element.

the default setting mode="RemoteOnly" all the Remote client side can't see
the detailed error info( exception message, call stack...). When we use
mode="Off" that means we disable customized error function so that all the
client (no matter local or remote) are able to view the detailed error.

Also, i'm not very sure on the
===============
How can I enable my test IIS6 server with ASP.NET Framework 1.1 to display
full debug information?
===============

you mentioned at the end of your last message, do you mean that you'd like
to enable the displaying detail error info setting for all the ASP.NET
applications on your server or any other requirement? If you want to make
a machine scope configuration, you can consider setting this in the
machine.config so that by default all the asp.net application on that
server will override it.

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Nov 19 '05 #2
Steven, Thanks for replying.

As you see from my original post, even with the following settings in
Web.config, I don't get the line number, of the error source when the ASP.NET
1.1 code (compiled from Visual Studio .NET 2003 on WinXP Pro SP1, IIS5.1) is
taken across to a shared development server running Windows Server 2003
IIS6.0 ASP.NET 1.1
<customErrors mode="Off" />

Could there have been any security restrictions that prevent the line
number, etc. from being displayed? Note, the .pdb file had indeed been
copied over!

"Steven Cheng[MSFT]" wrote:
As for the "full debug information" you mentioned, it was just as you have
found, depend on the configruation in the application config
file(web.config) 's

<customErrors ... /> element.

the default setting mode="RemoteOnly" all the Remote client side can't see
the detailed error info( exception message, call stack...). When we use
mode="Off" that means we disable customized error function so that all the
client (no matter local or remote) are able to view the detailed error.

Also, i'm not very sure on the
===============
How can I enable my test IIS6 server with ASP.NET Framework 1.1 to display
full debug information?
===============

you mentioned at the end of your last message, do you mean that you'd like
to enable the displaying detail error info setting for all the ASP.NET
applications on your server or any other requirement? If you want to make
a machine scope configuration, you can consider setting this in the
machine.config so that by default all the asp.net application on that
server will override it.

Thanks,


Nov 19 '05 #3
Thank you for the response,

Based on my local test, we can correctly get the detailed error message and
line number in source code as long as we're deploying the "debug" version
of our applciation's assembly. If we change the assembly's build versino to
"release" , then the line number won't display (no matter you've provided
the pdb or not), since there' no symbol info in the assembly.

So have you checked whether the app's assemly you deployed to your 2003
IIS6 server is debug or release? If release, you can try changing it to
debug version and test again.

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)


Nov 19 '05 #4
The project was compiled as "Debug", and the whole website was copied over to
the Windows 2003 server's IIS6's virtual directory.

So there are no security lock down that could prevent the line number from
being displayed?

"Steven Cheng[MSFT]" wrote:
Thank you for the response,

Based on my local test, we can correctly get the detailed error message and
line number in source code as long as we're deploying the "debug" version
of our applciation's assembly. If we change the assembly's build versino to
"release" , then the line number won't display (no matter you've provided
the pdb or not), since there' no symbol info in the assembly.

So have you checked whether the app's assemly you deployed to your 2003
IIS6 server is debug or release? If release, you can try changing it to
debug version and test again.

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)


Nov 19 '05 #5
Thanks for the response,

Yes, as long as the deployed assembly has the symbols associated with it,
we should be able to get the source code line number in the exception page(
generally the debug version is capable of this). I'm not sure whether your
certain web application dosn't behave like this. Have you tried some other
simple web applcation deploying on that iis6 server to see whether the
problem also occurs? Also, if you can repro this with a simple web
project, you can attach it to us so that we can perform some tests on our
side.

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Nov 19 '05 #6

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

Similar topics

10
by: Brian Conway | last post by:
I have no idea what is going on. I have a Login screen where someone types in their login information and this populates a datagrid based off of the login. Works great in debug and test through...
1
by: Jim Heavey | last post by:
I am trying to understand the use of Tracing/ In the @page you can add Trace="true" which provides a page of tracing information. Where can I find some material to help me make sense of the...
0
by: Paul Ibison | last post by:
HI when I have a page which calls a component I want to do the following - tracing set to false on the pag tracing set to true in the componen tracing set to false in the page after the call to...
1
by: Sorin Sandu | last post by:
I have a simple page with a grid on it based on a stored procedure Sometimes I get this error : Request timed out. Description: An unhandled exception occurred during the execution of the current...
1
by: Eddie Farmer | last post by:
Hi, I can't seem to trace into pages accessed via Server.Transfer. I put a break in the page to check the state of the tracing and IsEnabled is false. I have tracing enabled at the application...
5
by: Dabbler | last post by:
When I first start up an ASP.NET application with tracing enabled in web.config the first few pages show trace at bottom of the page but then at some point the pages return to normal with no trace...
6
by: serge calderara | last post by:
Dear all, I have an applicatin that generate a querry to an SQL server, then display results on a second webform. I try to see how tracing works, then I have notice that as soon as I...
2
by: deepukutty | last post by:
Hi all, I know tht we can do tracing in two ways.one in application level and the other is at Page level. I am able to see the details of trace either on the page itself or .../trace.axd page....
0
by: cnys | last post by:
We have an ASP.NET 2.0 (C#) app and we're trying to add tracing into it. The tracing functionality within .NET is great, but when we output this to a file, it's kind of sparse. So, we're looking...
0
by: rehto | last post by:
We have an ASP.NET 2.0 (C#) app and we want to enable tracing (see the code snippets below). The first time a user navigates to the app., the tracing works fine (the ASP.NET tracing appears on...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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
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...
0
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
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,...
0
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
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...

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.