Incorrect Server Error in config file

M

moondaddy

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 <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>


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
<customErrors> configuration 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>
 
M

moondaddy

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.
 
J

Juan T. Llibre

re:
!> It says my config file says this:

!> <!-- Web.Config Configuration File -->
!> <configuration>
!> <system.web>
!> <customErrors mode="Off"/>
!> </system.web>
!> </configuration>

No. It doesn't say that.
That error says that, in order to *see* the actual error, that's the configuration you should have.

You can always change it to your current configuration once you,
by changing to the configuration suggested by the error, are able to see the real error.
 
M

moondaddy

Thanks.

Juan T. Llibre said:
re:
!> It says my config file says this:

!> <!-- Web.Config Configuration File -->
!> <configuration>
!> <system.web>
!> <customErrors mode="Off"/>
!> </system.web>
!> </configuration>

No. It doesn't say that.
That error says that, in order to *see* the actual error, that's the
configuration you should have.

You can always change it to your current configuration once you,
by changing to the configuration suggested by the error, are able to see
the real error.
 

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

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top