<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://lunarmedia.com/utility/FeedStylesheets/atom.xsl" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en"><title type="html">Lunarmedia Blog</title><subtitle type="html">Personal blog by Anders Vindberg filled with dissimilar things ranging from molecular cooking sessions to innovation theories and web development combined with interesting daily thoughts all served with a dried academic tongue. Some of it may be indecipherable as my original tongue is Danish (no excuse) but do try and keep me entertained by commenting my tangled words.</subtitle><id>http://lunarmedia.com/blogs/lunarmedia_blog/atom.aspx</id><link rel="alternate" type="text/html" href="http://lunarmedia.com/blogs/lunarmedia_blog/default.aspx" /><link rel="self" type="application/atom+xml" href="http://lunarmedia.com/blogs/lunarmedia_blog/atom.aspx" /><generator uri="http://communityserver.org" version="3.0.20416.853">Community Server</generator><updated>2009-01-19T18:37:00Z</updated><entry><title>CSControl:Pager Template Styling</title><link rel="alternate" type="text/html" href="http://lunarmedia.com/blogs/lunarmedia_blog/archive/2010/07/28/cscontrol-pager-template-styling.aspx" /><id>http://lunarmedia.com/blogs/lunarmedia_blog/archive/2010/07/28/cscontrol-pager-template-styling.aspx</id><published>2010-07-28T07:44:00Z</published><updated>2010-07-28T07:44:00Z</updated><content type="html">&lt;p&gt;Styling the pager control in Community Server always escapes me so here is an example:&lt;/p&gt;&lt;p&gt;&lt;font face="courier new,courier"&gt;&amp;lt;CSControl:Pager id="pager" runat="Server" Tag="div" style='text-align: center;'&amp;gt;&lt;br&gt;&amp;lt;FirstLinkTemplate&amp;gt;&lt;br&gt;&amp;nbsp;
 &amp;lt;CSControl:CSLinkData LinkTo="Link" LinkCssClass="TextButton" 
runat="server"&amp;gt;&amp;lt;ContentTemplate&amp;gt;&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Newest&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/ContentTemplate&amp;gt;&amp;lt;/CSControl:CSLinkData&amp;gt;&lt;br&gt;&amp;lt;/FirstLinkTemplate&amp;gt;&lt;br&gt;&amp;lt;PreviousLinkTemplate&amp;gt;&lt;br&gt;&amp;nbsp;
 &amp;lt;CSControl:CSLinkData LinkTo="Link" LinkCssClass="TextButton" 
runat="server"&amp;gt;&amp;lt;ContentTemplate&amp;gt;&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Newer&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/ContentTemplate&amp;gt;&amp;lt;/CSControl:CSLinkData&amp;gt;&lt;br&gt;&amp;lt;/PreviousLinkTemplate&amp;gt;&lt;br&gt;&amp;lt;PageLinkTemplate&amp;gt;&lt;br&gt;&amp;nbsp;
 &amp;lt;CSControl:CSLinkData LinkTo="Link" Property="Text" 
Text="&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;{0}&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;" 
LinkCssClass="TextButton" runat="server" /&amp;gt;&lt;br&gt;&amp;lt;/PageLinkTemplate&amp;gt;&lt;br&gt;&amp;lt;CurrentPageLinkTemplate&amp;gt;&lt;br&gt;&amp;nbsp;
 &amp;lt;CSControl:CSLinkData Tag="Span" CssClass="TextButtonDisabled" 
Property="Text" 
Text="&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;{0}&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;" 
runat="server" /&amp;gt;&lt;br&gt;&amp;lt;/CurrentPageLinkTemplate&amp;gt;&lt;br&gt;&amp;lt;SeparatorTemplate&amp;gt;&amp;lt;/SeparatorTemplate&amp;gt;&lt;br&gt;&amp;lt;NextLinkTemplate&amp;gt;&lt;br&gt;&amp;nbsp;
 &amp;lt;CSControl:CSLinkData LinkTo="Link" LinkCssClass="TextButton" 
runat="server"&amp;gt;&amp;lt;ContentTemplate&amp;gt;&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Older&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/ContentTemplate&amp;gt;&amp;lt;/CSControl:CSLinkData&amp;gt;&lt;br&gt;&amp;lt;/NextLinkTemplate&amp;gt;&lt;br&gt;&amp;lt;LastLinkTemplate&amp;gt;&lt;br&gt;&amp;nbsp;
 &amp;lt;CSControl:CSLinkData LinkTo="Link" LinkCssClass="TextButton" 
runat="server"&amp;gt;&amp;lt;ContentTemplate&amp;gt;&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Oldest&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/ContentTemplate&amp;gt;&amp;lt;/CSControl:CSLinkData&amp;gt;&lt;br&gt;&amp;lt;/LastLinkTemplate&amp;gt;&lt;br&gt;&amp;lt;/CSControl:Pager&amp;gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;Source: &lt;a href="http://getben.com/archive/2007/01/30/introduction-to-chameleon-questions-and-answers.aspx" mce_href="http://getben.com/archive/2007/01/30/introduction-to-chameleon-questions-and-answers.aspx"&gt;http://getben.com/archive/2007/01/30/introduction-to-chameleon-questions-and-answers.aspx &lt;/a&gt;&lt;br&gt;&lt;/p&gt;&lt;img src="http://lunarmedia.com/aggbug.aspx?PostID=124315" width="1" height="1"&gt;</content><author><name>Anders Vindberg</name><uri>http://lunarmedia.com/members/Anders-Vindberg.aspx</uri></author></entry><entry><title>Visual Studio (VS) 2010 Build Configuration dropdown</title><link rel="alternate" type="text/html" href="http://lunarmedia.com/blogs/lunarmedia_blog/archive/2010/04/22/visual-studio-vs-2010-build-configuration-dropdown.aspx" /><id>http://lunarmedia.com/blogs/lunarmedia_blog/archive/2010/04/22/visual-studio-vs-2010-build-configuration-dropdown.aspx</id><published>2010-04-22T14:41:00Z</published><updated>2010-04-22T14:41:00Z</updated><content type="html">&lt;p&gt;If you happen to be missing the Build configuration dropdown menu from your toolbar in Visual Studio 2010 and can't find it in the Build toolbar here is how you add it back in:&lt;/p&gt;&lt;p&gt;Tools -&amp;gt; Customize -&amp;gt; Commands (tab). Select "Toolbar:" and then select "Build" from the dropdown. &lt;/p&gt;&lt;p&gt;Click on "Add Command", select "Build" in Categories and find "Solution Configurations" (at the bottom). Click "Ok" and it is back in the "Build" toolbar!&lt;br&gt;&lt;/p&gt;&lt;img src="http://lunarmedia.com/aggbug.aspx?PostID=123873" width="1" height="1"&gt;</content><author><name>Anders Vindberg</name><uri>http://lunarmedia.com/members/Anders-Vindberg.aspx</uri></author></entry><entry><title>Entity Framework 4.0 RC: Cannot insert the value NULL into column '*_Id', table 'Paragraphs'; column does not allow nulls. INSERT fails. The statement has been terminated.
</title><link rel="alternate" type="text/html" href="http://lunarmedia.com/blogs/lunarmedia_blog/archive/2010/04/08/entity-framework-4-0-rc-cannot-insert-the-value-null-into-column-id-table-paragraphs-column-does-not-allow-nulls-insert-fails-the-statement-has-been-terminated.aspx" /><id>http://lunarmedia.com/blogs/lunarmedia_blog/archive/2010/04/08/entity-framework-4-0-rc-cannot-insert-the-value-null-into-column-id-table-paragraphs-column-does-not-allow-nulls-insert-fails-the-statement-has-been-terminated.aspx</id><published>2010-04-08T12:34:00Z</published><updated>2010-04-08T12:34:00Z</updated><content type="html">&lt;p&gt;Entity Framework 4.0 RC bug. Usually after an "update model from database" I encounter this error message:  Cannot insert the value NULL into column '*_Id', table 'column does not allow nulls. INSERT fails. The statement has been terminated.&lt;/p&gt;&lt;p&gt;To fix the association between the many-to-one relationship (in my case Paragraphs to Translation), you need to edit the .edmx model file and remove StoreGeneratedPattern="Identity" from the Paragraphs node.&lt;/p&gt;&lt;p&gt;See more here: &lt;a href="http://stackoverflow.com/questions/2243618/how-do-you-insert-or-update-many-to-many-tables-in-net-entity-framework/2339834#2339834" mce_href="http://stackoverflow.com/questions/2243618/how-do-you-insert-or-update-many-to-many-tables-in-net-entity-framework/2339834#2339834"&gt;http://stackoverflow.com/questions/2243618/how-do-you-insert-or-update-many-to-many-tables-in-net-entity-framework/2339834#2339834 &lt;/a&gt;&lt;br&gt;&lt;/p&gt;&lt;img src="http://lunarmedia.com/aggbug.aspx?PostID=123836" width="1" height="1"&gt;</content><author><name>Anders Vindberg</name><uri>http://lunarmedia.com/members/Anders-Vindberg.aspx</uri></author></entry><entry><title>LINQ to Entities - Common queries (.Net 4.0)</title><link rel="alternate" type="text/html" href="http://lunarmedia.com/blogs/lunarmedia_blog/archive/2010/03/13/linq-to-entities-common-queries-net-4-0.aspx" /><id>http://lunarmedia.com/blogs/lunarmedia_blog/archive/2010/03/13/linq-to-entities-common-queries-net-4-0.aspx</id><published>2010-03-13T09:08:00Z</published><updated>2010-03-13T09:08:00Z</updated><content type="html">
&lt;h3&gt;T-Sql "WHERE IN":&lt;/h3&gt;&lt;p&gt;&lt;font face="arial"&gt;&lt;font color="#000000"&gt;Sql:&lt;/font&gt;&lt;/font&gt;&lt;br&gt;&lt;/p&gt;&lt;p&gt;&lt;font color="#0000ff" face="Courier New"&gt;SELECT * FROM People &lt;br&gt;WHERE Firstname IN ('Peter', 'Steve', 'John', 'Bruno')&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="arial"&gt;&lt;font color="#000000"&gt;LINQ:&lt;/font&gt;&lt;/font&gt;&lt;br&gt;&lt;/p&gt;&lt;p&gt;&lt;font color="#0000ff"&gt;&lt;font face="Courier New"&gt;var&lt;/font&gt;&lt;/font&gt;&lt;font face="Courier New"&gt; names = &lt;font color="#0000ff"&gt;new&lt;/font&gt; &lt;font color="#0000ff"&gt;string&lt;/font&gt;[] { &lt;font color="#a31515"&gt;"Peter"&lt;/font&gt;, &lt;font color="#a31515"&gt;"Steve"&lt;/font&gt;, &lt;font color="#a31515"&gt;"John"&lt;/font&gt;, &lt;font color="#a31515"&gt;"Bruno"&lt;/font&gt; };&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font color="#0000ff"&gt;&lt;font face="Courier New"&gt;var&lt;/font&gt;&lt;/font&gt;&lt;font face="Courier New"&gt; matches = &lt;font color="#0000ff"&gt;from&lt;/font&gt; person &lt;font color="#0000ff"&gt;in&lt;/font&gt; people &lt;br&gt;&lt;/font&gt;&lt;font face="Courier New"&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#0000ff"&gt;where&lt;/font&gt; names.Contains(person.Firstname) &lt;br&gt;&lt;/font&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#0000ff"&gt;select&lt;/font&gt; person;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;img src="http://lunarmedia.com/aggbug.aspx?PostID=123805" width="1" height="1"&gt;</content><author><name>Anders Vindberg</name><uri>http://lunarmedia.com/members/Anders-Vindberg.aspx</uri></author></entry><entry><title>Encrypting connectionstrings.config in IIS 6.0</title><link rel="alternate" type="text/html" href="http://lunarmedia.com/blogs/lunarmedia_blog/archive/2010/02/09/encrypting-connectionstring-config-in-iis-6-0.aspx" /><id>http://lunarmedia.com/blogs/lunarmedia_blog/archive/2010/02/09/encrypting-connectionstring-config-in-iis-6-0.aspx</id><published>2010-02-09T10:09:00Z</published><updated>2010-02-09T10:09:00Z</updated><content type="html">&lt;p&gt;Simply call these two commands in cmd prompt:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;C:\WINDOWS\microsoft.net\Framework64\v2.0.50727\aspnet_regiis.exe -pef "connectionStrings" C:\MyWebsiteFolder&lt;/li&gt;
&lt;li&gt;C:\WINDOWS\microsoft.net\Framework64\v2.0.50727\aspnet_regiis -pa "NetFrameworkConfigurationKey" "Network Service"&lt;br&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;If you still get a: "&lt;i&gt;Failed
 to decrypt using provider 'RsaProtectedConfigurationProvider'. Error 
message from the provider: The RSA key container could not be opened.&lt;/i&gt;" Then call the second command again but replace "Network Service" with "ASPNET".&lt;/p&gt;
&lt;p&gt;Source: MS Patterns &amp;amp; Practices: &lt;a href="http://msdn.microsoft.com/en-us/library/ms998283.aspx" mce_href="http://msdn.microsoft.com/en-us/library/ms998283.aspx"&gt;http://msdn.microsoft.com/en-us/library/ms998283.aspx&lt;/a&gt;&lt;br&gt;&lt;/p&gt;
&lt;img src="http://lunarmedia.com/aggbug.aspx?PostID=123804" width="1" height="1"&gt;</content><author><name>Anders Vindberg</name><uri>http://lunarmedia.com/members/Anders-Vindberg.aspx</uri></author></entry><entry><title>T-SQL Dynamic Sorting and Order By</title><link rel="alternate" type="text/html" href="http://lunarmedia.com/blogs/lunarmedia_blog/archive/2009/07/15/t-sql-dynamic-sorting-and-order-by.aspx" /><id>http://lunarmedia.com/blogs/lunarmedia_blog/archive/2009/07/15/t-sql-dynamic-sorting-and-order-by.aspx</id><published>2009-07-15T09:14:00Z</published><updated>2009-07-15T09:14:00Z</updated><content type="html">&lt;p&gt;Using the CASE expression its possible to do efficient sorting and ordering by different parameters in one query. Here is an example from &lt;a href="http://gregbeech.com/blogs/tech/archive/2008/07/21/dynamic-sorting-and-paging-in-sql-server-with-the-case-expression.aspx" mce_href="http://gregbeech.com/blogs/tech/archive/2008/07/21/dynamic-sorting-and-paging-in-sql-server-with-the-case-expression.aspx"&gt;Greg Beech's Tech Blog&lt;/a&gt; which also includes paging:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;pre&gt;DECLARE @SortType TINYINT, @SortAscending BIT, @FirstRow INT, @MaxRows INT;&lt;br&gt;SELECT @SortType = 2, @SortAscending = 0, @FirstRow = 10, @MaxRows = 10;&lt;br&gt;&lt;br&gt;WITH FoundCustomers AS&lt;br&gt;(&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SELECT&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ROW_NUMBER() OVER&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ORDER BY &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CASE WHEN @SortType = 0 AND @SortAscending = 1 THEN c.ContactName END ASC&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,CASE WHEN @SortType = 0 AND @SortAscending = 0 THEN c.ContactName END DESC&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,CASE WHEN @SortType = 1 AND @SortAscending = 1 THEN c.CompanyName END ASC&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,CASE WHEN @SortType = 1 AND @SortAscending = 0 THEN c.CompanyName END DESC&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,CASE WHEN @SortType = 2 AND @SortAscending = 1 THEN c.Country END ASC&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,CASE WHEN @SortType = 2 AND @SortAscending = 0 THEN c.Country END DESC&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ) AS RowNumber&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,c.*&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; FROM&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dbo.Customers c&lt;br&gt;)&lt;br&gt;SELECT&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; fc.*&lt;br&gt;FROM&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; FoundCustomers fc&lt;br&gt;WHERE&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; fc.RowNumber BETWEEN @FirstRow AND @FirstRow + @MaxRows - 1&lt;br&gt;ORDER BY&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; fc.RowNumber;&lt;/pre&gt;
&lt;img src="http://lunarmedia.com/aggbug.aspx?PostID=123693" width="1" height="1"&gt;</content><author><name>Anders Vindberg</name><uri>http://lunarmedia.com/members/Anders-Vindberg.aspx</uri></author></entry><entry><title>CSControl:ConditionalContent - a thing to remember!</title><link rel="alternate" type="text/html" href="http://lunarmedia.com/blogs/lunarmedia_blog/archive/2009/05/08/cscontrol-conditionalcontent-a-think-to-remember.aspx" /><id>http://lunarmedia.com/blogs/lunarmedia_blog/archive/2009/05/08/cscontrol-conditionalcontent-a-think-to-remember.aspx</id><published>2009-05-08T16:24:00Z</published><updated>2009-05-08T16:24:00Z</updated><content type="html">&lt;p&gt;When using the ConditionalContent control from CommunityServer, always remember to use the &amp;lt;ContentConditions&amp;gt; tag when detailing the condition. Hmm that sounds obvious. No, its not. The control also has the DisplayCondition tag which is what we commonly use for other controls! Here is an example of correct usage: &lt;br&gt;&lt;/p&gt;


&lt;pre&gt;&amp;lt;CSControl:ConditionalContent runat="server"&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&lt;br&gt;&amp;lt;ContentConditions&amp;gt;&amp;lt;CSControl:QueryStringPropertyValueComparison&lt;br&gt;QueryStringProperty="condition" Operator="EqualTo"&lt;br&gt;ComparisonValue="true" runat="server" /&amp;gt;&amp;lt;/ContentConditions&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;lt;TrueContentTemplate&amp;gt;It's true!&amp;lt;/TrueContentTemplate&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;lt;FalseContentTemplate&amp;gt;It's false!&amp;lt;/FalseContentTemplate&amp;gt;&lt;br&gt;&amp;lt;/CSControl:ConditionalContent&amp;gt;&lt;/pre&gt;
&lt;p&gt;Ahh that was good. &lt;br&gt;&lt;/p&gt;
&lt;img src="http://lunarmedia.com/aggbug.aspx?PostID=123692" width="1" height="1"&gt;</content><author><name>Anders Vindberg</name><uri>http://lunarmedia.com/members/Anders-Vindberg.aspx</uri></author></entry><entry><title>301 Redirect</title><link rel="alternate" type="text/html" href="http://lunarmedia.com/blogs/lunarmedia_blog/archive/2009/03/03/301-redirect.aspx" /><id>http://lunarmedia.com/blogs/lunarmedia_blog/archive/2009/03/03/301-redirect.aspx</id><published>2009-03-03T13:50:00Z</published><updated>2009-03-03T13:50:00Z</updated><content type="html">
&lt;p&gt;I always forget this particular code and spend time finding it again and again: This is for redirecting call to the root domain in Community Server to the /forums/ folder. I usually create a blank aspx page that does the redirect - otherwise the page will load (which may be several 20-30 kb before directing). In SiteUrls_override.config you can set the "home" location name to the redirect file.&lt;br&gt;&lt;/p&gt;
&lt;pre&gt;&amp;lt;%@ Page %&amp;gt;&lt;br&gt;&amp;lt;%@ Import Namespace="System.Web" %&amp;gt;&lt;br&gt;&lt;br&gt;&amp;lt;script language="C#" runat="server"&amp;gt;&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; protected override void OnInit(EventArgs e)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; System.Web.HttpContext context = System.Web.HttpContext.Current;&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; context.Response.Status = "301 Moved Permanently";&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; context.Response.AddHeader("Location", "/forums/");&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br&gt;&amp;lt;/script&amp;gt;&lt;/pre&gt;
&lt;img src="http://lunarmedia.com/aggbug.aspx?PostID=123614" width="1" height="1"&gt;</content><author><name>Anders Vindberg</name><uri>http://lunarmedia.com/members/Anders-Vindberg.aspx</uri></author></entry><entry><title>OpenSocial API for CSharp</title><link rel="alternate" type="text/html" href="http://lunarmedia.com/blogs/lunarmedia_blog/archive/2009/02/27/opensocial-api-for-csharp.aspx" /><id>http://lunarmedia.com/blogs/lunarmedia_blog/archive/2009/02/27/opensocial-api-for-csharp.aspx</id><published>2009-02-27T14:21:00Z</published><updated>2009-02-27T14:21:00Z</updated><content type="html">&lt;p&gt;Im currently looking for an OpenSocial API for the dotnet (.net) platform preferably written in csharp (C#). There are already APIs for PHP, Ruby, and other open source frameworks - where is the .net version?&lt;/p&gt;&lt;p&gt;It seems that the OpenSocial movement is less active in the proprietary world which for our sake (im part of it) is unfortunate. I believe the advent of OpenSocial will heavily be reflected in the future of the web.&lt;br&gt;&lt;/p&gt;&lt;img src="http://lunarmedia.com/aggbug.aspx?PostID=123605" width="1" height="1"&gt;</content><author><name>Anders Vindberg</name><uri>http://lunarmedia.com/members/Anders-Vindberg.aspx</uri></author></entry><entry><title>Enable/Disable "Question &amp; Answers"</title><link rel="alternate" type="text/html" href="http://lunarmedia.com/blogs/lunarmedia_blog/archive/2009/02/19/enable-disable-quot-question-amp-answers-quot.aspx" /><id>http://lunarmedia.com/blogs/lunarmedia_blog/archive/2009/02/19/enable-disable-quot-question-amp-answers-quot.aspx</id><published>2009-02-19T12:15:00Z</published><updated>2009-02-19T12:15:00Z</updated><content type="html">
&lt;p&gt;In CS 2008.5 its possible to post a forum topic that is a "Question" or a "Discussion". In order to enable this you need to check two places in the Controlpanel.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;In Forum Administration - Configuration - Global Forum Settings&lt;/li&gt;
&lt;ol&gt;
&lt;li&gt;Set "Enable Thread Status Tracking" to Yes&lt;/li&gt;
&lt;/ol&gt;
&lt;li&gt;In Forums and Groups - Forums&lt;/li&gt;
&lt;ol&gt;
&lt;li&gt;Select to "Edit" the particular forum - in "Allowed Thread Types" check "Questions and Answers".&lt;/li&gt;
&lt;/ol&gt;
&lt;/ol&gt;
&lt;p&gt;
And you are done!&lt;/p&gt;&lt;img src="http://lunarmedia.com/aggbug.aspx?PostID=123583" width="1" height="1"&gt;</content><author><name>Anders Vindberg</name><uri>http://lunarmedia.com/members/Anders-Vindberg.aspx</uri></author></entry><entry><title>CustomCondition in Community Server</title><link rel="alternate" type="text/html" href="http://lunarmedia.com/blogs/lunarmedia_blog/archive/2009/02/19/customcondition-in-community-server.aspx" /><id>http://lunarmedia.com/blogs/lunarmedia_blog/archive/2009/02/19/customcondition-in-community-server.aspx</id><published>2009-02-19T09:40:00Z</published><updated>2009-02-19T09:40:00Z</updated><content type="html">&lt;p&gt;Often I find situations where I need to do a customized condition comparision. To enable this, Telligent have added the following chameleon control:&lt;br&gt;&lt;/p&gt;
&lt;pre&gt;&amp;lt;CSControl:CustomCondition runat="server" CustomResult='&amp;lt;%# ((CommunityServer.Discussions.Components.Forum) ForumControlUtility.Instance().GetCurrentForum(Container)).SectionID == ForumControlUtility.Instance().GetCurrentThread(this.Page).SectionID %&amp;gt;'&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;/&amp;gt;&lt;/pre&gt;
&lt;p&gt;In this example I check the sectionId of the current forum (eg. in a dropdown list populated with all the forums) and the forum in which the thread im viewing is in.&lt;br&gt;&lt;/p&gt;
&lt;img src="http://lunarmedia.com/aggbug.aspx?PostID=123582" width="1" height="1"&gt;</content><author><name>Anders Vindberg</name><uri>http://lunarmedia.com/members/Anders-Vindberg.aspx</uri></author></entry><entry><title>Website Performance Optimization</title><link rel="alternate" type="text/html" href="http://lunarmedia.com/blogs/lunarmedia_blog/archive/2009/01/29/website-performance-optimization.aspx" /><id>http://lunarmedia.com/blogs/lunarmedia_blog/archive/2009/01/29/website-performance-optimization.aspx</id><published>2009-01-29T13:15:00Z</published><updated>2009-01-29T13:15:00Z</updated><content type="html">&lt;p&gt;Today I implemented some of the &lt;a href="http://developer.yahoo.com/performance/rules.html" mce_href="http://developer.yahoo.com/performance/rules.html"&gt;best practice guidelines&lt;/a&gt; for speeding up websites. It has resulted in significant improved load times on the &lt;a href="http://subscene.com" mce_href="http://subscene.com"&gt;subtitle website&lt;/a&gt; Subscene. Although all "rules" as specified by Yahoo has not been implemented yet it has already decreased load times to the half. For future developments all guidelines will be followed, first implemented in the new &lt;a href="http://lingbay.com" mce_href="http://lingbay.com"&gt;translator markedplace&lt;/a&gt; Lingbay.&lt;/p&gt;&lt;p&gt;Scott Hanselman has a post about &lt;a href="http://www.hanselman.com/blog/ForcingAnUpdateOfACachedJavaScriptFileInIIS.aspx" mce_href="http://www.hanselman.com/blog/ForcingAnUpdateOfACachedJavaScriptFileInIIS.aspx"&gt;enabling proxy caching in IIS&lt;/a&gt;. &lt;br&gt;&lt;/p&gt;&lt;img src="http://lunarmedia.com/aggbug.aspx?PostID=123545" width="1" height="1"&gt;</content><author><name>Anders Vindberg</name><uri>http://lunarmedia.com/members/Anders-Vindberg.aspx</uri></author></entry><entry><title>Lingbay - A Marketplace for Linguistic Jobs</title><link rel="alternate" type="text/html" href="http://lunarmedia.com/blogs/lunarmedia_blog/archive/2009/01/21/lingbay-a-marketplace-for-linguistic-jobs.aspx" /><id>http://lunarmedia.com/blogs/lunarmedia_blog/archive/2009/01/21/lingbay-a-marketplace-for-linguistic-jobs.aspx</id><published>2009-01-21T13:28:00Z</published><updated>2009-01-21T13:28:00Z</updated><content type="html">&lt;p&gt;
The new &lt;a href="http://lingbay.com" mce_href="http://lingbay.com"&gt;marketplace for linguistic jobs&lt;/a&gt; (Lingbay) is nearing completion. Expected launch is around April this year. If you want to be notified when we go live &lt;a href="http://lingbay.com" mce_href="http://lingbay.com"&gt;sign-up today&lt;/a&gt;!
&lt;/p&gt;
&lt;p&gt;About Lingbay:&lt;/p&gt;
&lt;p&gt;&lt;i&gt;Lingbay is an auction-house for linguistic related jobs, including translations, proofreadings, and transcriptions. 
	As a freelance translator you bid on linguistic jobs and are paid the agreed amount after completion.
	As an outsourcer or employer you receive competitive quotes on jobs directly from the translator.&lt;/i&gt;&lt;br&gt;
&lt;/p&gt;
&lt;p&gt;For a successful launch the procedure is as follows:&lt;/p&gt;
&lt;ol class="list"&gt;
&lt;li&gt;Collect a email-list of interested parties (active)&lt;br&gt;&lt;/li&gt;
&lt;li&gt;Gather a registered list of translators, linguistic professionals, and students&lt;/li&gt;
&lt;li&gt;Launch a working beta version with active linguistic jobs&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
In addition to the listed procedure, a large ad-campaign will run as &lt;a href="http://lingbay.com" mce_href="http://lingbay.com"&gt;Lingbay&lt;/a&gt; is launched. A website like &lt;a href="http://lingbay.com" mce_href="http://lingbay.com"&gt;Lingbay&lt;/a&gt;
requires a critical mass the be meet in order for the marketplace to
function. First, a group of freelance translators needs to be ready to
complete linguistic jobs within a certain period. Secondly, a continous
flow of new jobs are needed to keep the marketplace active. The
strategy employed is designed to fulfill that purpose.&lt;/p&gt;&lt;img src="http://lunarmedia.com/aggbug.aspx?PostID=123544" width="1" height="1"&gt;</content><author><name>Anders Vindberg</name><uri>http://lunarmedia.com/members/Anders-Vindberg.aspx</uri></author></entry><entry><title>How to Add Extended Properties</title><link rel="alternate" type="text/html" href="http://lunarmedia.com/blogs/lunarmedia_blog/archive/2009/01/19/how-to-add-extended-properties.aspx" /><id>http://lunarmedia.com/blogs/lunarmedia_blog/archive/2009/01/19/how-to-add-extended-properties.aspx</id><published>2009-01-19T15:48:00Z</published><updated>2009-01-19T15:48:00Z</updated><content type="html">&lt;p&gt;In Community Server its easy to add extended properties to the user profile without having to write any code:&lt;/p&gt;

&lt;p&gt;To your CommunityServer.config file, add&lt;/p&gt;
&lt;pre&gt;&amp;lt;ExtendedUserData&amp;gt;&lt;br&gt;&amp;nbsp; &amp;lt;add name="EXTENDED ATTRIBUTE NAME" /&amp;gt;&lt;br&gt;&amp;lt;/ExtendedUserData&amp;gt;&lt;/pre&gt;

&lt;p&gt;Then on your theme pages:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;User Register (/themes/YOURTHEME/user/createuser.aspx)&lt;/li&gt;

&lt;li&gt;Edit Profile (/themes/YOURTHEME/user/edituser.aspx)&lt;/li&gt;

&lt;li&gt;Edit User page in Membership Administration in Control Panel (/ControlPanel/Membership/UserEdit.aspx)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;add the following input field:&lt;/p&gt;

&lt;pre&gt;&amp;lt;asp:TextBox id="EXTENDED ATTRIBUTE NAME" runat="server" /&amp;gt;&lt;/pre&gt;

&lt;p&gt;That's it!&lt;/p&gt;&lt;img src="http://lunarmedia.com/aggbug.aspx?PostID=123543" width="1" height="1"&gt;</content><author><name>Anders Vindberg</name><uri>http://lunarmedia.com/members/Anders-Vindberg.aspx</uri></author></entry><entry><title>Retrieve Extendedproperties Via SQL</title><link rel="alternate" type="text/html" href="http://lunarmedia.com/blogs/lunarmedia_blog/archive/2009/01/19/retrieve-extendedproperties-via-sql.aspx" /><id>http://lunarmedia.com/blogs/lunarmedia_blog/archive/2009/01/19/retrieve-extendedproperties-via-sql.aspx</id><published>2009-01-19T15:37:00Z</published><updated>2009-01-19T15:37:00Z</updated><content type="html">&lt;p&gt;In Community Server, dynamic user fields are saved in extended properties. In order to retrieve them in Sql add the following function:&lt;/p&gt;

&lt;pre&gt;/*------------------------------------------------------------------------------&lt;br&gt;// &amp;lt;copyright company="Telligent Systems"&amp;gt;&lt;br&gt;//     Copyright (c) Telligent Systems Corporation.  All rights reserved.&lt;br&gt;// &amp;lt;/copyright&amp;gt; &lt;br&gt;------------------------------------------------------------------------------*/&lt;br&gt;&lt;br&gt;CREATE  function [dbo].[FetchExtendendAttributeValue] (&lt;br&gt;	@Key nvarchar(4000), &lt;br&gt;	@Keys nvarchar(4000), &lt;br&gt;	@Values nvarchar(4000)&lt;br&gt;)&lt;br&gt;&lt;br&gt;/*&lt;br&gt;CS uses ExtendedAttributes to allow metadata about a post, user, or section to be stored&lt;br&gt;in a special ':' delimited format. This enables storing metadata without adding new columns&lt;br&gt;to any tables, changing sprocs, etc. &lt;br&gt;&lt;br&gt;However, any data stored in this format is not easily queryable (so use it wisely :)&lt;br&gt;&lt;br&gt;Occassionaly, you may want to query against this data. This function should make that task simple!&lt;br&gt;&lt;br&gt;Keys are stored in this format: string:S:Int:Int = Key + :S : Starting Location : Length : &lt;br&gt;&lt;br&gt;An example: 'Theme:S:0:7:dummyTotalPosts:S:7:1:BannedUntil:S:8:21:UserBanReason:S:29:5:'&lt;br&gt;&lt;br&gt;Values are stored in a single string with no spaces between them.&lt;br&gt;An example: 'default04/20/2005 12:16:41 AMOther'&lt;br&gt;&lt;br&gt;Theme starts a 0 and continues for 7 characters (default)&lt;br&gt;dummyTotalPosts starts at 7 and coninutes for 1 character (0)&lt;br&gt;BannedUntil starts at 8 and continues for 21 characters (4/20/2005 12:16:41 AM)&lt;br&gt;*/&lt;br&gt;&lt;br&gt;RETURNS nvarchar(4000)&lt;br&gt;AS&lt;br&gt;BEGIN&lt;br&gt;DECLARE @Value nvarchar(4000)&lt;br&gt;Declare @CharIndex int&lt;br&gt;Declare @StartIndex int&lt;br&gt;Declare @Len int&lt;br&gt;&lt;br&gt;--Find the index of the key&lt;br&gt;Set @CharIndex = CHARINDEX(@Key + ':s',@Keys)&lt;br&gt;&lt;br&gt;--If the key does not exist, return NULL&lt;br&gt;if(@CharIndex = 0)&lt;br&gt;RETURN NULL&lt;br&gt;&lt;br&gt;--If the key is not the first, remove any leading keys&lt;br&gt;if(@CharIndex &amp;gt; 1)&lt;br&gt;Begin&lt;br&gt;  Set @Keys = Stuff(@Keys,1,@CharIndex-1,'')&lt;br&gt;End&lt;br&gt;&lt;br&gt;--Remove the Key from the keys list. This will &lt;br&gt;Set @Keys = Stuff(@Keys,1,Len(@Key+':S:'),'')&lt;br&gt;&lt;br&gt;--Find the location of the : after the starting location&lt;br&gt;Set @CharIndex = CHARINDEX(':',@Keys)&lt;br&gt;&lt;br&gt;--Grab the starting location&lt;br&gt;Set @StartIndex = SUBSTRING(@Keys,1,@CharIndex-1)&lt;br&gt;&lt;br&gt;--Remove the starting location from the Keys&lt;br&gt;Set @Keys = Stuff(@Keys,1,@CharIndex,'')&lt;br&gt;&lt;br&gt;--Find the lenght value's index&lt;br&gt;Set @CharIndex = CHARINDEX(':',@Keys)&lt;br&gt;&lt;br&gt;--Find the lenghth value&lt;br&gt;Set @Len = SUBSTRING(@Keys,1,@CharIndex-1)&lt;br&gt;&lt;br&gt;--Get the value from the values string&lt;br&gt;Set @Value = SUBSTRING(@Values,@StartIndex+1,@Len)&lt;br&gt;&lt;br&gt;&lt;br&gt;RETURN @Value&lt;br&gt;END&lt;/pre&gt;
&lt;p&gt;Source: &lt;a href="http://code.communityserver.org/Default.aspx?path=CS+Tree%5CSampleCode%5CSQL%5CFetchExtendendAttributeValue.sql" mce_href="http://code.communityserver.org/Default.aspx?path=CS+Tree\SampleCode\SQL\FetchExtendendAttributeValue.sql"&gt;http://code.communityserver.org...&lt;/a&gt;&lt;br&gt;&lt;/p&gt;&lt;img src="http://lunarmedia.com/aggbug.aspx?PostID=123542" width="1" height="1"&gt;</content><author><name>Anders Vindberg</name><uri>http://lunarmedia.com/members/Anders-Vindberg.aspx</uri></author></entry></feed>