Re: Throw System.UnauthorizedAccessException ?
- From: "Marc " <RmEaMrOcVE@xxxxxxxxxxx>
- Date: Sun, 6 Jul 2008 19:18:40 +0100
"Norm" <neonorm@xxxxxxxxx> wrote in message
news:aba5076c-335f-45ca-8490-2a09d1d43785@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I would actually suggest against sending a 403 or some other HTTP
access denied because the crawlers may act adversly. The redirection
is a good idea. The crawlers will not care as long as it is a
temporary redirect, not a permanent one. Try something like this:
Response.StatusCode = 302
Response.Status = "302 Moved Temporarily"
Response.AddHeader("Location", "/Unauthorized.aspx") ' Note: "/
Unauthorized.aspx" is just an example
Response.End()
Surley HTTP Status 401 Unauthorized would be better, along with response.end
(no redirect, the browser will just say unauthorized )
.
- Follow-Ups:
- Re: Throw System.UnauthorizedAccessException ?
- From: coconet
- Re: Throw System.UnauthorizedAccessException ?
- References:
- Throw System.UnauthorizedAccessException ?
- From: coconet
- Re: Throw System.UnauthorizedAccessException ?
- From: Anoj
- Re: Throw System.UnauthorizedAccessException ?
- From: coconet
- Re: Throw System.UnauthorizedAccessException ?
- From: Norm
- Throw System.UnauthorizedAccessException ?
- Prev by Date: Re: GetUser.ProviderUserKey gives me System.NullReferenceException
- Next by Date: Re: AJAX calendar control
- Previous by thread: Re: Throw System.UnauthorizedAccessException ?
- Next by thread: Re: Throw System.UnauthorizedAccessException ?
- Index(es):
Relevant Pages
|