Re: Customerrors in web.config question

From: Ron Weldy (ronweldy_at_msn.com)
Date: 01/18/05


Date: Mon, 17 Jan 2005 18:10:01 -0800

Thanks. I am assuming that the web.config files are not controlling what is
happening but I didn't know where to look. I'll check into your suggestions.
It's script errors that get redirected that I would like to be able to
switch when debugging and then restore after completion. I think this has
been set up as an application and that the config file is in the root, but I
will make sure.

Also, if anyone has a good recommendation on where to read up on the way
this works that would be helpful. I seem to have trouble finding a concise
description on the different levels of error handling in IIS 6 and ASP.NET
and how they interrelate.

"Juan T. Llibre" <nomailreplies@nowhere.com> wrote in message
news:u3kmPxP$EHA.2572@tk2msftngp13.phx.gbl...
> Are you sure the website is setup as an Application
> ( or at least as a virtual directory ) in IIS ?
>
> customErrors mode will only work if the web.config
> file is placed in the root directory of an IIS application
> or in an IIS virtual directory.
>
> The customError settings only apply to ASP.NET files
> (files with specific ASP.NET extensions such as aspx and asmx).
>
> If a user requests an .htm or .asp file that does not exist on
> your Web server, even if you have the "404" redirect specified
> in web.config, IIS will redirect the user based on the HTTP
> error settings defined within the IIS metabase and not by the
> error settings in the Web.config file.
>
> .asp and .htm files are not managed by ASP.NET.
>
> The ASP.NET Web.config file settings apply to the
> application's directory and any child directories.
>
> These settings can be overridden for specific pages using
> the ErrorPage attribute of the Page directive.
>
>
>
> Juan T. Llibre
> ASP.NET MVP
> ===========
> "Ron Weldy" <ronweldy@msn.com> wrote in message
> news:O$%23d1lP$EHA.3472@TK2MSFTNGP14.phx.gbl...
>>I am working on a website that someone else has set up. They have a
>>web.config file with a customerrors element that points the error handling
>>to a special aspx page.
>>
>> <customErrors mode="RemoteOnly" defaultRedirect="/customerrors/500.aspx">
>> <error statusCode="404" redirect="/customerrors/404.html" />
>> </customErrors>
>>
>> When running pages directly on the server it still redirects when a error
>> occurs, even though it should not judging by the "RemoteOnly" setting. I
>> have also tried just setting the mode to "Off" but that does not change
>> the behavior either. What could I be missing? I have looked for other
>> config file but have found none. Anybody got any ideas why I cannot turn
>> off the error handling, or where I can look to figure out what is going
>> on?
>>
>>
>>
>
>



Relevant Pages

  • Re: Customerrors in web.config question
    ... file is placed in the root directory of an IIS application ... or in an IIS virtual directory. ... The customError settings only apply to ASP.NET files ... >web.config file with a customerrors element that points the error handling ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: HTTP Error 403.6 - Forbidden: IP Address Rejected
    ... it was the proxy settings on the ... > You can also try to change the security settings for the Remote Web ... Open the IIS console ...
    (microsoft.public.windows.server.sbs)
  • Re: IIS5 Visual Basic.net 2003 - Internal Server Error
    ... The error sounds like it is not with IIS but an application running on IIS, ... on their local machines but not your server, ... > How do I turn on customErrors in IIS5? ... >> Please also disable "Show Friendly HTTP Error messages" in your ...
    (microsoft.public.inetserver.iis)
  • Re: ASP.NET webs not working
    ... application settings were simple and easily reversible in an effort to ... The Default Web Site in IIS has "Anonymous access" checked. ... The default security and applications should be correctly configured by ...
    (microsoft.public.frontpage.client)
  • Re: IIS security settings are reset after I reboot the server
    ... Stopping and restarting the IIS services should let you see if the ... security settings are going to disappear or not after a reboot [in other ... I believe the IIS settings may be disappearing when the services are ... Then, restart W3SVC service. ...
    (microsoft.public.inetserver.iis.security)