This project is read-only.

Starting from the Source - Project within a Solution

Topics: ASP.NET 2.0
Jul 15, 2010 at 8:55 PM

I apologize if any of these questions are noob; I am new to BlogEngine.NET and looking to integrate it into our intranet.

We are currently an ASP.Net 4 Web Forms platform on IIS 7.5, using Windows Authentication (Kerberos). The intranet is built as a Web Application Project (rather than Web Site project), and is deployed using file system publish in visual studio.

My first attempt to install BlogEngine.NET was using the Web Platform Installer 2.0 directly on the server. It installed correctly, and is setup as an IIS application within the intranet website. The issue is that since I did not install the source control (1) I have no local copy in my project, (2) without it in my project, publishing the file system (as configured now) replaces all files with what is in the compiled project (meaning /blogs disappears). Bad.

In addition to fixing the issue above, I realized we will eventually need to integrate the blog engine into look and feel (master page, css, and jquery scripts) and be able to customize some things about BlogEngine.NET - so I figured I should install the source code. The hang up here is if we wish to consume our master pages and scripts and such, BlogEngine.NET needs to be a part of the same solution - there are workarounds for this like the old fashioned virtual directory trick, or deploying a common library to GAC but I would like to avoid that if possible for now.

So here are my questions:


1. Is there a way to integrate BlogEngine.NET into my existing solution?

    a. If YES, can the blog engine project(s) be deployed to IIS as a separate application within the intranet website still, or will it get restricted to compilation in the core website application?


2. What do I need to modify in BlogEngine.NET in order to use Kerberos authentication? I know swapping the authentication tag in web.config for Windows auth and impersonation, but is there anything else?


I like this product a lot. All your help is very appreciated.


Jul 16, 2010 at 9:13 PM

Focusing on Question #2, I'm still having trouble with Windows Integrated Authentication (Kerberos) in BlogEngine 1.6.


Here's what I've done thus far:

1. Unzipped the source code onto my dev box.

2. Opened the solution in VS.Net 2010, and let it convert the solution for 2010, as well as let it convert the website to run on .Net 4.0 - this shouldn't cause problems but I'm happy to eliminate this step and run it under a 2.0 app cool Classic style if necessary.

3. I compile and run the application without modification and it works locally as well as deployed to our dev web server box (using copy website in VS.Net)... but it is using Forms authentication tied to the XML role providers and membership providers.

4. I open up web.config at the root of the application and change Authentication Mode to Windows, enable Identity Impersonation, and then I set the authorization section to deny non-authenticated users, and allow Domain Users. Lastly under "appSettings" I change the BlogEngine.AdminRole to our web admin group, and the BlogEngine.EditorRole to our Domain Users group. -- Nothing else has been altered.

5. When I run the application locally now it "works" in that the pages come up and someone is logged in, but since it is using the XmlRoleProvider, I'm not sure where the mismatch is... Kerberos + Impersonation via Windows Auth would mean that the app pool running the site is working as me "domain\trey" but the AdminRole and EditorRole settings are AD Groups... the "roles.xml" file now looks like this:

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
    <name>CDF\CALFIREWeb Administrators</name>

6. I am unable to post... should I be using the AspNetWindowsTokenRoleProvider here? If so, how I do I set that properly? I tried simply commenting out the RoleManager tag in web.config and adding my own in <roleManager enabled="true" defaultProvider="AspNetWindowsTokenRoleProvider" /> but that blows up machine.config somehow...


Any thoughts on what's going on and what is left to do?


The end result I am looking for is that

A) The site executes as the user logged into the domain - ex. the custom app pool identity (domain\attendentAccount) impersonates me (domain\trey)

B) Authorization is coordinated with AD users and groups - web.config

C) Blogs can be assigned to a single user, or to a group - ex. a user group can have a blog, and all it's members can post to it (domain\someGroup)


This possible or am I nuts?

Jul 26, 2010 at 11:35 PM


I'm trying something similar, ie, to integrate with 4.  Have you get working with .net 4?