locked
getting blank page in custom handler implementing ihttphandler RRS feed

  • Question

  • User-1777279560 posted

    hi ,

     i am getting blank page when pages intercepted by my custom handler.

    i have implemented entire pages of site with custom httphandler except the my login page. with custom httphandler's processrequest i will check if the user has the privilage to access the page , if so i will allow him to view the page. but i am getting blank pages here, i have been scracting my head to find out what really goes wrong here.

    here is my code..

     

    public void ProcessRequest(HttpContext context)
            {
    string applicationPath = context.Request.ApplicationPath;
                    string pageRelativePath = context.Request.CurrentExecutionFilePath.Substring(applicationPath.Length+1);
                    
                    if (pageRelativePath != "menu/FirstPage.aspx")
                    {
                        if (IsAuthorised((pageRelativePath))) 
                        {
                            
                            context.RewritePath(pageRelativePath);
                            
                            
                        }
                        else
                        {
                            context.Response.Redirect("menu/FirstPage.aspx",true);
                        }
                    }
            }
     

     what i am i doing wrong here. basically it seems nothing to send to the browser.

    thanks 

     

     


     

    Wednesday, June 20, 2007 1:15 AM

Answers

  • User-1777279560 posted

    hi i found work around for the problem at following link. you need to add rewrite url before the page renders event.

     http://httphandler.codebetter.com/blogs/jeffrey.palermo/archive/2005/08/10/130532.aspx?CommentPosted=true#commentmessage

     

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, June 20, 2007 4:46 AM