I am trying to add authentication level login pages to my website. However, when I try to redirect the user to another page if they don't have the proper user level to view the page I get a Header Error that looks like such:
Header Error
/Project1/securitylevel2required.asp, line 5
The HTTP headers are already written to the client browser. Any HTTP header modifications must be made before writing page content.
Securitylevel2required.asp page looks like such:
<%
if session("securitylevel" > 1 Then
'do nothing
Else
Response.Redirect "securityunauthorized.asp"
end If
%>
Now, I found in the forum the same situation in which the person who responded posed the solution to use Response.Buffer at the top of the page. I tried this and I still get the same error but this time the error refers to the line containing the statement 'Response.buffer'.
If anyone has a solution to this it would be greatly appreciated.
Thanks in advance,
M
Header Error
/Project1/securitylevel2required.asp, line 5
The HTTP headers are already written to the client browser. Any HTTP header modifications must be made before writing page content.
Securitylevel2required.asp page looks like such:
<%
if session("securitylevel" > 1 Then
'do nothing
Else
Response.Redirect "securityunauthorized.asp"
end If
%>
Now, I found in the forum the same situation in which the person who responded posed the solution to use Response.Buffer at the top of the page. I tried this and I still get the same error but this time the error refers to the line containing the statement 'Response.buffer'.
If anyone has a solution to this it would be greatly appreciated.
Thanks in advance,
M