Posted on: 9/25/2014 9:13:39 AM | Views : 521

I want to protect static files (images, text files) in Classic ASP project from unauthenticated access. I have simple login page that authenticates user and sets session. The other asp pages have check on start if the user session is alive. But I want to know how can I protect static files where I cannot check the session variable's value. I got some idea to implement Basic authentication but I can't understand how to implement it in Classic ASP project.
The code I use for authentication in my login.asp is
<% Response.Expires = -1000 'Makes the browser not cache this page Response.Buffer = True 'Buffers the content so our Response.Redirect will work Session("UserLoggedIn") = "" If Request.Form("login") = "true" Then CheckLogin Else ShowLogin End If Sub ShowLogin %> <form name=form1 action=login.asp method=post> User Name : <input type=text name=username><br ...

Go to the complete details ...