This topic is locked

Password protected site

10/20/2005 09:26:48
ASPRunnerPro General questions
M
mpsys author

I thought I read somewhere on this site, and now can't seem to find it, that there was a way I could use ASP Runner Pro to password protect a website. I know the program has security setting but if I do that it only brings me to the database. How do I set it up so that the DB just stores usernames and after login I go to certain directory (or pages) of the site?

M
mpsys author 10/21/2005

Did some of my own coding...

got it working

Sergey Kornilov admin 10/25/2005

To password-protect ASP file that is not generated by ASPRunner you can add the following code snippet in the beginning of file:

If Session("UserID")="" then

    Session("MyURL")=request.ServerVariables("SCRIPT_NAME") & "?" & request.ServerVariables("QUERY_STRING")

    Response.Redirect "login.asp?message=expired"

End If
M
mpsys author 10/25/2005

GREAT!!
thanks! Now, can you assist me in adding the logout link back in?
------------------------------------------

Disregard. Coding the absolute path works.
thanks again