Turning Custom Errors off

M

Mark A. Sam

Hello I am working locally with Visual Web Developer 2005 Express. Before I
even installed it, the information from Microsoft was that you could FTP it
to a remote site and it should work. The site I FTP'd to has .Net Framework
2.0 installed. I got this error when I tried to open the site:

Runtime Error
Description: An application error occurred on the server. The current custom
error settings for this application prevent the details of the application
error from being viewed remotely (for security reasons). It could, however,
be viewed by browsers running on the local server machine.

Details: To enable the details of this specific error message to be viewable
on remote machines, please create a <customErrors> tag within a "web.config"
configuration file located in the root directory of the current web
application. This <customErrors> tag should then have its "mode" attribute
set to "Off".


<!-- Web.Config Configuration File -->

<configuration>
<system.web>
<customErrors mode="Off"/>
</system.web>
</configuration>



I pasted the line
<customErrors mode="Off"/>

into the web.config file within the <system.web> tags but still getting the
same page, and not an error page. I'm not sure why there would be an error.

Thanks for any help and God Bless,

Mark A. Sam
 
N

Nanda Lella[MSFT]

Can you add your web.config file?


--------------------
From: "Mark A. Sam" <[email protected]>
Subject: Turning Custom Errors off
Date: Mon, 13 Mar 2006 10:16:52 -0500
Lines: 41
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Message-ID: <#[email protected]>
Newsgroups: microsoft.public.dotnet.general,microsoft.public.vstudio.general
NNTP-Posting-Host: dunkirk-cuda1-24-50-80-102.lkwnny.adelphia.net 24.50.80.102
Path: TK2MSFTNGXA03.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP10.phx.gbl
Xref: TK2MSFTNGXA03.phx.gbl microsoft.public.vstudio.general:12093 microsoft.public.dotnet.general:191042
X-Tomcat-NG: microsoft.public.dotnet.general

Hello I am working locally with Visual Web Developer 2005 Express. Before I
even installed it, the information from Microsoft was that you could FTP it
to a remote site and it should work. The site I FTP'd to has .Net Framework
2.0 installed. I got this error when I tried to open the site:

Runtime Error
Description: An application error occurred on the server. The current custom
error settings for this application prevent the details of the application
error from being viewed remotely (for security reasons). It could, however,
be viewed by browsers running on the local server machine.

Details: To enable the details of this specific error message to be viewable
on remote machines, please create a <customErrors> tag within a "web.config"
configuration file located in the root directory of the current web
application. This <customErrors> tag should then have its "mode" attribute
set to "Off".


<!-- Web.Config Configuration File -->

<configuration>
<system.web>
<customErrors mode="Off"/>
</system.web>
</configuration>



I pasted the line
<customErrors mode="Off"/>

into the web.config file within the <system.web> tags but still getting the
same page, and not an error page. I'm not sure why there would be an error.

Thanks for any help and God Bless,

Mark A. Sam

--

Thank You,
Nanda Lella,

This Posting is provided "AS IS" with no warranties, and confers no rights.
 
M

Mark A. Sam

Nanda Lella said:
Can you add your web.config file?


Yes, Thank you. The line is after the first <system .web> tag

<?xml version="1.0"?>

<!--

Note: As an alternative to hand editing this file you can use the

web admin tool to configure settings for your application. Use

the Website->Asp.Net Configuration option in Visual Studio.

A full list of settings and comments can be found in

machine.config.comments usually located in

\Windows\Microsoft.Net\Framework\v2.x\Config

-->

<configuration>

<appSettings/>

<connectionStrings/>

<system.web>

<customErrors mode="Off"/>

<!--

Set compilation debug="true" to insert debugging

symbols into the compiled page. Because this

affects performance, set this value to true only

during development.

Visual Basic options:

Set strict="true" to disallow all data type conversions

where data loss can occur.

Set explicit="true" to force declaration of all variables.

-->

<compilation debug="false" strict="false" explicit="true" />

<pages>

<namespaces>

<clear />

<add namespace="System" />

<add namespace="System.Collections" />

<add namespace="System.Collections.Specialized" />

<add namespace="System.Configuration" />

<add namespace="System.Text" />

<add namespace="System.Text.RegularExpressions" />

<add namespace="System.Web" />

<add namespace="System.Web.Caching" />

<add namespace="System.Web.SessionState" />

<add namespace="System.Web.Security" />

<add namespace="System.Web.Profile" />

<add namespace="System.Web.UI" />

<add namespace="System.Web.UI.WebControls" />

<add namespace="System.Web.UI.WebControls.WebParts" />

<add namespace="System.Web.UI.HtmlControls" />

</namespaces>

</pages>

<!--

The <authentication> section enables configuration

of the security authentication mode used by

ASP.NET to identify an incoming user.

-->

<authentication mode="Windows" />

<!--

The <customErrors> section enables configuration

of what to do if/when an unhandled error occurs

during the execution of a request. Specifically,

it enables developers to configure html error pages

to be displayed in place of a error stack trace.

<customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">

<error statusCode="403" redirect="NoAccess.htm" />

<error statusCode="404" redirect="FileNotFound.htm" />

</customErrors>

-->



</system.web>

</configuration>
 
N

Nanda Lella[MSFT]

Your web.config file looks fine.

Have you verified t the framework version that is being used on the remote
machine?(The machine that you have FTPed to)
Make sure that IIS is using framework 2.0. If you are not sure, you can run
the aspnet_regiis.exe tool that resides in the folder
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727 assuming your are using the
framework version 2.0.50727. You have to run this tool from command prompt
with an option -i.

aspnet_regiis.exe -i

I believe this is the problem.

Also I see that you are using Windows authentication. Make sure the user,
who is using the website has the required credentials. Otherwise change the
authentication mode.

Let me know if the problem is solved.

--------------------
From: "Mark A. Sam" <[email protected]>
References: <#[email protected]>
Subject: Re: Turning Custom Errors off
Date: Mon, 13 Mar 2006 15:08:14 -0500
Lines: 140
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Message-ID: <#[email protected]>
Newsgroups: microsoft.public.dotnet.general
NNTP-Posting-Host: dunkirk-cuda1-24-50-80-102.lkwnny.adelphia.net 24.50.80.102
Path: TK2MSFTNGXA03.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP11.phx.gbl
Xref: TK2MSFTNGXA03.phx.gbl microsoft.public.dotnet.general:191075
X-Tomcat-NG: microsoft.public.dotnet.general





Yes, Thank you. The line is after the first <system .web> tag

<?xml version="1.0"?>

<!--

Note: As an alternative to hand editing this file you can use the

web admin tool to configure settings for your application. Use

the Website->Asp.Net Configuration option in Visual Studio.

A full list of settings and comments can be found in

machine.config.comments usually located in

\Windows\Microsoft.Net\Framework\v2.x\Config

-->

<configuration>

<appSettings/>

<connectionStrings/>

<system.web>

<customErrors mode="Off"/>

<!--

Set compilation debug="true" to insert debugging

symbols into the compiled page. Because this

affects performance, set this value to true only

during development.

Visual Basic options:

Set strict="true" to disallow all data type conversions

where data loss can occur.

Set explicit="true" to force declaration of all variables.

-->

<compilation debug="false" strict="false" explicit="true" />

<pages>

<namespaces>

<clear />

<add namespace="System" />

<add namespace="System.Collections" />

<add namespace="System.Collections.Specialized" />

<add namespace="System.Configuration" />

<add namespace="System.Text" />

<add namespace="System.Text.RegularExpressions" />

<add namespace="System.Web" />

<add namespace="System.Web.Caching" />

<add namespace="System.Web.SessionState" />

<add namespace="System.Web.Security" />

<add namespace="System.Web.Profile" />

<add namespace="System.Web.UI" />

<add namespace="System.Web.UI.WebControls" />

<add namespace="System.Web.UI.WebControls.WebParts" />

<add namespace="System.Web.UI.HtmlControls" />

</namespaces>

</pages>

<!--

The <authentication> section enables configuration

of the security authentication mode used by

ASP.NET to identify an incoming user.

-->

<authentication mode="Windows" />

<!--

The <customErrors> section enables configuration

of what to do if/when an unhandled error occurs

during the execution of a request. Specifically,

it enables developers to configure html error pages

to be displayed in place of a error stack trace.

<customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">

<error statusCode="403" redirect="NoAccess.htm" />

<error statusCode="404" redirect="FileNotFound.htm" />

</customErrors>

-->



</system.web>

</configuration>

--

Thank You,
Nanda Lella,

This Posting is provided "AS IS" with no warranties, and confers no rights.
 
M

Mark A. Sam

I don't have access to the folder you listed. This is a hosted site, but I
emailed tech support to verify that .net framework 2.0 is installed. I am
not sure why you cited IIS. I recall from the information on the microsoft
site that one advange of using ASP.net is that you don't need IIS.

As long as you are gonig to monitor this, maybe you can help me with another
issue before I post it. I placed some .jpg images on a page and tried to
replaced them with .gif images with the same names, and cannot remove them.
I began by changing the extentions from .jpg to .giv in the properties
sheet. This had the effect of both sets of images being on the form. I
then tried and tried to delete the .jpg's, but they keep returning. They
show that they are deleted until I open the page in a browser or I close and
open the page in design view. This page is not associated with any master
pages.

Thanks for the help and God Bless,

Mark
 
M

Mark A. Sam

The support tech remmed out the connectionstrings
<!-- <connectionStrings/>-->
node and now I get the error:


Server Error in '/' Application.
--------------------------------------------------------------------------------

Configuration Error
Description: An error occurred during the processing of a configuration file
required to service this request. Please review the specific error details
below and modify your configuration file appropriately.

Parser Error Message: Child nodes are not allowed.

Source Error:


Line 26: <compilation debug="false" strict="false" explicit="true"
/>
Line 27: <pages>
Line 28: <namespaces>
Line 29: <clear />
Line 30: <add namespace="System" />


Source File: C:\Domains\dragonimporting.com\wwwroot\web.config Line: 28



--------------------------------------------------------------------------------

Version Information: Microsoft .NET Framework Version:1.1.4322.2300; ASP.NET
Version:1.1.4322.2300



I'll post the web.config again: Thank you again for the help. I resolved
the issue with the .jpgs by deleting the images then copy and pasting them
to a new webform page. Maybe this was a fluke..


<?xml version="1.0"?>

<!--

Note: As an alternative to hand editing this file you can use the

web admin tool to configure settings for your application. Use

the Website->Asp.Net Configuration option in Visual Studio.

A full list of settings and comments can be found in

machine.config.comments usually located in

\Windows\Microsoft.Net\Framework\v2.x\Config

-->

<configuration>

<appSettings/>

<!-- <connectionStrings/>-->

<system.web>


<!--

Set compilation debug="true" to insert debugging

symbols into the compiled page. Because this

affects performance, set this value to true only

during development.

Visual Basic options:

Set strict="true" to disallow all data type conversions

where data loss can occur.

Set explicit="true" to force declaration of all variables.

-->

<compilation debug="false" strict="false" explicit="true" />

<pages>

<namespaces>

<clear />

<add namespace="System" />

<add namespace="System.Collections" />

<add namespace="System.Collections.Specialized" />

<add namespace="System.Configuration" />

<add namespace="System.Text" />

<add namespace="System.Text.RegularExpressions" />

<add namespace="System.Web" />

<add namespace="System.Web.Caching" />

<add namespace="System.Web.SessionState" />

<add namespace="System.Web.Security" />

<add namespace="System.Web.Profile" />

<add namespace="System.Web.UI" />

<add namespace="System.Web.UI.WebControls" />

<add namespace="System.Web.UI.WebControls.WebParts" />

<add namespace="System.Web.UI.HtmlControls" />

</namespaces>

</pages>

<!--

The <authentication> section enables configuration

of the security authentication mode used by

ASP.NET to identify an incoming user.

-->

<authentication mode="Windows" />

<!--

The <customErrors> section enables configuration

of what to do if/when an unhandled error occurs

during the execution of a request. Specifically,

it enables developers to configure html error pages

to be displayed in place of a error stack trace.

<customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">

<error statusCode="403" redirect="NoAccess.htm" />

<error statusCode="404" redirect="FileNotFound.htm" />

</customErrors>

-->

<customErrors mode="Off" />



</system.web>

</configuration>
 
M

Mark A. Sam

I think I see the problem It looks like this is running framework version
1.1.

Version Information: Microsoft .NET Framework Version:1.1.4322.2300; ASP.NET
Version:1.1.4322.2300

Am I reading it correctly?
 
M

Mark A. Sam

The problem is resolved. They configured the site to framework 2.0.

Thanks again for your time and help.

God Bless,

Mark
 
N

Nanda Lella[MSFT]

Thank you,
Glad to see that you were able to resolve the problem.


--------------------
From: "Mark A. Sam" <[email protected]>
References: <#[email protected]>
<[email protected]>
Subject: Resolved
Date: Tue, 14 Mar 2006 07:19:58 -0500
Lines: 9
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Message-ID: <#[email protected]>
Newsgroups: microsoft.public.dotnet.general
NNTP-Posting-Host: dunkirk-cuda1-24-50-80-102.lkwnny.adelphia.net 24.50.80.102
Path: TK2MSFTNGXA03.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP10.phx.gbl
Xref: TK2MSFTNGXA03.phx.gbl microsoft.public.dotnet.general:191131
X-Tomcat-NG: microsoft.public.dotnet.general

The problem is resolved. They configured the site to framework 2.0.

Thanks again for your time and help.

God Bless,

Mark

--

Thank You,
Nanda Lella,

This Posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top