views:

125

answers:

1

I have this simple Application_Error method in my global.asax, and it does not redirect in case an exception occurs under medium trust. Can someone tell me whats wrong here.

This code works fine under full trust

void Application_Error(object sender, EventArgs e)
    {
        Response.Redirect("~/error.aspx",false);

    }
A: 

Apparently removing the false argument fixed this. It does generate a security exception when the redirect executes, but it redirects just fine

Midhat