Redirect user if not logged-in in Kentico - authentication

I am very new to Kentico CMS and started implementing the basics.
I have Login button webpart which redirect me to page say 'Welcome.aspx'.
Now, what I am struggling with is if directly open 'Welcome.aspx' without login,
it should redirect to another page. Can anyone please help me in doing this?

If I understood correctly, you want the Welcome.aspx to require users to log in. If so, you can achieve that by adjusting page's ACLs at Page -> Edit -> Security and setting the Website logon page URL at Settings -> Security & Membership.
You can either set the page to be accessible by certain roles or at least require authentication.
There is an example in Corporate sample site - in section Partners.

Assuming you are using the recommended Portal Engine development model, you can set the permissions of the page on the Properties>Security tab. There you'd add a role of not authenticated and set the property to deny. Also ensure you have a default "login" page set in the settings.

Related

Anonymous access to web site default doc

We have a web site in IIS 7, that has a default document (index.asp) set. The entire site uses basic authentication except the index.asp page. This is working correctly if I enter the domain with the actual page name (www.mysite.com/index.asp). However, without the page name (www.mysite.com) I am prompted for credentials, even though it is the same page.
I've tried various web config changes and tried it with anonymous user set to the app pool and the IUSR account and it doesn't work either way. I'm thinking maybe I need to enable and then configure URL rewriting for this site but I'm not positive.
If you need any other info let me know.
thanks!

different login pages on sites on sensenet

I create more than one site on sensenet and I want to specify an login page for each site.
On site properties I can define the login page but that is not working... (I think). Every time I access without the login made I receive the follow message:
404 error The requested resource could not be found Please make sure
that the url is spelled correctly.
To go to the main page, click here
It shouldn't go to my login page defined on site settings?
What am I not picking here?
You should add at least one site URL to your new site, and also check if "Everyone" has "open" and "run application" permission on the new login page.

Subdomain cookie maintenance for Forms authentication website

I have a Server on Azure where an MVC4 web application is hosted. On the server I have added bindings for:
company1.mysite.com
company2.mysite.com
Within mysite an Admin user has the option to define custom styles for each of the subdomains. So to check the changes have been applied successfully. If the admin changes the URL from company1.mysite.com to company2.mysite.com they are redirected back to a login page. When I then attempt to log in with the same details it seems that there is some conflict in the cookies and I am unable to find the user details.
Is there anyway that I could preserve the login details for one subdomain and allow the user to simply change the URL to see if the changes had been supplied effectively. If not is there any way I can prevent this conflict on signing on to the other subdomain?
I think cookie domain must be specified in a proper way. Please, see this link

can't route /admin to user/login if not login in cakephp

i want to create a admin routing enabled program in cakephp and i had aleray enable
Route::Write(/admin,array('controller'=>admin_homes,'action'=>'index')) in route .php but when i type /admin it doesnot redirect me to my login page in users/login address so what is solution to this but if i custom go into my login page and login in then it will redirect to admin/admin_homes/index and then only using/admin will also take me to admin_homes/index
You want more than admin routing, you are looking for Authentication. That is what controls the login, not admin routing. Admin routing is for running the admin variation of specific methods.
Start here: http://book.cakephp.org/2.0/en/core-libraries/components/authentication.html
If you are looking for a simple user management app with permission driven access, feel free to use the one I created and put out on github. https://github.com/cdburgess/SUM-Cake

Joomla Authentication

Okay I'm a little confused on how to do this due to the fact that I'm new to Joomla.
I have a site where users need to be logged in to view certain articles. I want restricted articles to basically pick up weather or not the user is logged in, if so proceed as normal, else display a login/registration form.
I looked at the plugins section and found a "Joomla-Authentication" plugin. Now, how do I use that in an article in the same fashion I use other plugins in article? i.E {plugin_name}params{/plugin_name}
NO... You do not need plugin for this AT ALL.
In Joomla you have "Access Type" for modules/articles/pretty much everything.
Public - Visitors
Registered - logged in users
Special - back-end users
In Back-End go to Modules and create new Log-In module. In the access type selected "Public".
When you create articles select "Registered Access" this way only signed-in users will see the article.
This will help you. Log-In the admin Back-End (Administrator Screen), go to Help->Joomla Help. In the Alphabetical Index find following topics:
Module Manager (it explains access types)
Module - New
Article Manager (it explains access types)
Article Manager - New/Edit
I found a solution that works for me. I downloaded and installed JUMI. Jumi is a Joomla extension that allows you to include files such as php and then executes the code in those files. Through PHP I check user access and do redirects accordingly.
JUMI can be downloaded here