Forms authentication problem

  • Thread starter Thread starter Reddy
  • Start date Start date
R

Reddy

Hi,

I am using forms authentication in my web site. I kept all the protected
files in a folder called "secure". Logining in using a login form works
fine. Outside the "secure" folder I have a registration form. After a new
user registers how do I give the user access to the files in "secure" folder
immediately.

Thanks,

Reddy
 
Reddy,

I dont know how you are using FormsAuthentication but here's how i am doing
it.
User fills registration information..
validate
add user info to the db. after hashing the password.
i have then make another call to get the roles associated with the user (by
default say its a customer)
create authentication ticket and write the username and user roles to the
ticket..
encrypt the ticket and write it to the forms authentication cookie.
once i am done with that i read the returnURL and do a response.redirect (so
that the ticket is set in the cookie is not over written by
redirectfromloginpage)
thats about.... all i do...
i attach the user roles in application_authenticate request and thats bout
it.
location does the rest
 
Back
Top