Re: Customerrors in web.config question
From: Ron Weldy (ronweldy_at_msn.com)
Date: 01/18/05
- Next message: Paul: "Way to look up index for Cell in datagrid"
- Previous message: Karl Seguin: "Re: Question about passing aspx pages into methods"
- In reply to: Juan T. Llibre: "Re: Customerrors in web.config question"
- Next in thread: MWells: "Re: Customerrors in web.config question"
- Messages sorted by: [ date ] [ thread ]
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?
>>
>>
>>
>
>
- Next message: Paul: "Way to look up index for Cell in datagrid"
- Previous message: Karl Seguin: "Re: Question about passing aspx pages into methods"
- In reply to: Juan T. Llibre: "Re: Customerrors in web.config question"
- Next in thread: MWells: "Re: Customerrors in web.config question"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|