By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,829 Members | 1,828 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,829 IT Pros & Developers. It's quick & easy.

Incorrect Server Error in config file

P: n/a
running vs2005 I have a small test website called TestPublish which has
default.aspx, ErrorPage.aspx and testpage.htm. The default page just says
hello world and no other code and the errorpage has nothing yet (not sure
how to make an error page yet...). After publishing the site to a remote
server I can browse to testpage.htm, but not Default.aspx. When I hit the
default page I get the server side error telling me I need to enable custom
errors in the config file. It says my config file says this:
<!-- Web.Config Configuration File -->

<configuration>
<system.web>
<customErrors mode="Off"/>
</system.web>
</configuration>
when actually it says this:

<customErrors mode="RemoteOnly" defaultRedirect="ErrorPage.aspx">
<error statusCode="403" redirect="NoAccess.htm" />
<error statusCode="404" redirect="FileNotFound.htm" />
</customErrors>

Normally I may be lacking proper permissions or something but I do have the
correct permissions set in this case.

1) Any idea on how I can trouble shoot this?

2) Any examples on how to setup a simple errors page?

Thanks.

the full server error is posted below:

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

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 <customErrorstag within a "web.config"
configuration file located in the root directory of the current web
application. This <customErrorstag should then have its "mode" attribute
set to "Off".
<!-- Web.Config Configuration File -->

<configuration>
<system.web>
<customErrors mode="Off"/>
</system.web>
</configuration>
Notes: The current error page you are seeing can be replaced by a custom
error page by modifying the "defaultRedirect" attribute of the application's
<customErrorsconfiguration tag to point to a custom error page URL.
<!-- Web.Config Configuration File -->

<configuration>
<system.web>
<customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
</system.web>
</configuration>

--
mo*******@newsgroup.nospam
Sep 8 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a
I found the propblem. I assumed that by publishing the site from vs2005
that the site would be using asp.net 2.0, but in fact it was using asp.net
1.1

Thanks.

"moondaddy" <mo*******@newsgroup.nospamwrote in message
news:OJ**************@TK2MSFTNGP06.phx.gbl...
running vs2005 I have a small test website called TestPublish which has
default.aspx, ErrorPage.aspx and testpage.htm. The default page just says
hello world and no other code and the errorpage has nothing yet (not sure
how to make an error page yet...). After publishing the site to a remote
server I can browse to testpage.htm, but not Default.aspx. When I hit the
default page I get the server side error telling me I need to enable
custom errors in the config file. It says my config file says this:
<!-- Web.Config Configuration File -->

<configuration>
<system.web>
<customErrors mode="Off"/>
</system.web>
</configuration>
when actually it says this:

<customErrors mode="RemoteOnly" defaultRedirect="ErrorPage.aspx">
<error statusCode="403" redirect="NoAccess.htm" />
<error statusCode="404" redirect="FileNotFound.htm" />
</customErrors>

Normally I may be lacking proper permissions or something but I do have
the correct permissions set in this case.

1) Any idea on how I can trouble shoot this?

2) Any examples on how to setup a simple errors page?

Thanks.

the full server error is posted below:

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

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 <customErrorstag within a
"web.config" configuration file located in the root directory of the
current web application. This <customErrorstag should then have its
"mode" attribute set to "Off".
<!-- Web.Config Configuration File -->

<configuration>
<system.web>
<customErrors mode="Off"/>
</system.web>
</configuration>
Notes: The current error page you are seeing can be replaced by a custom
error page by modifying the "defaultRedirect" attribute of the
application's <customErrorsconfiguration tag to point to a custom error
page URL.
<!-- Web.Config Configuration File -->

<configuration>
<system.web>
<customErrors mode="RemoteOnly"
defaultRedirect="mycustompage.htm"/>
</system.web>
</configuration>

--
mo*******@newsgroup.nospam

Sep 8 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.