views:

135

answers:

1

I handle my errors using Application_Error in global.asax.

How to check if the request is from the local client to display more information about the error or just show the yellow error page. Something like "remoteOnly" that ASP does when handling errors using web.config.

+3  A: 

After I posted the question, I went back to my application and played around a little bit then I found this. Now I'm using it.

    void Application_Error(object sender, EventArgs e)
    {

        if(!HttpContext.Current.Request.IsLocal) 
            HttpContext.Current.Server.ClearError();

        // process error handling
    }
Jamal
Really nice answer, the "IsLocal" works for me !
Julien N
Glad it worked for you!
Jamal