Re: ASP.Net and CustomError Handling

From: Frank Mamone (frankmnospam_at_canada.com)
Date: 09/10/04


Date: Fri, 10 Sep 2004 13:42:06 -0400

SevDer,

I think you're on the right track but then as stated earlier, the custom dll
will not pick it up.

Maybe you need to disable the 404 default handling in IIS.

Paul maybe you can check the Custom Error tab in IIS on your development
server and see how the 404 is set?

- Frank

"SevDer" <dotnet@sevder.com> wrote in message
news:ua2Fyr1lEHA.3340@TK2MSFTNGP14.phx.gbl...
> I think the result is obvious.
> And Joyjit's suggestion is a solution.
>
> It doesn't work for 404 pages becuase your dll is for your web
> application, however page 404 is IIS behaviour. Therefore it never
> reaches your application when page is not found and as a result it
> doesn't load and process your dll. If you need 404 to process your dll,
> then you need to refer this in web.config custom error pages as Joyjit
> suggested.
>
> --
>
> SevDer
> http://www.sevder.com
>
>
> Paul wrote:
>
> >Frank,
> >That is correct. The first reply will not work because if I put that in
> >there then my custom dll would not intercept the error and do the custom
> >processing that I am trying to accomplish.
> >
> >If anyone else has any ideas I would love to hear them. This is a really
> >strange behavior that I can not reproduce on my box. Thank you all for
> >replying and trying to help out...
> >
> >Paul ><>
> >
> >"Frank Mamone" wrote:
> >
> >
> >
> >>Hi Joyjit,
> >>
> >>This will work, but not as intended. Paul wants his custom exception
handler
> >>to take care of the error so he can do custom stuff.
> >>
> >>I too am curious on why this is not working.
> >>
> >>-Frank
> >>
> >>"Joyjit Mukherjee" <joyjit_mukherjee@hotmail.com> wrote in message
> >>news:eZHo8EzlEHA.1652@TK2MSFTNGP09.phx.gbl...
> >>
> >>
> >>>Hi,
> >>>
> >>>try putting a customerrors element in your web.config as follows: -
> >>>
> >>><customErrors mode = "On" defaultRedirect =
"YourDefaultErrorPage.aspx">
> >>><error statusCode = "404" redirect = "Your404HandlerPage.aspx" />
> >>><customErrors/>
> >>>
> >>>HTH
> >>>Regards
> >>>Joyjit
> >>>
> >>>"Paul" <Paul@discussions.microsoft.com> wrote in message
> >>>news:F3249B0A-BA99-48F6-A4D9-4695F8311B2C@microsoft.com...
> >>>
> >>>
> >>>>I have written a custom dll that I put inside the /bin directory of a
> >>>>production IIS server. Inside the config file of the web application
i
> >>>>
> >>>>
> >>>have
> >>>
> >>>
> >>>>added the following setting:
> >>>>
> >>>><httpModules>
> >>>> <add name="ExceptionManagerHTTPModule"
> >>>> type="Digiscribe.HTTPModule.ExceptionManagerHTTPModule, HTTPModule"
> >>>>
> >>>>
> >>/>
> >>
> >>
> >>>></httpModules>
> >>>>
> >>>>In this dll I have inherited from the IHttpModule which in turn has
> >>>>
> >>>>
> >>given
> >>
> >>
> >>>me
> >>>
> >>>
> >>>>the ability to trap unhandled exceptions and errors through out the
> >>>>application. Everything is working great. If an error happens that
has
> >>>>
> >>>>
> >>>not
> >>>
> >>>
> >>>>been handled then this module kicks in and does what I need it to do.
> >>>>However, on all 404 errors it decides not to work and directs it to a
> >>>>
> >>>>
> >>>generic
> >>>
> >>>
> >>>>error page "The Resource cannot be found".
> >>>>
> >>>>When I was working with this application on my local box 404 errors
were
> >>>>handled by my custom dll, once moved to production on a different
> >>>>
> >>>>
> >>server,
> >>
> >>
> >>>>they are no longer handled. Any help in figuring this out will be
> >>>>
> >>>>
> >>greatly
> >>
> >>
> >>>>appreciated. Thank you in advance.
> >>>>
> >>>>Sincerely,
> >>>>Paul ><>
> >>>>
> >>>>
> >>>
> >>>
> >>
> >>
> >>



Relevant Pages

  • RE: system.badimageformatexception returned from custom installer
    ... How do you invoke that dll from the customer action? ... The dll is created as a seperate project. ... Action dll by going to the custom actions tab and then by right clicking ... Yes it is an installer class. ...
    (microsoft.public.dotnet.framework)
  • RE: system.badimageformatexception returned from custom installer
    ... which references the dll that contains the custom installer code. ... Would you please provide more detailed information about your custom ... Microsoft Online Community Support ...
    (microsoft.public.dotnet.framework)
  • Re: USB Custom Client Driver
    ... I was able to create custom oalioctl dll, from the cloned oalioctl in Public ... then it creates two source files. ... I am trying to implement USB Function Custom Client Driver. ...
    (microsoft.public.windowsce.embedded)
  • Re: Custom Uninstall Question
    ... The CAB configuration file has a parameter for the custom setup dll file. ... The CAB file is copied and executed on the device itself so your custom DLL ... >>> settings that get created post installation. ...
    (microsoft.public.pocketpc.developer)
  • Re: Supressing Public ASP Error Codes
    ... Please read the IIS documentation on custom error pages, ... specific internal server error caused by an ASP related error. ... IIS will send this error page to the client, rather than the existing page + ... following error message that was displayed at the bottom of the ...
    (microsoft.public.inetserver.iis.security)

Loading