How can Request Validation be disabled for HttpHandlers?
        Posted  
        
            by Mun
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Mun
        
        
        
        Published on 2009-08-26T04:56:27Z
        Indexed on 
            2010/05/06
            5:38 UTC
        
        
        Read the original article
        Hit count: 394
        
Is it possible to disable request validation for HttpHandlers?
A bit of background - I've got an ASP.NET web application using an HttpHandler to receive the payment response from WorldPay. The IIS logs show that the handler is being called correctly from WorldPay, but the code inside the handler is never called.
If I create a physical ASPX page and set ValidateRequest=false in the header, and put the same code in the Page_Load method, the code is called without any problems.
This solves the problem, though I'd prefer to stick with using an HttpHandler for this as it's better suited for this type of functionality, rather than having an empty ASPX page, though this is dependent on being able to disable request validation.
The web application is using ASP.NET 2.0 and the server is IIS6.
© Stack Overflow or respective owner