Thursday, January 27, 2011

Preventing Login and Content Changes

Need to temporarily block users from logging into to a DotNetNuke website? Prevent content from changing on a site? All of this can be done through the web.config file. Simply create a temporary page that will notify the users why they are not able to login, then create a redirect that from ~/login.aspx to your page by placing this tag within <system.web>:

<urlMappings enabled="true">
<add url="~/Login.aspx" mappedUrl="~/YourNotificationPage.htm"/>

To log out all users that are currently logged in, comment out your current forms authentication tag and add this:

<forms name=".DOTNETNUKE" protection="All" timeout="1" cookieless="UseUri"/>

You can find this tag in the web.config by searching for "<forms".

This trick is supported in all versions and editions of DotNetNuke at the time of writing (current version at the time of writing is 5.6)

No comments:

Post a Comment