John's profileJohn West Blogs about Si...PhotosBlogLists Tools Help

Blog


    5/31/2009

    Configuring a Sitecore Workstation Part 2: Machine Specification and Ordering

    This blog post is the first in a series of blog posts about Configuring a Sitecore Workstation. The previous post describes Things to Consider throughout the Build.

    Try to get some information about the user before ordering the machine:

    • What screen size do they prefer?
    • What battery size do they prefer?
    • What color case do they prefer?
    • Do they prefer a touchstick, or a touchpad?
    • Do they need a port replicator or docking station?
    • Do they need a laptop case? If so, what kind? Backpacks may be best for utility, but may not show well for sales. Shoulder bags are hard on the body. You can get through airport security without taking your laptop out of some bags.
    • Do they need a keyboard and mouse?
    • Do they need a monitor? If so, what size?
    • Do you have any Outlook archive files to move to this machine?
    • Which versions of which sites would you like installed?
    • Any special software or other configuration requirements?
    • Gotomeeting credentials?

    For new staff:

    • Get the user’s full name.
    • Get the user’s preferred initials and alternates.
    • Request the domain account configured like another user.
    • Request the CRM account configured like another user.
    • Request updates to domain email addresses like another user.
    • Update local email aliases like another user.

    For all staff, obtain the domain username and password.

    When selecting and ordering the machine, consider the following:

    • It’s best to use a single vendor, use the same line of machines, and select common components for all machines. Right now we order Dell Precision machines with the Intel Wifi option (both the Intel and the Dell software are annoying, but the Intel software has historically been more stable).
    • Request no operating system or other software. You may be able to get free software, licensed software through partnership programs, and other software at no cost. Some vendors may require that you purchase a Home edition of Microsoft Windows even if you plan to use an alternate license or even operating system. At the very least, use this factor when negotiating price.
    • Get quotes with and without RAM. RAM from the vendor is often significantly more expensive than aftermarket RAM, and I’ve never had any problem with any RAM (YMMV). Again, use this factor when negotiating price.
    • If you plan to purchase a port replicator or docking station, including it in the original machine order can sometimes reduce the price of all components.
    • Get the smallest power supply available.
    • Get the Bluetooth option even if the user doesn’t request it.
    • If you plan to actually work on airplanes, get a screen 13 inches diagonally or smaller. Otherwise, get a screen 15 inches diagonally or larger. No matter what, use an external monitor and keyboard whenever possible. If you travel, do not get a screen larger than 15 inches diagonally. And a quick travel tip for those constantly on the road: consider a Zune, some portable powered speakers, a 1/8 inch male-to-male audio cable for the auxiliary port in rental car stereos, 2 Zune travel chargers (USB/Zune cables with both car and wall plugs – one for the Zune and one for the speakers in cars with no auxiliary port), a small power splitter, and a small wireless router. And always rip your MP3s at the highest quality.
    • Get the smallest battery option, unless the battery functions as a wrist-rest and you like that feature. If you get a second battery, get the largest option.
    • Get your purchasing department to haggle over the price. I have purchased machines at less than 3% vendor margin.

    Once you have the machine, note the order number, the model number, the vendor identifiers (Dell service tag and express service code), and the owner’s username.

    On to the next post in this series of blog posts about Configuring a Sitecore Workstation: First Boot and Preparation.

    Configuring a Sitecore Workstation Part 1: Things to Consider throughout the Build

    This blog post is the first in a series of blog posts about Configuring a Sitecore Workstation.

    Consider the following whenever specifying, ordering, or building a Sitecore workstation:

    • Never use your personal credentials or VPN certificate with an account other than your own, including administrator accounts.
    • Don’t use the default login account for a specific user, even for yourself.
    • Never create a blank or silly password or allow login without a password, even temporarily.
    • Never use the operating system image that comes with the machine or the system restoration disks. Always reinstall Windows from scratch. Don’t even use the driver disks that come with the machine – always download the latest drivers.
    • For the VPN connection to work, Sitecore workstations must have Internet Explorer as the default browser. Configuring an alternate browser as the default – even temporarily – could cause the machine to lose the ability to connect to the VPN.
    • Except on secure networks, do not connect to a wired or wireless network before installing antivirus software. Then, immediately apply Microsoft and other updates.
    • The less software you install, the more stable the system will be. For example, don’t install browsers other than IE on sales machines, just in case the sales person accidentally selects that browser as their default. The less services, applications, Outlook, Internet Explorer, and other plug-ins that run when you launch Windows or an application, the more stable the system will be. Don’t install anything you don’t absolutely need. Avoid options to even include optional components such as browser toolbars both when downloading and when installing. For a list of common software that I don’t trust, see the Configure Applications post in this series.
    • When things like command line tools and 7-Zip don’t work, try running them as Administrator.
    • I always agree to participate in vendor’s experience improvement programs, but opt out of such programs when configuring a machine for another user.
    • In general, if I don’t specify something, leave fields blank and accept the defaults.
    • Remember to eject the CD.

    When prompted:

    • Reboot.
    • Allow applications to remember the user and passwords.
    • Allow Windows to download and install updates. Later, change this to download and notify, but not install. For Windows Vista Ultimate, do not install the optional language packs.
    • Select your local time zone. You can change this to the owner’s time zone later.
    • When installing, choose to make applications available to all users.
    • Avoid creating desktop and Quick Launch toolbar icons, but create Start menu icons.
    • Select the option that indicates a public network.
    • Select the option to use Microsoft Update.

    On to the next post in this series of blog posts about Configuring a Sitecore Workstation: Machine Specification and Ordering.

    Configuring a Sitecore Workstation Part 0: Index of Blog Posts

    Even though I’ve installed so many editions of Windows and the applications that make it useful so many times that I probably deserve some kind of award, I still can’t remember all of the steps involved. I’ve tried to write a few documents about how to configure Windows (including my first post on this blog), but they all somehow end up being both too specific and too general. Windows 2008 finally lost my profile, meaning it’s time to rebuild this machine again, and this time I will try to describe the process in a series of blog posts about the various topics. These will be works in progress eternally; I’ll try to keep them updated as I learn more Windows trivia by installing more editions and applications on more hardware platforms. Such a resource can never be complete. For example, always check for additional components available from vendors – in one case a storage driver resolved an audio issue, and Dell sometimes provides a download containing recommended Vista power settings.

    I hope to use these notes when building machines in the future, but there could be some useful information in here for anyone. For security I’ll have to keep some implementation specifics to myself. Of course, all of this has little to do with Sitecore, except that installation issues often result from underlying configuration issues.

    Here are the major subjects of this topic as I see them (I will add links as I complete the posts):

    1. Things to Consider throughout the Build.
    2. Machine Specification and Ordering.
    3. First Boot and Preparation.
    4. Configure Core Components.
    5. Configure Applications.
    6. Image the System.
    7. Configure a User Account.
    8. Turn the System Over.
    9. Issues I Still Have with Windows.

    Start with the first post in the series: Things to Consider throughout the Build.

    5/28/2009

    Skype Internet Explorer Add-On Sitecore Annoyances

    For some time, Sitecore users including myself have experienced an issue where one suddenly can't type into simple Single-Line and Multi-Line Text fields. Refreshing the browser window would resolve the issue, but then one has to restore one’s context (location in content tree, desktop applications, etc.). Everyone had assumed that it was an Internet Explorer bug, but a recent Sitecore Developer Network forum thread indicates that it might be an issue with Skype add-on for Internet Explorer. Skype has caused problems in the past, for instance inserting JavaScript links around phone numbers (some “security” software products can also manipulate data transmitted over HTTP).

    This issue has been frustrating enough for me that I thought it might be worth posting here, even though I’m not sure this is truly the problem or even provides the correct instructions (especially for IE7). So please comment on this post according to your experience, and Sitecore will update the Internet Explorer Configuration reference accordingly.

    One procedure to disable the Skype add-on for Internet Explorer 8 is to:

    1. Open Internet Explorer.
    2. Click the Tools menu or press CTRL-T, and then click Manage Add-ons. The Manage Add-ons dialog appears.
    3. In the Manage Add-ons dialog, in the Name column, right-click Skype, then click Disable, and then click Close.

    I firmly believe that Windows is more stable with less software. I recommend disabling as many add-ons as you can (including gotomeeting and other Outlook add-ons), disabling services you don’t need, and using a tool such as SysInternals AutoRuns to disable startup programs you don’t use constantly (especially anything that tries to update itself).

    Thanks to Ariel for posting this solution to this very annoying problem!

    5/20/2009

    Install Microsoft SQL Server 2008 Express Edition for Use with Sitecore

    I captured some screen shots while configuring Microsoft SQL Server 2008 Express edition for use with Sitecore, both running on a single 32-bit Microsoft Windows Vista host. This configuration may not be appropriate for production.

    First I had to download the Microsoft Windows Installer 4.5 Redistributable.

    You may have to install Microsoft Visual Studio 2008 Service Pack 1. If you don’t have Visual Studio 2008, you may need to install .NET 3.5 Service Pack 1. I haven’t hear from anyone still using Visual Studio 2005 or upgrading from SQL 2005.

    Then I ran SQL Server 2008 Express with Tools (SQLEXPRWT_x86_ENU.exe). The process was relatively straightforward:

    Planning installation

    I must have clicked Installation:

    Selecting installation type

    I clicked New SQL Server stand-alone installation or add features to an existing installation:

    Setting up support rules

    I clicked OK:

    Entering no product key

    I clicked Next:

    Ackonwledging license terms

    I selected the checkbox, and then clicked Next:

    Installing setup support files

    I clicked Install:

    Acknowledging some arbitrary status

    I investigated the Windows Firewall warning, which was irrelevant because only localhost will access the databases, and then clicked Next:

    Selecting components to install

    I selected Database Engine Services and Management Tools – Basic, and then clicked Next:

    Selecting an instance name and installation directory

    I clicked Next:

    Acknowledging some arbitrary status

    I clicked Next:

    Selecting a process owner

    I selected the NETWORK SERVICE user for the SQL Server Database Engine service, and then clicked Next:

    Configuring authentication and authorization

    I selected Mixed Mode, entered a password for the default sa user, clicked Add Current User, and then clicked Next:

    Select debugging options

    As a developer, I would select both checkboxes, but for most users I would leave them blank, and then click Next:

    Acknowledging some arbitrary status

    I clicked Next:

    Acknowledging some arbitrary status

    I clicked Install:

    Acknowledging some arbitrary status

    I clicked Next:

    Acknowledging some arbitrary status

    I clicked Close.

    I rebooted.

    I visited http://www.windowsupdate.com to get patches, and then rebooted again.

    I thought the SQL Server 2008 Express installation process was relatively simple and painless, but I am familiar with Sitecore and SQL 2005 (and even 2000). I hope I didn’t miss any important steps, but if I did it was most likely an option to enable or disable advanced configuration options in the installation user interface.

    4/23/2009

    Internet Explorer Optimization for Sitecore Documentation Published

    Sitecore published an Internet Explorer Configuration reference, which covers some new IE8 features. Most of the configuration is optional. I have updated my post that provides links to the best Sitecore documentation.

    Sitecore Developer Network Poll: What Primary Source Code Management Tool Do You Use with Sitecore?

    One of my students this week asked which source code management tools developers most often use with Sitecore, or which works best with Sitecore. I created a corresponding poll on the Sitecore Developer Network, but these polls are not very visible so I'm posting a link here in the hope of getting more responses:

    http://sdn.sitecore.net/Forum/showpost.aspx?PostID=16585

    Sitecore (Microsoft) CRM Membership Provider and Documentation Published

    Sitecore published (Microsoft) CRM Security Provider documentation and compiled code. I have updated my post that provides links to the best Sitecore documentation.

    4/9/2009

    Three Factors to Sitecore’s Success

    I was thinking about Alex de Groot's blog post Thank you, Sitecore community. It’s somewhat self-congratulatory to say, but my experience watching Sitecore USA grow from a carful to a multinational group with offices in numerous states has made it clear that the most important aspect of the company is its people, especially those hired in the early days that set the company's direction and culture. Sitecore has managed growth successfully by waiting for the right people to fill strategic positions.

    For Sitecore, this most important aspect (people) developed the second most important aspect, product (the Sitecore Web Content Management System). Sitecore is really an amazing platform, and could not be as successful, extensible, and capable of increasing productivity as it is without this solid and well-considered architecture. This may indicate that a young software company should invest in it's product, possibly in favor of marketing (often the primary factor in the success of a software company). But to be clear, Sitecore couldn’t possibly be as powerful without Microsoft and ASP.NET – Sitecore’s engineers don’t think they could have built Sitecore with Java (I haven’t asked about LAMP, Haskell, etc.).

    For Sitecore, the third most important driver of success may be the community, which is really an extension of Sitecore’s people, and a result of Sitecore’s focus on the partner channel and adapting that business model as it expands into new markets. So thanks to all of the partners, customers, independent consultants, and Sitecore employees working around the world, on and off the clock, to improve the product, deliver optional components, develop custom solutions, teach training, educate prospective customers, write documentation, white papers, case studies, blog posts, and assist the community through the Sitecore Support Portal and on the Sitecore Developer Network Forums!

    Sitecore has been fortunate to see its success continue as the market becomes more challenging. Web solution developers find common patterns, and Sitecore addresses the majority of those patterns with relative ease. I think it says a lot that people can sift and decipher the chaotic realm of CMS software literature including obsolete and misinformation to pick what I continue to think is the best Web CMS available. Great minds think alike!

    4/4/2009

    Windows Live (Blog) Writer

    I have to say that as an owner, I've been pretty disappointed with Windows Live Spaces. The overall usability of the management Web site is pretty bad, which may be one reason I don't use many of its features. It seemed like it supported 32-bit Firefox for a while, which was great because Firefox didn’t support the WYSIWYG and I could just edit HTML, but this stopped, maybe due to my move to 64-bit Minefield. Anyway, now I have to use IE, which means copying the source view from the WYSIWYG (which IE has conveniently turned into one long line of markup) between the browser and a real editor. I can't tell you how much time I've spent deleting spam comments – I have to go through the frustrating process of figuring out how every few months when I get a chance to maintain the blog. It’s one of the worst user interfaces in the whole system, possibly in the entire universe (trust me, I’ve been using computers for 20 years – since the basic interpreter and command line days, and I’m not the only person to complain about). I guess I should spend the time to figure out how to require that I approve the posts, but that seems like a major challenge. It could be so much better if they just fixed a few things…but I digress.

    You may have noticed that Windows Update has been suggesting some optional Windows Live components lately. I generally like to install everything available from Windows update (except the Vista Ultimate language updates) so I can get an idea of what new problems they may cause for my users. So I grabbed these things and quickly ignored them.

    So I was pretty excited when I right-clicked something and it prompted me to blog about it with Windows Live. It then prompted me to create a blog or connect to an existing one. I can’t remember exactly what blogs were supported.

    So far, so good – just the spelling check is probably good enough to keep me using it, and the interface is light years ahead of the browser-based interface. This is definitely something I prefer to use, and also something my dad could (probably) figure out. Let’s see how it manages comments…I will try to update this post as I find more features.

    As I think about how to make this post relate to Sitecore somehow, it seems like if this Windows client can access the blog, then so could Sitecore. There may be some way to capitalize on the Windows live Writer interface for blogs, and possibly even other content. But I doubt Microsoft has publicly documented whatever protocols it uses, which may be proprietary and could change.

    Bugs:

    • It always takes me to the latest post after publishing, not the post I just edited.
    • It has been crashing from time to time, apparently around clipboard operations, after configuring Microsoft Word to track multiple clipboard entries even when the clipboard is not showing.

    Updates:

    • I’ve added Windows Live Writer to my QuickLaunch toolbar, which is a high honor among ~free applications. It just makes it too easy to update my blog.
    • It needs to be integrated into the browser. It's too hard to remember to click a separate button to edit. Except, I am used to pressing a button to open a text editor...
    • I can save local drafts (I could work on an airplane if I was willing to type on a small screen).
    • I can’t find a way to manage comments.
    • It doesn’t support tabs. I can only edit one post at a time, but I seem to be able to launch multiple instances. I can open the same post in two windows, but it prompts me to save even though I haven’t saved. Possible potential data loss bug?
    • I can very easily search through old posts to find things to edit. Update: options include a setting to open multiple windows, but this seems to allow me to edit the same post in multiple windows.
    • There is a source markup editor in the Windows client.
    • Adding images and setting basic properties is a snap! You can actually paste screen shots? You can’t do *that* in the browser-based WYSIWYG! But UI features are limited (where’s 100% width?). It would be nice if it had a mode to convert “*that*” to strong HTML, and possibly other common markups such as wiki.
    • Windows Live Writer doesn’t seem to use the installed copy of Word for grammar checking, I don’t know about spellchecking. Spell-check feature is weak.
    • There are Windows Live Writer plug-ins?!? http://gallery.live.com/results.aspx?c=0&bt=9&pl=8&st=5 (“Insert Code for Windows Live Writer Created by: Omar Downloads:14661 Posted:10/4/2006 Free Insert Code for Windows Live Writer will format a snippet of text in a number of programming languages such as C#, HTML, MSH, JavaScript, Visual Basic and TSQL. Insert File(s) Created by: Scott Downloads:7549 Posted:8/22/2007 Free Allows you to add up to three files to be uploaded with your blog entry. Paste from Visual Studio Created by: Douglas Stockwell Downloads:7149 Posted:11/1/2006 Free Easily transfer syntax highlighted source code from Visual Studio to elegant HTML in Windows Live Writer. ”).
    • Screen shot from one tab of options:

    image

    • Windows Live Writer prompts me to view my post in a browser after publishing:

    image 

    • Windows Live Writer doesn’t map CTRL-SHFT-ALT-V to the “Paste Special” command, but does provide the command through a right-click menu (though Remove Formatting doesn’t work very well, if at all in some cases, at least unless you consider links and linefeeds to not be formatting):

    image

    For example, here’s Remove Formatting not working:

    Paste from Visual Studio

    Created by: Douglas Stockwell

    Downloads:7149 Posted:11/1/2006

    Free

    Easily transfer syntax highlighted source code from Visual Studio to elegant HTML in Windows Live Writer.

    With any mode, Microsoft fails the “pasting a nested list from Word” test worse than I’ve seen recently, giving me an <h4>, <h5>, and <h6>:

    1 A

    1.1 B

    1.1.1 C

    Or worse, just some <p>’s:

    1. A

    a. B

    i. C

    Worst is “Keep Formatting”:

    <p style="text-indent: -0.25in; mso-list: l0 level1 lfo1" class="MsoListParagraphCxSpFirst"><span style="mso-bidi-font-family: calibri; mso-bidi-theme-font: minor-latin"><span style="mso-list: ignore">1.<span style="font: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span>A</p>
    <p style="text-indent: -0.25in; margin-left: 1in; mso-list: l0 level2 lfo1; mso-add-space: auto" class="MsoListParagraphCxSpMiddle"><span style="mso-bidi-font-family: calibri; mso-bidi-theme-font: minor-latin"><span style="mso-list: ignore">a.<span style="font: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span>B</p>
    <p style="text-indent: -1.5in; margin-left: 1.5in; mso-list: l0 level3 lfo1; mso-add-space: auto; mso-text-indent-alt: -9.0pt" class="MsoListParagraphCxSpLast"><span style="mso-bidi-font-family: calibri; mso-bidi-theme-font: minor-latin"><span style="mso-list: ignore"><span style="font: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>i.<span style="font: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span>C</p>

    It does seem to nicely translate all those <’s, >’s, &’s, and other characters to HTML or XML entities.

    Screen Shots:

    Microsoft Internet Explorer 8 (WYSIWYG):

    image

    Google Chrome 1 (plain text):

    image

    Windows Live Writer version 14! (a capture of a capture of a capture):

    image

    Clear View > Use editing theme (where’s the ribbon? ;-) and the editor resizes with the window, unlike the browsers that waste most of my monitor’s space:

    image

    I can crop and apply other effects, and there are right-click options to make images clickable, etc.:

    image

    If you click on any of the images above, depending on your user agent, you might have access to image manipulation features.

    3/31/2009

    Handling HTTP 404 Page Not Found with Sitecore Guide Published

    Sitecore published a document that describes how to handle the HTTP 404 Page Not Found condition. I have updated my post that provides links to the best Sitecore documentation.

    3/27/2009

    Sitecore Membership Providers Documentation Published

    Sitecore published a document that describes how to implement ASP.NET Membership Providers. I have updated my post that provides links to the best Sitecore documentation.

    Sitecore Dynamic Links Documentation Published

    Sitecore published a document that describes how to work with Dynamic Links. I have updated my post that provides links to the best Sitecore documentation.

    3/4/2009

    Contributing to Sitecore Shared Source Projects Part II: Contribution Suggestions

    Here are the Sitecore Shared Source projects to which I have recently contributed:

    Here are some suggestions for Sitecore shared source contributions:

    • Use C#.
    • Use Resharper, Stylecop, Agent Smith, and Agent Johnson as described in this post.
    • Resolve all code validtion issues before checking in any file.
    • Keep line length below 80 characters when possible.
    • Include the URL of the shared source project in each source code file.
    • To make your code easier for other developers to read, avoid ternary expressions.
    • To make your code easier for other developers to read, fully qualify classes in namespaces other than System, at least on the first use of each class in each method.
    • To make your code easier for other developers to read, avoid use of the var keyword.
    • Use protected instead of private where possible.
    • Use namespaces within the Sitecore.Sharedsource namespace that correspond to system and Sitecore namespaces, such as Sitecore.Sharedsource.Web.UI.WebControls.
    • Create directories as required to check in files from directories within the Subversion Trunk folder that correspond to the namespace, such as /Web/UI/WebControls for files in the Sitecore.Sharedsource.Web.UI.WebControls namespace.
    • Place extension methods in classes named after the method plus the word "Extension" in folders named after the original class. For example, to extend the Sitecore.Sites.SiteContext class with a method named GetSomething(), create /Sites/SiteContext/GetSomethingExtension.cs containing the class Sitecore.Sharedsource.Sites.SiteContext.GetSomethingExtension containing the GetSomething() method. Use namespaces such as Sitecore.Sharedsource.SystemString for extensions to system classes. For example, to extend System.String with a method named GetSomething, create /SystemString/GetSomething.cs containing the class Sitecore.Sharedsource.SystemString.GetSomethingExtension containing the GetSomething() method.

    Also, I learned that to nest lists in the wiki, you indent with spacing. So:

     1. Item One.
      * Item One Bullet One.
    

    This post has some other Wiki formatting and shared source contribution suggestions.

    2/26/2009

    Manipulating Sitecore Links Part II: The LinkProvider Shared Source Module

    The http://trac.sitecore.net/LinkProvider/ Sitecore Shared Source project provides many of the features described in this post.

    2/23/2009

    Sitecore MemoryMonitorHook Threshold

    I spent February 18 through 20 with a customer experiencing performance issues with a Sitecore 5.3.1 solution. We identified a configuration problem within the first few hours, but I stayed on the project for a little while to monitor the solution.

    As most Sitecore developers are aware, Sitecore is thoroughly optimized for performance, relying heavily on caching. Caching consumes memory, and caching requirements for a solution with significant data or load can exceed available memory. Out of memory conditions can cause exceptions and can cause ASP.NET to crash or restart, resulting in errors, delays, and outages.

    Sitecore provides a memory monitor hook to flush caches when memory exceeds a given threshold. You configure the memory monitor hook using the /configuration/sitecore/hooks section of web.config:

    <hooks>
      <hook type="Sitecore.Diagnostics.HealthMonitorHook, Sitecore.Kernel" />
      <hook type="Sitecore.Diagnostics.MemoryMonitorHook, Sitecore.Kernel">
        <param desc="Threshold">500MB</param>
        <param desc="Check interval">00:00:05</param>
        <param desc="Minimum time between log entries">00:01:00</param>
        <ClearCaches>true</ClearCaches>
        <GarbageCollect>true</GarbageCollect>
        <AdjustLoadFactor>true</AdjustLoadFactor>
      </hook>
    </hooks>
    

    The first parameter (the first <param> element) to the constructor for the Sitecore.Diagnostics.MemoryMonitorHook class specifies the threshold for the memory monitor hook, which is 500MB by default in Sitecore 5.3.1. Sitecore frequently checks the amount of memory consumed by ASP.NET and if it exceeds this limit, then Sitecore will flush caches. The following message repeated frequently in the logs should have made this pretty obvious:

    WARN  Memory usage exceeded the MemoryMonitor threshold. All caches have been cleared and a forced GC has been induced.
    WARN  Memory used before/after GC: 554,590,208 / 554,590,208
    

    If you see a message like this, your cache may be too small. If you see it constantly, your cache may be way too small, especially if the before/after values are the same.

    The problem for this customer was that the amount of memory consumed by ASP.NET was always greater than 500MB. Therefore, Sitecore was flushing caches constantly. It's somewhat amazing that this didn't completely overwhelm the content delivery and the database servers.

    The solution is quite simple: either set the memory monitor threshold to an appropriate value, or set the ClearCaches property to false. In this case, we set the size of the cache to 1792MB and afterwards were unable to reproduce the issue.

    Note that in Sitecore 6, the default value for the memory monitor threshold is higher (800MB), but it shouldn't matter anyway because cache clearing is disabled by default:

    <hooks>
      <hook type="Sitecore.Diagnostics.HealthMonitorHook, Sitecore.Kernel" />
      <hook type="Sitecore.Diagnostics.MemoryMonitorHook, Sitecore.Kernel">
        <param desc="Threshold">800MB</param>
        <param desc="Check interval">00:00:05</param>
        <param desc="Minimum time between log entries">00:01:00</param>
        <ClearCaches>false</ClearCaches>
        <GarbageCollect>false</GarbageCollect>
        <AdjustLoadFactor>false</AdjustLoadFactor>
      </hook>
    </hooks>
    

    I would like to thank Alexey Romaniuha of the Sitecore Support team for his identification of the issue.

    2/17/2009

    Sitecore Ribbon Command to Debug Any Item in Any Database

    The Sitecore browser-based debugger by default opens the home page of the published Web site using the publishing target database (Web). If you want to debug another page, you can navigate to that page, or enter its URL. If you want to debug in another database, you can add the sc_database query string parameter. Or you can add a command to the Content Editor ribbon to debug the selected item in the selected database:

    1. Compile the class into your project.
    2. Update the type attribute of the /configuration/command element in /App_Config/commands.config with name system:debug to reference this class and the assembly that contains it. Remember to hide all files again after adding this file to the Visual Studio project, or debugging in Visual Studio will hang.
    3. In the Sitecore Desktop, use the database selection icon to select the Core database.
    4. In the Core database, open the Content Editor and duplicate the /sitecore/content/Applications/Content Editor/Ribbons/Chunks/Publish/Preview item as an item named Debug (or if you prefer the Debug command on the Reviewing tab instead of the Publish tab, duplicate /sitecore/content/Applications/Content Editor/Ribbons/Chunks/Proofing/Spellcheck as Debug).
    5. In the Data section of the new Debug item, set Header to Debug, Icon to Software/16x16/debug_run.png, Click to system:debug, and Tooltip to Start the debugger.
    6. In the Sitecore Desktop, be sure to use the database selection icon to select the Master database.
    7. Open the Content Editor, navigate to any item with layout details, click the Publish tab, and then in the Publish group, click the Debug command (or on the Review tab in the Proofing group).

    After step 2, the default Debug command on the Sitecore menu will take you to the Master database instead of the publishing target database (Web).

    You can download the code from http://resources.thedotnetcms.com/sitecorejohn/debug.zip.

    1/28/2009

    Contributing to Sitecore Shared Source Projects

    The following tips for working with Sitecore shared source are based on my recent experience contributing the FieldValueComparer (based on to the comparer in this post) to the Sitecore Shared Source project.

    • Review this introduction to contributing shared source to obtain access to Subversion or to request a new project room.
    • Each project room is basically a Wiki. The only way back to the list of project rooms seems to be http://trac.sitecore.net/Index, so most project rooms include this link.
    • Review this guide to contributing shared source.
    • Copy files into the Trunk directory and check them in.
    • I don't like learning a new markup, but when editing the Wiki:
      • It seems to format linefeeds as HTML paragraphs or line breaks.
      • Use equals signs for major headings (the spacing seems to be important): 
        = heading =
        
      • Use more equals signs for minor headings:
        == heading ==
        
      • Preceed text with an exclamation mark to avoid the Wiki automatically creating a link:
        = Welcome to the !ProjectRoomName =
        
      • Wrap URLs with quare brackets, optionally followed by a space and the text of the link:
        [http://sitecore.net Sitecore Marketing Site]
        
      • Wrap code with three curly braces to preformat it for easy copy and paste:
        {{{
        // code
        }}}
        
      • You can create entries in numbered lists by entering a space character, a number, and a period on a blank line:
         1. First.
         2. Second.
        
    • Please report issues and feature requests for shared source components by posting on the Shared Source Modules forum on the Sitecore Developer Network.

    I will try to maintain this list and the FieldValueComparer project room as a template for cutting and pasting when creating new projects.

    Update: Shared source projects use the Sitecore.Sharedsource top-level namespace. The Sitecore Shared Source Coordinator provided me with the URL of a Wiki formatting cheat sheet: http://trac.edgewall.org/wiki/WikiFormatting.