login for pages, response.redirect, urlreferrer

liunx

Guest
Hi all,
Im trying to create a login system for my website. Which if they went to a member page link like "a.aspx?param=xxx" in that page i do make a check for

if session("login") = "" then
response.redirect("login.aspx")


and in the login page after the login
i want to push them back in to the page they are

i was trying to use urlreferrer to get the page called it but after response.redirect it doesnt catch a.aspx......
is there a easy way to do this.

I would prefer working only in the login page so i would not have to chage every page that already has the sesion check code.You are recreating the wheel on checking to see if the user is logged in.

IN your web config you should be looking into
<authentication mode="Forms">
<forms name="aname" loginURL="login.aspx"></forms>
</authentication>
<authorization>
<deny users="?"/>
</authorization>


hen on your login page you are going to have to set it
something like

FormsAuthentication.RedirectFromLoginPage(userName,False)


That is the basic idea. You should look for more info online. I typed this from my head so their may be a small mistake somewhere.

Ericok this is confusing my code is database driven all the log its and everything are database driven. oledb connection to databaseWhat does the database have to do with this? Your login page would have to do the check with the database for the user. If it is right, you set the FormsAuthentication

Eric
 
Back
Top