David Foderick's Blog - OnMaterialize()

Making Cuyahoga and Community Server play nice together

I use Cuyahoga for my main website pages and relegate Community Server to be a subservient web app to take advantage of its blog and forums components. The latest Cuyahoga 1.5 upgrade threw a small wrinkle into the configuration process.

The basic setup is to have two virtual roots.
http://www.netknowledgenow.com/ has its own web.config for Cuyahoga.
http://netknowledgenow.com:81/CS is a virtual root under the main site with its own web.config for Community Server.

As this post describes, Cuyahoga adds some HttpModules to its site. These have to be removed in the Community Server web.config. You have to move the dll's from Cuyahoga's bin directory into Community Server's bin directory in order to remove the HttpModules. Starting with Cuyahoga version 1.5 there are also HttpHandlers registered by Cuyahoga. These HttpHandlers also have to be removed in CommunityServer's web config otherwise the Community Server pages do not function. No error message was being thrown but every subpage in Community Server was being redirected to the Community Server default home page. However, once you remove the Cuyahoga HttpHandler you have to re-enable Asp.Net's default handler (in machine.config). If anyone knows a cleaner way to remove this stuff and reset the HttpHandler to the default, please let me know!

A step-by-step recipe for making this work goes like this:
1. Copy the Cuyahoga dll's from the Cuyahoga bin directory into Community Server's bin directory.
2. Edit Community Server's web.config HttpModule and HttpHandler sections to look like this:

        <!-- START - CommunityServer specific application settings here -->
        
<httpModules>

                  
<!--<remove name="UrlHandlerModule" />-->
                  
<remove name="AuthenticationModule" />
                  <
remove name="CoreRepositoryModule" />
                  <
remove name="NHibernateSessionWebModule" />

            <
add name="CommunityServer" type="CommunityServer.CSHttpModule, CommunityServer.Components" />
            <
add name="CSProfile" type="Microsoft.ScalableHosting.Profile.ProfileModule, MemberRole, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b7c773fb104e7562"/>
            <
add name="CSRoleManager" type="Microsoft.ScalableHosting.Security.RoleManagerModule, MemberRole, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b7c773fb104e7562" />
            
<!-- <add name="CSReporting" type="CommunityServer.Reporting.ReportingHttpModule, CommunityServer.Reporting" /> -->
        
</httpModules>

        
<httpHandlers>
            
<remove verb="*" path="Error.aspx" />
            <
remove verb="*" path="*.aspx" />
               <
add verb="*" path="*.aspx" type="System.Web.UI.PageHandlerFactory" />

            <
add verb="GET" path="Utility/redirect.aspx" type="CommunityServer.Components.Redirect, CommunityServer.Components" />
            <
add verb="GET" path="aggbug.aspx" type="CommunityServer.Components.HttpHandler.AggBugHandler, CommunityServer.Components" />
            <
add verb="GET" path="avatar.aspx" type="CommunityServer.Components.HttpHandler.AvatarHttpHandler, CommunityServer.Components" />
            <
add verb="GET" path="vcard.aspx" type="CommunityServer.Components.HttpHandler.VCardHttpHandler, CommunityServer.Components" />
            <
add verb="GET" path="r.ashx" type="CommunityServer.Components.HttpHandler.TinyUrlHttpHandler, CommunityServer.Components" />
        </
httpHandlers>
Posted: Sep 30 2007, 07:14 PM by admin | with no comments
Filed under:

Comments

No Comments

Leave a Comment

(required) 

(required) 

(optional)

(required)