Re: customizing validation script-injection error page.

From: Peter Blum (PLBlum_at_Blum.info)
Date: 01/21/05

  • Next message: rsv: "Problem in Forms Authentication"
    Date: Fri, 21 Jan 2005 12:48:20 -0500
    
    

    All exceptions can be captured in two places, using event handlers:

    1. Page object has the Error property
    2. Global.asax has the method Application_Error

    Your task is to test the class of exception object and redirect to the
    desired page.

    You can get the current exception from
    HttpContext.Current.Server.GetLastError().

    --- Peter Blum
    www.PeterBlum.com
    Email: PLBlum@PeterBlum.com
    Creator of "Professional Validation And More" at
    http://www.peterblum.com/vam/home.aspx
    and "Visual Input Security" at http://www.peterblum.com/vise/home.aspx

    "EO" <me@home.com> wrote in message
    news:eIR6eb9$EHA.2704@TK2MSFTNGP10.phx.gbl...
    >I think i've googled to the end of the internet, but just can't find any
    >resources to tell me how to customize the glorious error message that says:
    >
    > Server Error in '/Code' Application.
    >
    > A potentially dangerous request.form value was detected from the
    > client.......
    >
    >
    >
    > How do I post a user friendly message? Or do I just assume that anyone who
    > would generate such a message is a hacker and doesn't deserve a friendly
    > message?
    >
    > Many Thanks,
    >
    > E. Ostrander
    >


  • Next message: rsv: "Problem in Forms Authentication"

    Relevant Pages

    • External component has thrown an exception
      ... I seem to get this exception when I open forms using ShowDialog() from ... event handlers. ... at System.Windows.Forms.ThreadContext.RunMessageLoopInner(Int32 reason, ...
      (microsoft.public.dotnet.framework.windowsforms)
    • Re: debug .net runtime
      ... I do have it break on exception. ... the child relations of a dataset. ... It looks like there may be event handlers ... hooked to the OnCollectionChanging or OnCollectionChanged that are causing ...
      (microsoft.public.dotnet.framework)
    • Re: exception handling in event handlers
      ... We use the same approach for both UI and non-UI eventhandlers. ... > event handlers, we just log the exception. ...
      (microsoft.public.dotnet.framework.clr)
    • Re: Exception from Managed Component being swallowed in Interop
      ... Ian Tompsett wrote: ... AFAIK, errors raised in event handlers for COM ... could set an error flag and throw the exception ...
      (microsoft.public.dotnet.framework.interop)
    • Re: Exception in property in Windows Forms DataBinding
      ... - Im binding a text box to a custom ... to establish that an error has been thrown and indicating this in an ... >> What i meant was that instead of throwng an exception you should set the ... >> error property in the IDataErrorInfo interface, ...
      (microsoft.public.dotnet.framework.windowsforms.databinding)