by Jon Sigfusson
17. May 2010 20:17
I recommend creating multiple instances of BlogEngine.NET when you want:
- to use multiple themes (not discussed here)
- to have a restricted area
The approach I recommend is to create a root (folder) and any number of BlogEngine.NET instances as subfolders:
- Root
- Default blog instance
- Restricted instance
In the IIS Management Console the root is a web site node and the BlogEngine.NET instances are configures as web applications. BlogEngine cannot be installed in subfolders on a web site without configuring them as applications.
The root should redirect to the default blog instance.
The restricted instance should redirect anonymous requests to either the root or the default blog instance. Set the loginUrl attribute of the authentication element in the web.config file.
To actually restrict access to the restricted instance you must insert an authorization element into the web.config file:
<authorization>
<allow roles="Members" />
<deny users="*" />
</authorization>
To use single sign-on in all instances of BlogEngine.NET as well as the root you should use a database as user store such as the SqlMembershipProvider and SqlRoleProvider. See Al Nyveldt’s excellent post on how to configure these providers in instances of BlogEngine.NET.
More to come...