Configuring authentication for public users
I have been looking for a way to configure authentication for my public users to my Sitefinity Page within the Sitefinity Administrative User Interface, but have not found a way to accomplish this.
I have added a Login control to my Sitefinity Page and the Login View and Login Status controls to my other secured pages. I have also denied anonymous access to these pages.
Is there an easy way within Sitefinity to configure the Sitefinity Page as my default redirect Login form whenever a user directly attempts to access one of these secured pages?
Also, I have created a "Public" User Role with no permissions within Sitefinity and added my users to this role. Is this the correct way to configure roles for publicly authenticated users?
Hello Samir Vaidya,
In order to redirect anonymous users to the login page, everytime they try to access a forbidden page, you will have to customize the "403 HTTP error" that is received by the user. This can be done by going to the web.config file of your application and adding the following code under the <customErrors> tag (your_login_page_url is the url of the desired redirect page):
<
customErrors
mode
=
"On"
>
<
error
statusCode
=
"403"
redirect
=
"your_login_page_url"
/>
</
customErrors
>