<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://lunarmedia.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Lunarmedia</title><link>http://lunarmedia.com/blogs/</link><description>An eye on earth</description><dc:language>en-US</dc:language><generator>CommunityServer 2007 (Build: 20416.853)</generator><item><title>Web Deploy: (401) Unauthorized</title><link>http://lunarmedia.com/blogs/lunarmedia_blog/archive/2012/01/17/web-deploy-401-unauthorized.aspx</link><pubDate>Tue, 17 Jan 2012 12:20:00 GMT</pubDate><guid isPermaLink="false">8e740287-7179-42ca-83bf-5c4af18dab29:124429</guid><dc:creator>Anders Vindberg</dc:creator><slash:comments>6</slash:comments><description>&lt;p&gt;If you are getting the 401 Unauthorized error from Visual Studio when trying to use Web Deploy, then (because of a Bug in Web Deploy (also version 2)) add this to your regedit:&lt;/p&gt;&lt;p&gt;at HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System &lt;/p&gt;&lt;p&gt;add DWORD: LocalAccountTokenFilterPolicy with value: 1.&lt;/p&gt;&lt;p&gt;Now you can use a windows user that is a member of your admin group (not the native admin) to deploy your content! &lt;br&gt;&lt;/p&gt;&lt;img src="http://lunarmedia.com/aggbug.aspx?PostID=124429" width="1" height="1"&gt;</description></item><item><title>IIS6: The service did not respond to the start or control request in a timely fashion</title><link>http://lunarmedia.com/blogs/lunarmedia_blog/archive/2011/11/25/iis6-the-service-did-not-respond-to-the-start-or-control-request-in-a-timely-fashion.aspx</link><pubDate>Fri, 25 Nov 2011 19:14:00 GMT</pubDate><guid isPermaLink="false">8e740287-7179-42ca-83bf-5c4af18dab29:124419</guid><dc:creator>Anders Vindberg</dc:creator><slash:comments>0</slash:comments><description>
&lt;p&gt;After a Windows Update on our Win2003 server, we suddently received this message when trying to stop or start an app pool or website.&lt;/p&gt;
&lt;p&gt;For our particular situation I found the answer on &lt;a href="http://www.jesswatts.com/it/iis-the-service-did-not-respond-to-the-start-or-control-request-in-a-timely-fashion" mce_href="http://www.jesswatts.com/it/iis-the-service-did-not-respond-to-the-start-or-control-request-in-a-timely-fashion"&gt;JessWatts.com&lt;/a&gt;:&lt;/p&gt;
&lt;p&gt;"&lt;i&gt;It is possible that a shared dll that IIS 6 relies on has become unregistered.&lt;br&gt;
Try running the following command: regsvr32 qmgr.dll&lt;br&gt;
Then reboot the server and start the failed websites.&lt;/i&gt;" &lt;/p&gt;
&lt;p&gt;Thanks Jess! &lt;br&gt;&lt;/p&gt;
&lt;img src="http://lunarmedia.com/aggbug.aspx?PostID=124419" width="1" height="1"&gt;</description></item><item><title>Solr delete/clear index</title><link>http://lunarmedia.com/blogs/lunarmedia_blog/archive/2011/10/19/solr-delete-clear-index.aspx</link><pubDate>Wed, 19 Oct 2011 06:13:00 GMT</pubDate><guid isPermaLink="false">8e740287-7179-42ca-83bf-5c4af18dab29:124418</guid><dc:creator>Anders Vindberg</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;To delete/clear the solr index.&lt;br&gt;&lt;br&gt;Simply run both of these in the browser (change the "solr" name and port to your specific solr instance name if the default wasn't used):&lt;br&gt;&lt;br&gt;1. http://localhost:8080/solr/update?stream.body=%3Cdelete%3E%3Cquery%3E*:*%3C/query%3E%3C/delete%3E&lt;br&gt;2. http://localhost:8080/solr/update?stream.body=%3Ccommit/%3E&lt;/p&gt;&lt;img src="http://lunarmedia.com/aggbug.aspx?PostID=124418" width="1" height="1"&gt;</description></item><item><title>Performance with Entity Framework</title><link>http://lunarmedia.com/blogs/lunarmedia_blog/archive/2011/09/23/performance-with-entity-framework.aspx</link><pubDate>Thu, 22 Sep 2011 20:22:00 GMT</pubDate><guid isPermaLink="false">8e740287-7179-42ca-83bf-5c4af18dab29:124417</guid><dc:creator>Anders Vindberg</dc:creator><slash:comments>0</slash:comments><description>
&lt;p&gt;&amp;nbsp;Here are some links to great resources if you are looking to build high-performance enterprise website solutions:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://www.asp.net/entity-framework/tutorials/maximizing-performance-with-the-entity-framework-in-an-asp-net-web-application" mce_href="http://www.asp.net/entity-framework/tutorials/maximizing-performance-with-the-entity-framework-in-an-asp-net-web-application"&gt;http://www.asp.net/entity-framework/tutorials/maximizing-performance-with-the-entity-framework-in-an-asp-net-web-application&amp;nbsp;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://blogs.msdn.com/b/adonet/archive/2011/01/27/using-dbcontext-in-ef-feature-ctp5-part-1-introduction-and-model.aspx" mce_href="http://blogs.msdn.com/b/adonet/archive/2011/01/27/using-dbcontext-in-ef-feature-ctp5-part-1-introduction-and-model.aspx"&gt;http://blogs.msdn.com/b/adonet/archive/2011/01/27/using-dbcontext-in-ef-feature-ctp5-part-1-introduction-and-model.aspx&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
Microsoft is moving fast these days. The entity framework is getting more functionality and structure as it progresses. It seems to be implementing several best practice patterns such as repository and unit of work patterns among others.&lt;/p&gt;&lt;img src="http://lunarmedia.com/aggbug.aspx?PostID=124417" width="1" height="1"&gt;</description></item><item><title>Sql Profiler - Analyzing number of database calls</title><link>http://lunarmedia.com/blogs/lunarmedia_blog/archive/2011/01/20/sql-profiler-analyzing-number-of-database-calls.aspx</link><pubDate>Thu, 20 Jan 2011 13:33:00 GMT</pubDate><guid isPermaLink="false">8e740287-7179-42ca-83bf-5c4af18dab29:124416</guid><dc:creator>Anders Vindberg</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Is your pageload taking more than 0.2 seconds! its time to investigate how many database roundtrips your webapplication is making. If you haven't got Sql Profiler (with MS Sql Server) go download AnjLab Sql Profiler its free.
&lt;/p&gt;&lt;p&gt;
To identify database roundtrips from an application, Setup the following events:
&lt;/p&gt;&lt;p&gt;
RPC:Completed
SQL:BatchCompleted
&lt;/p&gt;&lt;p&gt;
And this filter:
TextData Not Like exec sp_reset_connection%
&lt;/p&gt;&lt;p&gt;
Source: Jeremy Jameson - http://blogs.msdn.com/b/jjameson/archive/2010/09/03/analyzing-database-roundtrips-with-sql-server-profiler.aspx
&lt;/p&gt;&lt;img src="http://lunarmedia.com/aggbug.aspx?PostID=124416" width="1" height="1"&gt;</description></item><item><title>IIS Application Pool Queue Length Settings</title><link>http://lunarmedia.com/blogs/lunarmedia_blog/archive/2010/12/06/iis-application-pool-queue-lenght-settings.aspx</link><pubDate>Mon, 06 Dec 2010 13:16:00 GMT</pubDate><guid isPermaLink="false">8e740287-7179-42ca-83bf-5c4af18dab29:124415</guid><dc:creator>Anders Vindberg</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;This is hard to find information:
&lt;/p&gt;&lt;p&gt;The default limit for an application pool is 4000 requests. On a moderately sized server with a few application pools configured, this might be a good value. However, on a server with multiple CPUs and lots of RAM, this value might be too low. On a server with limited resources or many application pools configured, this value might be too high. Here you might want to use a formula of Memory Size in Megabytes x Number of CPUs x 10 divided by Number of Configured Application Pools to determine what the size of the average request queue should be. This is meant to be a guideline to give you a starting point for consideration and not an absolute rule. For example, on a server with two CPUs, 1024 MB of RAM, and twenty configured application pools, the size of the average request queue limit would be around 1,000 requests. You might have some application pools configured with request queue limits of 750 and others with request queue limits of 1,250. However, if the same server had only one configured application pool, you probably wouldn’t configure a request queue limit of 10,000. 
&lt;/p&gt;
&lt;p&gt;
Source: http://forums.asp.net/p/623323/623323.aspx (Matthew, Microsoft).&lt;/p&gt;&lt;img src="http://lunarmedia.com/aggbug.aspx?PostID=124415" width="1" height="1"&gt;</description></item><item><title>Dealing with TC/CS DateFormats</title><link>http://lunarmedia.com/blogs/lunarmedia_blog/archive/2010/11/02/dealing-with-tc-cs-dateformats.aspx</link><pubDate>Tue, 02 Nov 2010 15:53:00 GMT</pubDate><guid isPermaLink="false">8e740287-7179-42ca-83bf-5c4af18dab29:124414</guid><dc:creator>Anders Vindberg</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;
Defining a specific date format in TC (and CS (Community Server)) can be tricky. An example could be: "30 september, 2003" or "01-01-2010". &lt;br&gt;&lt;br&gt;First you need to know that all the users you may have registered in your database will not be affected by changes made to the default date format defined in the controlpanel. They each need to select a new date format in their profile settings to get a new date format.&lt;br&gt;&lt;br&gt;Working with a new TC website you should define the preferred date format before any users are registered:&lt;br&gt;
&lt;/p&gt;&lt;ol&gt;
&lt;li&gt;Search for "Utility_DateFormatDropDownList_F1" in your language files located in the "languages" folder.&lt;/li&gt;
&lt;li&gt;Edit one or more of the defined date formats if your preferred format is not already defined. Reset the application pool (iisreset).&lt;br&gt;&lt;/li&gt;
&lt;li&gt;Goto yourwebsite.com/controlpanel/Settings/Setup.aspx and select the preferred date format. Press "Save".&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;From this time forward new users will be preselected to use the date format selected. They can still at any time goto their profile settings to select a different format from the dropdown list unless you simply remove this from the template :).&lt;/p&gt;
&lt;p&gt;The defaultDate defined in the web.config file can be disregarded.&lt;/p&gt;&lt;img src="http://lunarmedia.com/aggbug.aspx?PostID=124414" width="1" height="1"&gt;</description></item><item><title>Scandinavian letters (ÆØÅ) in javascript formatting!</title><link>http://lunarmedia.com/blogs/lunarmedia_blog/archive/2010/09/09/scandinavian-letters-198-216-197-in-javascript-formatting.aspx</link><pubDate>Thu, 09 Sep 2010 07:53:00 GMT</pubDate><guid isPermaLink="false">8e740287-7179-42ca-83bf-5c4af18dab29:124413</guid><dc:creator>Anders Vindberg</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;For future reference I am writing this post: ÆØÅ in JavaScript - simply save .js file as UTF-8 formatting! On how to save in UTF-8 encoding in Visual Studio 2010 see this answer: &lt;a href="http://stackoverflow.com/questions/2268037/visual-studio-2010-and-utf-8-encoding/4955304#4955304"&gt;UTF-8 Encoding&lt;/a&gt; at Stackoverflow. &lt;/p&gt;
&lt;img src="http://lunarmedia.com/aggbug.aspx?PostID=124413" width="1" height="1"&gt;</description></item><item><title>TC 5.5 Localization</title><link>http://lunarmedia.com/blogs/lunarmedia_blog/archive/2010/08/12/tc-5-5-localization.aspx</link><pubDate>Thu, 12 Aug 2010 12:33:00 GMT</pubDate><guid isPermaLink="false">8e740287-7179-42ca-83bf-5c4af18dab29:124316</guid><dc:creator>Anders Vindberg</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Everything in Telligent Community is becoming increasingly complex. A simple feature as localization has once again been filtered into the database. Its important to know if you are translating TC into a none-english language that profile field names and profile widget headlines are located in controlpanel (Membership) and not in the language files where they belong! &lt;/p&gt;&lt;p&gt;UPDATE: The widget headlines can be defined in codebehind and thus reference the language files. The profile fields can also reference the language file if defined in the theme.config file! Adding them adhoc is still an issue. &lt;br&gt;&lt;/p&gt;&lt;img src="http://lunarmedia.com/aggbug.aspx?PostID=124316" width="1" height="1"&gt;</description></item><item><title>CSControl:Pager Template Styling</title><link>http://lunarmedia.com/blogs/lunarmedia_blog/archive/2010/07/28/cscontrol-pager-template-styling.aspx</link><pubDate>Wed, 28 Jul 2010 07:44:00 GMT</pubDate><guid isPermaLink="false">8e740287-7179-42ca-83bf-5c4af18dab29:124315</guid><dc:creator>Anders Vindberg</dc:creator><slash:comments>0</slash:comments><description>&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;</description></item><item><title>Visual Studio (VS) 2010 Build Configuration dropdown</title><link>http://lunarmedia.com/blogs/lunarmedia_blog/archive/2010/04/22/visual-studio-vs-2010-build-configuration-dropdown.aspx</link><pubDate>Thu, 22 Apr 2010 14:41:00 GMT</pubDate><guid isPermaLink="false">8e740287-7179-42ca-83bf-5c4af18dab29:123873</guid><dc:creator>Anders Vindberg</dc:creator><slash:comments>0</slash:comments><description>&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;</description></item><item><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>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</link><pubDate>Thu, 08 Apr 2010 12:34:00 GMT</pubDate><guid isPermaLink="false">8e740287-7179-42ca-83bf-5c4af18dab29:123836</guid><dc:creator>Anders Vindberg</dc:creator><slash:comments>0</slash:comments><description>&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;</description></item><item><title>LINQ to Entities - Common queries (.Net 4.0)</title><link>http://lunarmedia.com/blogs/lunarmedia_blog/archive/2010/03/13/linq-to-entities-common-queries-net-4-0.aspx</link><pubDate>Sat, 13 Mar 2010 09:08:00 GMT</pubDate><guid isPermaLink="false">8e740287-7179-42ca-83bf-5c4af18dab29:123805</guid><dc:creator>Anders Vindberg</dc:creator><slash:comments>0</slash:comments><description>
&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;</description></item><item><title>Encrypting connectionstrings.config in IIS 6.0</title><link>http://lunarmedia.com/blogs/lunarmedia_blog/archive/2010/02/09/encrypting-connectionstring-config-in-iis-6-0.aspx</link><pubDate>Tue, 09 Feb 2010 10:09:00 GMT</pubDate><guid isPermaLink="false">8e740287-7179-42ca-83bf-5c4af18dab29:123804</guid><dc:creator>Anders Vindberg</dc:creator><slash:comments>0</slash:comments><description>&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;</description></item><item><title>T-SQL Dynamic Sorting and Order By</title><link>http://lunarmedia.com/blogs/lunarmedia_blog/archive/2009/07/15/t-sql-dynamic-sorting-and-order-by.aspx</link><pubDate>Wed, 15 Jul 2009 09:14:00 GMT</pubDate><guid isPermaLink="false">8e740287-7179-42ca-83bf-5c4af18dab29:123693</guid><dc:creator>Anders Vindberg</dc:creator><slash:comments>0</slash:comments><description>&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;</description></item><item><title>CSControl:ConditionalContent - a thing to remember!</title><link>http://lunarmedia.com/blogs/lunarmedia_blog/archive/2009/05/08/cscontrol-conditionalcontent-a-think-to-remember.aspx</link><pubDate>Fri, 08 May 2009 16:24:00 GMT</pubDate><guid isPermaLink="false">8e740287-7179-42ca-83bf-5c4af18dab29:123692</guid><dc:creator>Anders Vindberg</dc:creator><slash:comments>0</slash:comments><description>&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;</description></item><item><title>301 Redirect</title><link>http://lunarmedia.com/blogs/lunarmedia_blog/archive/2009/03/03/301-redirect.aspx</link><pubDate>Tue, 03 Mar 2009 13:50:00 GMT</pubDate><guid isPermaLink="false">8e740287-7179-42ca-83bf-5c4af18dab29:123614</guid><dc:creator>Anders Vindberg</dc:creator><slash:comments>0</slash:comments><description>
&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;</description></item><item><title>OpenSocial API for CSharp</title><link>http://lunarmedia.com/blogs/lunarmedia_blog/archive/2009/02/27/opensocial-api-for-csharp.aspx</link><pubDate>Fri, 27 Feb 2009 14:21:00 GMT</pubDate><guid isPermaLink="false">8e740287-7179-42ca-83bf-5c4af18dab29:123605</guid><dc:creator>Anders Vindberg</dc:creator><slash:comments>0</slash:comments><description>&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;</description></item><item><title>Enable/Disable "Question &amp; Answers"</title><link>http://lunarmedia.com/blogs/lunarmedia_blog/archive/2009/02/19/enable-disable-quot-question-amp-answers-quot.aspx</link><pubDate>Thu, 19 Feb 2009 12:15:00 GMT</pubDate><guid isPermaLink="false">8e740287-7179-42ca-83bf-5c4af18dab29:123583</guid><dc:creator>Anders Vindberg</dc:creator><slash:comments>0</slash:comments><description>
&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;</description></item><item><title>CustomCondition in Community Server</title><link>http://lunarmedia.com/blogs/lunarmedia_blog/archive/2009/02/19/customcondition-in-community-server.aspx</link><pubDate>Thu, 19 Feb 2009 09:40:00 GMT</pubDate><guid isPermaLink="false">8e740287-7179-42ca-83bf-5c4af18dab29:123582</guid><dc:creator>Anders Vindberg</dc:creator><slash:comments>0</slash:comments><description>&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;</description></item><item><title>Website Performance Optimization</title><link>http://lunarmedia.com/blogs/lunarmedia_blog/archive/2009/01/29/website-performance-optimization.aspx</link><pubDate>Thu, 29 Jan 2009 13:15:00 GMT</pubDate><guid isPermaLink="false">8e740287-7179-42ca-83bf-5c4af18dab29:123545</guid><dc:creator>Anders Vindberg</dc:creator><slash:comments>0</slash:comments><description>&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;</description></item><item><title>Lingbay - A Marketplace for Linguistic Jobs</title><link>http://lunarmedia.com/blogs/lunarmedia_blog/archive/2009/01/21/lingbay-a-marketplace-for-linguistic-jobs.aspx</link><pubDate>Wed, 21 Jan 2009 13:28:00 GMT</pubDate><guid isPermaLink="false">8e740287-7179-42ca-83bf-5c4af18dab29:123544</guid><dc:creator>Anders Vindberg</dc:creator><slash:comments>0</slash:comments><description>&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;</description></item><item><title>How to Add Extended Properties</title><link>http://lunarmedia.com/blogs/lunarmedia_blog/archive/2009/01/19/how-to-add-extended-properties.aspx</link><pubDate>Mon, 19 Jan 2009 15:48:00 GMT</pubDate><guid isPermaLink="false">8e740287-7179-42ca-83bf-5c4af18dab29:123543</guid><dc:creator>Anders Vindberg</dc:creator><slash:comments>0</slash:comments><description>&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;</description></item><item><title>Retrieve Extendedproperties Via SQL</title><link>http://lunarmedia.com/blogs/lunarmedia_blog/archive/2009/01/19/retrieve-extendedproperties-via-sql.aspx</link><pubDate>Mon, 19 Jan 2009 15:37:00 GMT</pubDate><guid isPermaLink="false">8e740287-7179-42ca-83bf-5c4af18dab29:123542</guid><dc:creator>Anders Vindberg</dc:creator><slash:comments>0</slash:comments><description>&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;</description></item><item><title>Community Server DefaultButton</title><link>http://lunarmedia.com/blogs/lunarmedia_blog/archive/2009/01/16/community-server-defaultbutton.aspx</link><pubDate>Fri, 16 Jan 2009 15:08:00 GMT</pubDate><guid isPermaLink="false">8e740287-7179-42ca-83bf-5c4af18dab29:123541</guid><dc:creator>Anders Vindberg</dc:creator><slash:comments>0</slash:comments><description>
&lt;p&gt;Today I was reminded of a wonderful CSControl that will allow a textbox to initiate a submit button (when pressing enter). Using the:&lt;/p&gt;

&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;pre&gt;&amp;lt;CSControl:DefaultButtonTextBox ID="..." ButtonId="SubscriptionEmailButton" runat="server" /&amp;gt;&lt;/pre&gt;

&lt;p&gt;you define the buttonId of the submit button. &lt;br&gt;&lt;/p&gt;
&lt;img src="http://lunarmedia.com/aggbug.aspx?PostID=123541" width="1" height="1"&gt;</description></item></channel></rss>
