David Foderick's Blog - OnMaterialize()

September 2007 - Posts

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 2 comment(s) |
Filed under:
RUAlive - a WPF tool to check if a website is running.

RUAlive is a WPF utility that answers the question "Is my website still running?"

RUAlive

RUAlive is written using Visual Studio 2008 Beta 2 Orcas. Download the source here.

To run RUAlive, you can either run the solution or run RUAlive.exe. Of course you need .NET 3.5 Beta 2 installed.

To use RUAlive:
1. Enter the http address of the site you want to monitor
2. Click on Config to enter the contents of the page that you want to search for. Also enter the frequency to perform checks.
3. Close the configuration screen to go back to the main screen and press the Start button.
4. To see any errors hover over the line.
5. To clear the list right-click and select "Clear History".

RUAlive is not only a simple tool that performs a useful function. It is also demonstates some useful technologies such as Windows Presentation Framework and Domain Driven Design.

The backlog of feature enhancements include:
1. Implement persistence
2. Improve the overall look and feel with images, animation and themes.
3. Enhance the plug-in architecture (similar to the Composite Application Block)
4. Implement some sort of dependency injection
5. Send alerts
6. View response page
7. Make a Vista gadget
8. Lots of other goodies that I can't recall off the top of my head now.

Posted: Sep 27 2007, 05:27 AM by admin | with no comments |
Filed under: