G
Guest
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.PhysicalApplicationPath + "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.ReadWithCollectTextToken() +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.ReadWithCollectTextToken() +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
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.PhysicalApplicationPath + "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.ReadWithCollectTextToken() +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.ReadWithCollectTextToken() +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