Technical support This forum is closed.
Version 1.x > Technical support > custom logon form View modes: 
User avatar
Member
Member
marie - 11/28/2006 10:56:55 PM
   
custom logon form
I have created a custom logon form instead of using the LogonForm tool and have done the work of verifing the user and redirecting them to the page I want them to go to. But the page I am redirecting them to is a secured area and does not recognize them as a user.

Are there some session variables I need to set so that is sees that I am logged in when redirected to the secure page from my customer logon form?

Any help is greatly appreciated.

Thanks in advance.

User avatar
Guest
admin - 12/7/2006 7:13:13 AM
   
Re: custom logon form
Hello,

Kentico CMS uses standard forms authentication. You need to call System.Web.Security.FormsAuthentication.RedirectFromLoginPage method on your logon form.

Best Regards,

User avatar
Member
Member
marie - 12/7/2006 5:09:29 PM
   
Re: custom logon form
Thanks so much!

Using the System.Web.Security.FormsAuthentication.RedirectFromLoginPage worked, it logged me in, but now how do I redirect to the page I want to go to. I put Response.Redirect("~/Registered-User.aspx") on the line below and it was throwing an error.

Any help is greatly appreciated.

Thanks.

User avatar
Member
Member
marie - 12/7/2006 7:46:02 PM
   
Re: custom logon form
Never mind I figured it out. I must have had an error in one of my other controls that was causing an error.

Thanks for the help.

User avatar
Guest
admin - 12/8/2006 12:50:08 PM
   
Re: custom logon form
Hello,

you can also use System.Web.Security.FormsAuthentication.Authenticate and the call Response.Redirect with custom URL.

Regards,