posts - 374, comments - 606, trackbacks - 112,
Dan Bartels online engineering logbook... Items that I find useful organized for my use, and indexed by google for yours. Here you can find information about Microsoft C# programming, SQL SERVER 2005, Telligent Systems CommunityServer, Dot Net Nuke, Windows Vista / Longhorn, and just about anything else that would compel me to type.

News

What I am Reading:


Professional Community Server

Past books can be viewed on:

Post Categories

Archives

Coding Techniques

Coding Tools

Community Sites

Deal Finders

Friends Businesses

Microsofties

Smartphones

Utilities

my blogmap
CS2 Blogging at the root

Scott Watermaysk has spent a considerable ammount of time making sure CS 2 would have an out of the box solution for those of us that run a small or single site with it...  To that end, lots of small changes have been made to our siteURLS.config file and some critical configuration properties have been added...  Additionaly we went all the way as to allow you to specify a URL re-writer provider on a per "location" basis...  so if you dont like how re-writing works in a particualr CS app, or want to do something custom, you can still use the framework...

But to the point...  in CS2B2 the documentation is missing for blogging at the root...  but here is all you need to do...

In the communityServer.config...  you need to set the "defaultApplicationKey" property for blogs to be that of your single blog...

<Weblog
defaultTheme = "default" enableSkinCache = "true" enableThemes = "true"
aggregatePostSize = "250" createDirectories = "true" enableCommentRedirects = "true"
servicePostCountLimit = "25" aggregatePostCount = "25" individualPostCount = "15"
defaultApplicationKey="DanB">

This will allow CS to use that applicaiton key if none is provided on the querystring (or in the path)

Next, we can remove the application key from the CS paths, by editing the "##blogdirectory##" transformer in the SiteUrls.config....  just set it to an empty string, and your applicaiton key, will now be coming from the default..  (Note the XML attributes / tags mentioned here are case senative)

<add key = "##blogdirectory##" value = "" />

Finally, if you are like me; I run my blog at the root of the cs site...  (not in the /blogs/ folder) but I like to keep my install as generic as possible, which means all the files are still in the /blogs folder...  to do this, you need to update the "location" tag for blogs...  We support this through use of a "physicalPath" attribute.

<location name="weblogs" path="/" physicalPath="/blogs/" type="CommunityServer.Blogs.Components.SingleBlogLocation, CommunityServer.Blogs" />

This should get you all set up... the following should also work for galleries...

Dan

Published Tuesday, December 27, 2005 3:20 PM by DanB

Filed under
::

Comments

# re: CS2 Blogging at the root @ Wednesday, December 28, 2005 9:49 AM

Very well :)
I got it from Jayson Knight last week and configured my blog at root of my site.
Seems that process is even better but just one point to be mentioned for those who are reading this post and don't know much about CS:
If you try to configure blogs at root and have some articles currently at place you'll have some problems. Solution is easy jsut read this post on CS forum:
http://communityserver.org/forums/thread/507217.aspx

Keyvan Nayyeri

# re: CS2 Blogging at the root @ Wednesday, December 28, 2005 12:18 PM

Heya, Thanks!

Will this allow a heterogenius mix of sites running the same instance of CS2 with some sites running a blog-at-the-root, and others having the other applications (forums/home/etc) enabled?

Thanks

Sean

# re: CS2 Blogging at the root @ Wednesday, December 28, 2005 2:02 PM

How about CS installs that are setup with multiple blogs in the root ?

Daren

# re: CS2 Blogging at the root @ Thursday, December 29, 2005 12:51 PM

Sean,
Unfortunately no, the changes are made in the config files which affect all sites running under that physical IIS directory; It may be possible to do multiple installs of the CS files into different IIS sites, but share the database, and asp_net application (which would essentially share logins between all your sites) but you would have to do some testing there, and might need to tweak some sprocs

Daren,

For multiple blogs at the root, you would just make the location change... You dont need a defaultApplicatioKey... and you would need to have the ##blogdirectory## set to its default of "{0}/" (this is what writes the application key to the URL / path for multiple blogs... in a single blog, we dont write this, and we just override the value that the url-re-writing is trying to extract with the defaultApplicationKey setting)

Dan

DanB

# re: CS2 Blogging at the root @ Saturday, December 31, 2005 8:06 AM

Hi Dan,

AFAIS GalleryConfiguration does not support defaultApplicationKey, so currently single gallery is not supported.

Thomas Freudenberg

# re: CS2 Blogging at the root @ Saturday, December 31, 2005 11:34 AM

Thomas...
Not sure what you mean by AFAIS? The GalleryConfiguration class inherits from ApplicationKeyApplicationConfiguration, which defines this behavior (the default application key)... I have not tested this configuration for the gallery specifically, but it should work.... I am not sure exactly when this change went in, but I would suspect it was post beta 1; so this would only work on beta 2 and newer builds.

In builds prior to this change, the way you would set the default gallery key is by editing each siteURL for the gallery, where there was a appKey={} and replacing the {} with the appropriate value

Dan

DanB

# re: CS2 Blogging at the root @ Sunday, January 01, 2006 7:44 PM

I managed to configure CS to work in a Single Blog at root modeon my website codesane.com by following the the steps you had recommended. However once this was done i had all sorts of issues with aricles. The default page (/articles/default.aspx) for articles came up blank despite having a published article in place.

I published an article it comes up on the site aggregate list but the article itself does not show up when you try accessing the link thats generated by CS (http://www.codesane.com/articles/An_Introduction_To_SOA.aspx). Instead you have a two links tha show up

Manage articles > (Edit)

Is this a known issue ? Is there a work around or a solution ?

Anoj

# re: CS2 Blogging at the root @ Tuesday, January 03, 2006 2:51 AM

I've overlooked that GalleryConfiguration inherits ApplicationKeyApplicationConfiguration. Sorry for any inconvenience.

Thomas Freudenberg

# re: CS2 Blogging at the root @ Thursday, January 12, 2006 5:50 AM

Hi,

This is an excellent tutorial Dan. However, would you please give us the additional information to map a single blog to the root of a subdomain? such as philippe.domain.com or dan.domain.com and keep the www.domain.com mapped to the original CS dir.

Thanks

Philippe DA SILVA

# re: CS2 Blogging at the root @ Friday, January 20, 2006 2:59 PM

I wasn't able to get this working on my install of CS2 B2. :(

After applying the noted fixes I would be directed to the "Welcome to Community Server/Front Page News" home screen for blogs. And then when clicking on an existing post listed below I would get a "resorce not found error"

Is this because I had existing content?

my working blog path looked like this...

localhost/CS2/blogs/dansblog

Is there anything different or extra I would need to do to get this working (move my blogs folder, reference the "dansblog" folder in the location tag or blogdirectory attribute?



Dan

# re: CS2 Blogging at the root @ Saturday, January 21, 2006 10:41 AM

I have tried this as well with no luck. Details of my problems are found in the post at: http://communityserver.org/forums/thread/510712.aspx

Any suggestions or ideas?

Patrick Altman

# re: CS2 Blogging at the root @ Tuesday, January 24, 2006 11:04 PM

Is this still working for cs 2.0 beta 3?

I would assume so, but I've tried and it didn't work. I double checked, and tripple checked my changes and it's what you've described.

Andrew

# re: CS2 Blogging at the root @ Tuesday, January 24, 2006 11:05 PM

arg, I'm an idiot. I did forget something. It works now :)

Andrew

# re: Single Gallery, but not at the root @ Thursday, January 26, 2006 3:39 AM

Firstly, thanks for the tip on how to set up a single blog. This is much cleaner than 1.1 as a single blog. I look forward to reskinning my 2.0b3 site now. =8)

But all is not well... I've yet to configure my site for a single gallery.

Setting up the default gallery using the defaultapplicationkey worked, but I'd like to not have the applicatlion name show up in the URL when visiting that gallery. Is that possible to do by modifying the config files? So far I've had no luck.

Currently, an image url shows up like this:

http://blog.geeqs.net/photos/blogimages/images/223/original.aspx

I'd like it to be accessible through this URL:

http://blog.geeqs.net/blogimages/images/223/original.aspx

"blogimages" is the gallery name

Keith Reid

# re: CS2 Blogging at the root @ Thursday, January 26, 2006 4:08 AM

I've also noticed that the shortlink behaviors aren't working properly.

"dottextweb" is the application key for my blog. When I try to access a post using a shortlink format (ex: http://blog.geeqs.net/373.aspx) it errors out with the following exception.

User Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR
Path: /dottextweb/blogs/shortlink.ashx?PostID=378 as HTTP GET
Referrer:
Message: Could not find a part of the path "C:\Inetpub\wwwroot\CommunityServer\Web\dottextweb\blogs\shortlink.ashx".
System.IO.DirectoryNotFoundException: Could not find a part of the path "C:\Inetpub\wwwroot\CommunityServer\Web\dottextweb\blogs\shortlink.ashx".



It appears that there might be more work needed in the config changes to get all of the functionality to work in a single blog configuration. Or have I possibly missed something?

Keith Reid

# re: CS2 Blogging at the root @ Monday, January 30, 2006 6:54 AM

If I make these changes to a working out of the box CS2 beta3 will I lose any of the data that is already there?

Jeff

# re: CS2 Blogging at the root @ Monday, January 30, 2006 2:38 PM

Jeff,
No - these changes simply affect how CS works with different URLs that are accessed. It does not change your existing data in any way. If you have problems, you could restore backups of the files edited in this tutorial.

techSage

# re: CS2 Blogging at the root @ Monday, February 13, 2006 1:55 PM

Verry good work. I have use your tips and and configured my blog at root of my site.

Liviu Mijache

# re: CS2 Blogging at the root @ Sunday, March 05, 2006 1:20 PM

"For multiple blogs at the root, you would just make the location change... You dont need a defaultApplicatioKey... and you would need to have the ##blogdirectory## set to its default of "{0}/" (this is what writes the application key to the URL / path for multiple blogs... in a single blog, we dont write this, and we just override the value that the url-re-writing is trying to extract with the defaultApplicationKey setting) "

Dan,
I am trying to configure multiple blogs at the root in CS2.0. I am sorry, i didnt get what you meant by saying
"and you would need to have the ##blogdirectory## set to its default of "{0}/" "

But, this is how the default value for the siteurls.xml looks like. So what changes  i need to do for enabling multiple blog at root.

Again. Sorry for this dumb question.

TIA.

Vishnu

# re: CS2 Blogging at the root @ Tuesday, March 21, 2006 3:30 PM

Dan what if you wanted a cs site that has one blog and one gallery where the navigation would point to and be ?

mydomain /photos  
mydomain/blog  

The Wizard

# re: CS2 Blogging at the root @ Tuesday, May 23, 2006 4:16 PM

Hmmm... using this method does it require a "default.aspx" to be on the end of you do www.something.com/MYBLOG/

Doesn't seem to work without the file?

Thanks!

Jeremy H.

# re: CS2 Blogging at the root @ Wednesday, May 24, 2006 12:45 AM

Jeremy,

There just needs to be a default.aspx file on your web server at www.something.com/myblog/ to tell iis that it should let asp.net handle the request...  In my case, since its a single blog at the root, the root default.aspx takes care of that for me...

Dan

DanB

# re: CS2 Blogging at the root @ Monday, May 29, 2006 10:57 AM

Dan,

Thanks. This was actually only an issue because the blog was setup before I did the configuration. Blogs that were setup after I made the changes setup the dummy folder and file for me.

Thanks! We are now setup: http://blogs.orcsweb.com

Jeremy H.

# re: CS2 Blogging at the root @ Tuesday, June 27, 2006 4:09 AM

Sorry for posting a slightly topic. I was actually refered to this blog by support@telligent.com. The only package I am interested in CS2 is the Forum, anyone have a solution to set this up at the root? Like forums.xbox.com. Any help is much appreciated.

CE

# re: CS2 Blogging at the root @ Thursday, July 20, 2006 2:55 PM

Hi Dan, (I have also posted this in the CS forum)

I have just upgraded my blog to ASP.NET 2.0, CS 2.1 beta 1.

I followed your tutorial "Blogging at the root" and now seeing all links missing my domain.

If you go to scottelkin.com and hover over any link, you will see the problem.

For example,  when I click the rss icon, the url is http://rss.aspx.  It should be http://www.scottelkin.com/rss.aspx

To hedge any question of what I did, here is my sequence of actions:

1.  I had a CS 2.0 website running on ASP.NET 1.1 with my blog running at the root.

2.  Upgraded to CS 2.0 ASP.NET 2.0 and verified it worked (although not blogging at root yet).

3.  Upgraded to CS 2.1 ASP.NET 2.0.  Verifed it worked (not at root still).

4.  Applied your tweaks.

   a. Before the tweaks, my url for my blog was http://scottelkin.com/blogs/blog_0/default.aspx.

   b. The defaultApplicationKey I set in the tweaks was then "blog_0".

   c. All other tweaks I didn't change.



Any ideas what is going on here?

Scott Elkin

# re: CS2 Blogging at the root @ Wednesday, July 26, 2006 4:35 AM

Hello Dan,

Does this tweak work for CS 2.1 Beta 1? I have a fresh install of the beta 1 and when I try to apply the above tweak, the site does not default to the single blog. I still see the homepage and the blogs link then redirects to the homepage too. Looking forward to an update to this soon.

Thanks,
Shiv.

Shiv

# SITE UPDATE : CS 2.1 and Single Blog @ Sunday, August 13, 2006 9:53 PM

I&#39;m going to be installing CS 2.1 on this site tonight or tomorrow. Additionally, I will be converting

The Brown Report

# Community Server Daily News for Thursday, August 17, 2006 @ Thursday, August 17, 2006 2:20 PM

news of the day a grab bag for what's happening in Community Server Keyvan, Jayson and friends created

Community Server Daily News

# Coding is fun (even installation) @ Wednesday, August 30, 2006 4:36 PM

&quot;Dozing Dogs has an installation program, right?&quot; I should have looked innocent and said that

British Inside

# There and Back Again @ Friday, October 20, 2006 5:14 PM

It&#39;s been a very long time since this blog was alive. I was previously hosting it at home, and since

I Got Rhythm

# Jason Row covers the highlights of Dan Bartel's classic @ Wednesday, November 22, 2006 10:30 AM

Jason Row covers the highlights of Dan Bartel&#39;s classic &quot;Configuring CS Blogging at the Root&quot;

Daily News Faq List

# The first post! @ Friday, December 08, 2006 9:43 AM

So everyone needs the obligatory &quot;First blog post&quot; on their site, so here is mine. Welcome

Ely Lucas

# Community Server to the rescue @ Friday, December 08, 2006 10:10 AM

Over the last couple of days I set up Community Server 2.1 SP2 and migrated all Killer-Blog content to

Alex Thissen Weblog Build 1.15.10.1971

# Back again in the blog world @ Tuesday, January 02, 2007 2:13 PM

Precisely an year after i put up my first blog post here i am once again trying to repeat the same steps.

CodeSane

# Neek Talk Has a New Home @ Saturday, January 13, 2007 2:56 PM

Neek Talk, where the line between geek and nerd is especially thin, now has its own domain name, NeekTalk.com

Neek Talk

# How to Map A Community Server Blog as the Home Page @ Thursday, February 15, 2007 6:01 AM

I decided when I started this Blog I was going to use Community Server as the application. Why not it

Chris Love's Official Blog - Professional ASP.NET

# Jason Row covers the highlights of Dan Bartel's classic @ Monday, March 12, 2007 10:39 AM

Jason Row covers the highlights of Dan Bartel&#39;s classic &quot;Configuring CS Blogging at the Root&quot;

Community Server Bits

# CS2007 Forums at the Root @ Wednesday, May 30, 2007 9:42 AM

In reading the Community Server forums, I saw some questions about using forums at the root. I thought

ooto.info

# re: CS2 Blogging at the root @ Thursday, November 29, 2007 3:42 AM

Doesn't seem to work without the file

Thanks!

kral oyun

# How to use Community Server for a Single Blog @ Wednesday, March 05, 2008 8:20 PM

Community Server is a full featured community management tool. But what happens when you're just...

Mike.Temporale

# Just when you thought it was over... @ Sunday, May 11, 2008 4:51 PM

Right, so I got my blog up and running on my SBS machine, fighting tooth and nail to get it to happen

K Blog

Leave a Comment

(required) 
(required) 
(optional)
(required) 
 
Powered by Community Server (Commercial Edition), by Telligent Systems
powered by god (with a little help from Telligent Systems - Community Server 2.1)