469,963 Members | 1,738 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,963 developers. It's quick & easy.

The HTTP headers are already written to the client browser. Any HTTP header modificat

I hope someone can help with this one.
This is a include file that is used to check if a user is logged in before displaying a page.

I get this error when any page that references the include page.
-----Start error message -----------

Response object error 'ASP 0156 : 80004005'

Header Error

/staffdev/_reg/_asp/passprotect.inc, line 16

The HTTP headers are already written to the client browser. Any HTTP header modifications must be made before writing page content.
-------End error message----------------

This is the code that is contained in the passprotect.inc file.

What do I need to change to make this work as designed?

---------------------------------- Begin code ----------------------------
<html>

<head>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
</head>

<%
'First we check to see if the user is logged in
IF Session("rPassword") = "" THEN

'If their session is empty then we create a session for the current URL they were requesting
Session("ORI_URL") = Request.ServerVariables("Path_Info")

'Then we redirect them to the login page
Response.Redirect("logon.asp")
Else
End IF
%>
<body>

</body>

</html>
------------------------------ End Code ----------------------------------

any help is appreciated.

Dan
Jan 17 '07 #1
1 2212
iam_clint
1,208 Expert 1GB
Expand|Select|Wrap|Line Numbers
  1. <%
  2. 'First we check to see if the user is logged in
  3. IF Session("rPassword") = "" THEN
  4.  
  5. 'If their session is empty then we create a session for the current URL they were requesting
  6. Session("ORI_URL") = Request.ServerVariables("Path_Info")
  7.  
  8. 'Then we redirect them to the login page
  9. Response.Redirect("logon.asp")
  10. Else
  11. End IF
  12. %>
  13.  
Include this file at the very top of whatever pages ur wanting to use it on.

and put no html in this file make it strictly like I put it here.

and let me know your results.
Jan 17 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

1 post views Thread by EthanStyle | last post: by
7 posts views Thread by Michael Foord | last post: by
30 posts views Thread by Anon | last post: by
8 posts views Thread by Andreas Klemt | last post: by
reply views Thread by Dan Lenski | last post: by
2 posts views Thread by Vladimir Ghetau | last post: by
1 post views Thread by rainxy | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.