Context.Response.Clear(); >Context.Response.StatusCode = 403; >Context.Response.End(); > >and a web.config that has: > ><customErrors mode="On" defaultRedirect="defaultError.htm"> > <error statusCode="404" redirect="~/NotFound.aspx" /> > <error statusCode="403" redirect="~/NoAccess.aspx" /> ></customErrors>Have you considered using the Throw New HttpException approach such as:
Throw New HttpException(404, "File Not Founded")