473,757 Members | 9,463 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

1 New Member
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="Micros oft FrontPage 5.0">
<meta name="ProgId" content="FrontP age.Editor.Docu ment">
</head>

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

'If their session is empty then we create a session for the current URL they were requesting
Session("ORI_UR L") = Request.ServerV ariables("Path_ Info")

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

</body>

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

any help is appreciated.

Dan
Jan 17 '07 #1
1 2589
iam_clint
1,208 Recognized Expert Top Contributor
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
2035
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 header? thanks, robt. http://www.techbomb.com/
7
9290
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. # No warranty express or implied for the accuracy, fitness to purpose
30
4849
by: Anon | last post by:
If Http headers specify the character encoding, what is the point of the Meta tag specifying it?
8
24277
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 been sent like If response.IsSentHttpHeader then ....
3
6931
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 as per RFC 2617 (http://www.faqs.org/rfcs/rfc2617.html). My attempts to authenticate are failing. The server requires the header to be present with the request. For security reasons, it will not reply in any way if the header is not present. ...
1
6108
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. I think I understand what the problem is, but what I am curious about is I only get this problem when the page resides on my web server (Windows 2K3). However when it resides on my development machine (Windows XP with IIS 5.1) I do not have...
0
1924
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 allows free Internet access if you change the default proxy server, but it has a severely buggy HTTP client implementation which will freeze if there's no Content-Length header. Basically, it's impossible to read normal web pages without some...
3
3161
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 if user hits Cancel button'; exit; } else {
2
4386
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, and I send a regular GET header without any specific HTTP headers regarding the type of encoding accepted, cookies, accepted charset, conditional headers etc
0
10072
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9906
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9885
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9737
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7286
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5329
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3829
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3399
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2698
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.