473,386 Members | 1,708 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 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 2518
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

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

Similar topics

1
by: EthanStyle | last post by:
are there any plans to increase the amount of information you can get out of http_ calls in a script to get data from your visiors. are there already function calls for every component of the...
7
by: Michael Foord | last post by:
#!/usr/bin/python -u # 15-09-04 # v1.0.0 # auth_example.py # A simple script manually demonstrating basic authentication. # Copyright Michael Foord # Free to use, modify and relicense. #...
30
by: Anon | last post by:
If Http headers specify the character encoding, what is the point of the Meta tag specifying it?
8
by: Andreas Klemt | last post by:
Hello, I get this error Message "cannot redirect after http headers have been sent" when I do this response.redirect ("home.aspx") How can I find out with vb.net if already a http header has...
3
by: Patrick Fogarty | last post by:
I am programming what is to be a web service client that will use an HTTP-POST to request and retrieve data. The remote server (written in java for what it's worth) requires basic authentication...
1
by: mbosco51 | last post by:
Hi. I am getting the following error on one of my asp pages... The HTTP headers are already written to the client browser. Any HTTP header modifications must be made before writing page content....
0
by: Dan Lenski | last post by:
Hi all, I've recently written an HTTP proxy server for the Motorola E815 cell phone, based on Suzuki Hisao's "Tiny HTTP Proxy" (http:// www.okisoft.co.jp/esc/python/proxy/). This cell phone...
3
by: Reporter | last post by:
Here is an example from the PHP Manual <?php if ((!isset($_SERVER)) || (1==1)) { header('WWW-Authenticate: Basic realm="My Realm"'); header('HTTP/1.0 401 Unauthorized'); echo 'Text to send...
2
by: Vladimir Ghetau | last post by:
Hi guys, This is a weird problem, and I'm not sure if I got it right. Just a practical example, that will describe my problem: I'm connecting to google.com host on port 80 using fsock open,...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

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.