472,145 Members | 1,321 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,145 software developers and data experts.

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 2336
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

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.