Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Correct HTTP response status code on "Access Denied" page.

Reply
Thread Tools

Correct HTTP response status code on "Access Denied" page.

 
 
diarmaid@calvert.com
Guest
Posts: n/a
 
      08-29-2005
Hi,

I have a password-protected area on my site. I'm not using any server
authentication methods: Instead I prompt the user for a username and
password using an HTML form and check these against a database of
registered users.

I was thinking that this page should be returning a HTTP status code of
"401 Unauthorized" instead of its current "200 OK". My reasoning being
that this would let search engines know what's going on when they
request a protected page and get redirected to the "Access Denied"
page.

I experimented with adding response.status = "401 Unauthorized" to the
"denied" page, but now it displays a (Windows/IE) username & password
prompt instead. The HTTP sniffer shows that the www-authenticate field
is set to "Basic".

My question: How can I indicate to the search engines that the page it
is requesting requires authentication, yet have it not display the
login/password dialog box?

Thanks in advance,

--Diarmaid McGleenan

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
need a url that its http response header that cotain 401 status code iMath Python 3 01-07-2013 09:09 AM
[FYI] MSXML HTTP translates response status code 204 to 1223 Thomas 'PointedEars' Lahn Javascript 4 09-16-2009 12:33 PM
return HttpStatusCode.ServiceUnavailable in the context.context.Response.StatusCode (Http response code 503) Flip Rayner ASP .Net 1 01-23-2007 06:35 AM
how can i simulate my pc as http server by writing java code to send the http response by socketstream to some pc in the internet?! mike Java 5 09-21-2004 02:04 PM
Getting server status response from HTTP request Mike C Python 1 02-16-2004 06:12 PM



Advertisments