As you can see this is a question from a non web developer. I would like to have an ASPX page which, under certain circumstances, can generate a 401 error from code. Ideally
Set Response.StatusCode and then - if you need to stop execution - call Response.End().