 <?xml-stylesheet type="text/css" href="https://www.esdm.co.uk/Data/style/rss1.css" ?> <?xml-stylesheet type="text/xsl" href="https://www.esdm.co.uk/Data/style/rss1.xsl" ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd">
  <channel>
    <title>The knowledge base blog</title>
    <link>https://www.esdm.co.uk/knowledge</link>
    <description />
    <docs>http://www.rssboard.org/rss-specification</docs>
    <generator>mojoPortal Blog Module</generator>
    <language>en-GB</language>
    <ttl>120</ttl>
    <atom:link href="https://www.esdm.co.uk/Blog/RSS.aspx?p=138~108~6" rel="self" type="application/rss+xml" />
    <itunes:owner />
    <itunes:explicit>no</itunes:explicit>
    <item>
      <title>Making our mojoPortal sites even more secure</title>
      <description><![CDATA[<p>I’ve just run a couple of our mojoPortal web sites through the test on <a href="https://asafaweb.com" title="https://asafaweb.com">https://asafaweb.com</a> and thought I’d write up some notes on how to get the best possible test results (and therefore presumably the most secure sites!). We are starting from a point where all the basic security measures are in place – folder permissions, custom machine key, running the site under SSL.</p>

<p>The tests that did not immediately pass were:</p>

<h3>Request validation: Fail</h3>

<p>OK so we find &lt;pages validateRequest="false" … in web.config.</p>

<p>But we are assured this is deliberate and acceptable in mojoPortal because, as Joe Audette explained,</p>

<blockquote>
<p>validateRequest is false because we do our own validation of inputs and setting it to true causes problems/errors when posting back html content from a wysiwyg editor.</p>
</blockquote>

<h3>Excessive headers: Warning</h3>

<p>So our IIS server and site are revealing several pieces of information about the technologies behind the site, and we are <a href="http://www.troyhunt.com/2012/02/shhh-dont-let-your-response-headers.html" target="_blank">better concealing these http headers</a>.</p>

<p>Specifically we have:</p>

<ul>
	<li><strong>Server</strong> which can be turned off with <a href="http://www.iis.net/downloads/microsoft/urlscan" target="_blank">URLscan</a> by setting RemoveServerHeader=1 in UrlScan.ini (there are other ways, but this is by far the simplest).</li>
	<li><strong>X-Powered-By </strong>which can be turned off in IIS Manager: select the web site, then open HTTP Response Headers and remove this one.</li>
	<li><strong>X-AspNet-Version </strong>which can be suppressed by adding this attribute to the httpRuntime setting in web.config: &lt;httpRuntime … <strong>enableVersionHeader="false"</strong> /&gt;</li>
</ul>

<h3>Secure cookies: Fail</h3>

<p>In line with <a href="https://www.mojoportal.com/use-ssl" target="_blank">the mojoPortal documentation on SSL</a> we already had the attribute in bold:</p>

<p>&lt;forms name=".mysitecookiename" protection="All" timeout="50000000" path="/" cookieless="UseCookies" <strong>requireSSL="true"</strong> /&gt;</p>

<p>but we were still failing the test until we also added this into the system.web section:</p>

<p><strong>&lt;httpCookies httpOnlyCookies="true" requireSSL="true" /&gt;</strong></p>

<p>Joe Audette said:</p>

<blockquote>
<p>Adding the &lt;httpCookies element as you have just means that any other cookies issued for the web site would also be kept secure, but as far as I know any other cookies we are creating are only for cosmetic purposes such as the one to toggle the collapse state of the admin toolbar etc.</p>
</blockquote>

<p>So I think we were secure anyway, but it’s nice to pass the test.</p>

<h3>Clickjacking: Warning</h3>

<p>This was easily blocked by preventing our site from being run in an iframe. This is achieved in IIS Manager: select the web site, then open HTTP Response Headers, and add a new one as follows:</p>

<p><img alt="Adding an HTTP response header to block loading the site in an iframe" border="0" height="185" src="https://www.esdm.co.uk/Data/Sites/1/media/wlw/clip_image002_4.jpg" style="border: 0px currentColor; border-image: none; padding-top: 0px; padding-right: 0px; padding-left: 0px; display: inline; background-image: none;" title="Adding an HTTP response header to block loading the site in an iframe" width="326" /></p>

<p>If we are using an iframe within the site, for something like a keep-alive, another value for this setting is "SAMEORIGIN" - this allows iframes in the site to host content that is within the same domain. If we want our site to be displayed in an iframe within a known other site, we can use "ALLOW-FROM <em>uri</em>".</p>

<h3>View state MAC: Not tested</h3>

<p>Not tested apparently because the viewstate is encrypted in mojoPortal, but it turns out versions of mojoPortal before 2.4.0.2 had <strong>enableViewStateMac="false"</strong> which is not what we want. This has been removed, meaning it is set to true by default, in version 2.4.0.2, but if running an earlier version we should ensure this setting has <em>only</em> the following attributes:</p>

<p><code>&lt;pages validateRequest="false" viewStateEncryptionMode="Auto" maxPageStateFieldLength="500" controlRenderingCompatibilityVersion="4.0" clientIDMode="AutoID"&gt;</code></p>

<p>So on sites running mojoPortal 2.4.0.2 or later, no change needed.</p>

<h3>Summary</h3>

<p>So we needed to make two changes in web.config, remove one http header and add another one. Plus install and configure&nbsp;URLscan if it's not already present. These are one-off changes for a server and/or site except the web.config settings. mojoPortal upgrades generally involve overwriting the web.config, so it’s important to keep separate notes about what default settings need to be changed again after an upgrade. We always keep these notes for each site in a UpgradeNotes.config file in the root folder of the site.</p>

<h3>*** UPDATE ***</h3>

<p>Further testing of some sites with ZAP and&nbsp;<a href="https://securityheaders.com" target="_blank">https://securityheaders.com</a> identified two more http headers (in italics below) that should be set to improve security. Overall the header settings can be wrapped up by including this section in system.webServer:</p>

<p><code>&nbsp; &lt;system.webServer&gt;<br />
...<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;httpProtocol&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;customHeaders&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;remove name="X-Powered-By" /&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;add name="X-Frame-Options" value="SAMEORIGIN" /&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <em>&lt;add name="X-XSS-Protection" value="1" /&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;add name="X-Content-Type-Options" value="nosniff" /&gt;&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;add name="Referrer-Policy" value="no-referrer-when-downgrade" /&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;add name="strict-transport-security" value="max-age=31536000; includeSubDomains" /&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/customHeaders&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/httpProtocol&gt;&nbsp; </em> </code></p>

<p><code>...</code></p>

<p>And it also pointed&nbsp;&nbsp;out that auto-complete was not disabled on the login screen (which leaves accounts vulnerable where more than one user may share a machine). This can be suppressed with the following in user.config:</p>

<p><code>&lt;add key="DisableAutoCompleteOnLogin" value="true"/&gt;</code></p>

<p>&nbsp;</p>
<br /><a href='https://www.esdm.co.uk/making-our-mojoportal-sites-even-more-secure'>Crispin Flower</a>&nbsp;&nbsp;<a href='https://www.esdm.co.uk/making-our-mojoportal-sites-even-more-secure'>...</a>]]></description>
      <link>https://www.esdm.co.uk/making-our-mojoportal-sites-even-more-secure</link>
      <author>crispin.flower@idoxgroup.com (Crispin Flower)</author>
      <comments>https://www.esdm.co.uk/making-our-mojoportal-sites-even-more-secure</comments>
      <guid isPermaLink="true">https://www.esdm.co.uk/making-our-mojoportal-sites-even-more-secure</guid>
      <pubDate>Thu, 10 Apr 2014 18:31:00 GMT</pubDate>
    </item>
    <item>
      <title>How to make links open in a colorbox popup in mojoPortal (without writing any code)</title>
      <description><![CDATA[<p>I came across this by chance buried in some documentation about <a title="optimising mojoPortal site performance" href="https://www.mojoportal.com/improving-your-yslow-or-page-speed-score" target="_blank">optimising mojoPortal site performance</a>, so thought I’d make a note.</p> <p>If you want a link to open within a popup in the page, rather than the current browser tab or a new tab, this can be achieved simply by adding </p> <p><font face="Courier New">class="cblink" </font></p> <p>to the hyperlink.</p> <p>And this can be done easily in CKEditor from the hyperlink editor, using the Stylesheet Classes as shown here:</p> <p><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="https://www.esdm.co.uk/Data/Sites/1/media/wlw/image_82.png" width="430" height="480"></p> <p>The result? This is a <a class="cblink" href="http://www.esdm.co.uk" target="_blank">hyperlink to the home page of the exeGesIS web site</a>.</p> <p>For this to work the colorbox javascript has to be loaded with the page. When logged in as admin, or on pages with certain features like the image gallery, this is loaded automatically. But on other pages, as noted in <a href="https://www.esdm.co.uk/mojoportal-not-showing-colorbox" target="_blank">Kate’s previous post</a>, this will not be loaded unless you include this property in the ScriptLoader in layout.master:</p> <p>&lt;portal:ScriptLoader id="ScriptLoader1" runat="server" AssumejQueryIsLoaded="true" AssumejQueryUiIsLoaded="true" MojoCombinedFullScript="/mojocombined/mysitecombined.js"&nbsp; <strong>IncludeColorBox="true"</strong> /&gt;  <br /><a href='https://www.esdm.co.uk/how-to-make-links-open-in-a-colorbox-popup-in-mojoportal-without-writing-any-code'>Crispin Flower</a>&nbsp;&nbsp;<a href='https://www.esdm.co.uk/how-to-make-links-open-in-a-colorbox-popup-in-mojoportal-without-writing-any-code'>...</a>]]></description>
      <link>https://www.esdm.co.uk/how-to-make-links-open-in-a-colorbox-popup-in-mojoportal-without-writing-any-code</link>
      <author>crispin.flower@idoxgroup.com (Crispin Flower)</author>
      <comments>https://www.esdm.co.uk/how-to-make-links-open-in-a-colorbox-popup-in-mojoportal-without-writing-any-code</comments>
      <guid isPermaLink="true">https://www.esdm.co.uk/how-to-make-links-open-in-a-colorbox-popup-in-mojoportal-without-writing-any-code</guid>
      <pubDate>Tue, 17 Dec 2013 13:20:59 GMT</pubDate>
    </item>
    <item>
      <title>mojoPortal not showing ColorBox</title>
      <description><![CDATA[<p>If your users complain that they can't see your nice pretty Colorbox popup add:</p>

<p><span>IncludeColorbox="true"</span> to the scriptloader in layout.master<br />
<br />
The ColorBox javascript is included in the admin javascript combiner, but is not loaded&nbsp;for anonymous users unless the above is set.</p>
<br /><a href='https://www.esdm.co.uk/mojoportal-not-showing-colorbox'></a>&nbsp;&nbsp;<a href='https://www.esdm.co.uk/mojoportal-not-showing-colorbox'>...</a>]]></description>
      <link>https://www.esdm.co.uk/mojoportal-not-showing-colorbox</link>
      <author>()</author>
      <comments>https://www.esdm.co.uk/mojoportal-not-showing-colorbox</comments>
      <guid isPermaLink="true">https://www.esdm.co.uk/mojoportal-not-showing-colorbox</guid>
      <pubDate>Fri, 22 Nov 2013 12:01:00 GMT</pubDate>
    </item>
    <item>
      <title>IE10 errors when clicking icons in mojoPortal and ASP.Net 4 web sites fixed with .Net 4.5</title>
      <description><![CDATA[<p>I’ve noticed a couple of mojoPortal sites throwing errors when I click image buttons in the administration pages.&nbsp; For example, when editing page settings, clicking the little spanner icon to edit the settings of a feature instance would crash the site. This only started since I upgraded to IE10 (on Windows 7).&nbsp; </p> <p>This is typical of what I was seeing in the system log:</p> <p><font face="Courier New">2013-04-17 19:15:57,147 ERROR 192.168.54.5 - en-GB - /Admin/PageLayout.aspx?pageid=282 - mojoPortal.Web.Global -&nbsp; Referrer(ttp://www.mysite.co.uk/Admin/PageLayout.aspx?pageid=282) useragent Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; WOW64; Trident/6.0; BOIE9;ENUS) <br>System.FormatException: Input string was not in a correct format. <br>&nbsp;&nbsp; at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer&amp; number, NumberFormatInfo info, Boolean parseDecimal) <br>&nbsp;&nbsp; at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) <br>&nbsp;&nbsp; at System.Web.UI.WebControls.ImageButton.LoadPostData(String postDataKey, NameValueCollection postCollection) <br>&nbsp;&nbsp; at System.Web.UI.WebControls.ImageButton.System.Web.UI.IPostBackDataHandler.LoadPostData(String postDataKey, NameValueCollection postCollection) <br>&nbsp;&nbsp; at System.Web.UI.Page.ProcessPostData(NameValueCollection postData, Boolean fBeforeLoad) <br>&nbsp;&nbsp; at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)</font> <br></p> <p>Joe Audette pointed out a possible solution <a href="https://www.mojoportal.com/Forums/Thread.aspx?pageid=5&amp;t=10864~1" target="_blank">in this thread</a> so I installed .Net 4.5 on the web server and the problem was cured.</p><br /><a href='https://www.esdm.co.uk/ie10-errors-when-clicking-icons-in-mojoportal-and-aspnet-4-web-sites-fixed-with-net-45'>Crispin Flower</a>&nbsp;&nbsp;<a href='https://www.esdm.co.uk/ie10-errors-when-clicking-icons-in-mojoportal-and-aspnet-4-web-sites-fixed-with-net-45'>...</a>]]></description>
      <link>https://www.esdm.co.uk/ie10-errors-when-clicking-icons-in-mojoportal-and-aspnet-4-web-sites-fixed-with-net-45</link>
      <author>crispin.flower@idoxgroup.com (Crispin Flower)</author>
      <comments>https://www.esdm.co.uk/ie10-errors-when-clicking-icons-in-mojoportal-and-aspnet-4-web-sites-fixed-with-net-45</comments>
      <guid isPermaLink="true">https://www.esdm.co.uk/ie10-errors-when-clicking-icons-in-mojoportal-and-aspnet-4-web-sites-fixed-with-net-45</guid>
      <pubDate>Wed, 17 Apr 2013 18:48:01 GMT</pubDate>
    </item>
    <item>
      <title>Transferring user accounts from ASP.NET to MojoPortal</title>
      <description><![CDATA[<p>Occasionally we need to transfer user accounts from existing ASP.NET membership based sites into MojoPortal</p>

<p><strong>Note :</strong> if the databases are on the same server, or can be linked, then it is possible to take the SQL of the selects in the ExportASPNETUserData.bat file and use them to insert into the MojoPortal database tables. Using the .bat files will work wherever the databases are, as long as your PC can connect to both.<br />
If you can't connect to both, run the XMLFormat and Export scripts on a machine that can connect to the ASP.NET membership database, then copy the files and run the Import script on a machine that can connect to the MojoPortal database</p>

<p><strong>Note: </strong> It is possible to do the format/export/import in one script, but being able to sanity check the data before inserting is useful. You could also use staging tables to test the scripts before using the real MojoPortal tables</p>

<p><strong>Note: </strong> The switches set in each file are those I found were best for the LHaR data. Change them if you feel it is appropriate for you data. See: <a href="http://msdn.microsoft.com/en-gb/library/ms162802.aspx" target="_blank">BCP Utility Technical Reference</a></p>

<p>&nbsp;</p>

<h2>How-to</h2>

<ul>
	<li>Set MojoPortal to use plain text passwords</li>
	<li>Create a folder on your PC to contain the scripts</li>
	<li>In this folder, create the following .bat files:
	<ul>
		<li>CreateMojoUserTablesXMLFormats.bat</li>
		<li>ExportASPNETUserData.bat</li>
		<li>ImportMojoPortalUserData.bat</li>
	</ul>
	</li>
	<li>In this folder create the following subdirectories:
	<ul>
		<li>data</li>
		<li>formats</li>
		<li>output</li>
	</ul>
	</li>
	<li>Create and run the CreateMojoUserTablesXMLFormats.bat file</li>
	<li>Create and run the ExportASPNETUserData.bat file
	<ul>
		<li>Note: add as many user properties as required. To do this, select out each property in a separate select and then UNION the results together</li>
		<li>Check the output directory for any errors</li>
		<li>Check the data files have been created and contain the data you expect</li>
	</ul>
	</li>
	<li>Create and run the ImportMojoPortalUserData.bat
	<ul>
		<li>Check the output directory for any errors</li>
		<li>Check the database tables have the data</li>
	</ul>
	</li>
	<li>Switch MojoPortal back to using encrypted passwords</li>
	<li>Test a few logins</li>
</ul>

<p>&nbsp;</p>

<p>&nbsp;</p>

<h2>CreateMojoUserTablesXMLFormats.bat</h2>

<p>set login=-U <strong>[Username]</strong> -P <strong>[Password]</strong> -S <strong>[SQL Server Instance]</strong><br />
set database=<strong>[Databasename].[Schema].</strong><br />
set switches= -c -x<br />
set formatDir=<strong>[Full path to formats directory with trailing slash]</strong></p>

<p>bcp %database%mp_Users format nul %login% %switches% -f %formatDir%mojoUsers.xml<br />
bcp %database%mp_UserProperties format nul %login% %switches% -f %formatDir%mojoUserProperties.xml<br />
bcp %database%mp_userRoles format nul %login% %switches% -f %formatDir%mp_userRoles.xml</p>

<p>&nbsp;</p>

<h2>ExportASPNETUserData.bat file</h2>

<p>set login=-U <strong>[Username]</strong> -P <strong>[Password]</strong> -S <strong>[SQL Server Instance]</strong><br />
set dataDir=<strong>[Full path to data directory with trailing slash]</strong><br />
set database=<strong>[Databasename].[Schema].</strong><br />
set switches= -k -c</p>

<p>bcp "SELECT 0 AS UserID, 1 AS SiteID, aspnet_Users.Username AS Name, aspnet_Users.UserName AS LoginName, COALESCE (aspnet_Membership.Email,aspnet_Users.UserName + '@dummyemail.co.uk' ) AS Email, aspnet_Membership.LoweredEmail AS LoweredEmail, NULL AS PasswordQuestion, NULL AS PasswordAnswer, NULL AS Gender, aspnet_Membership.IsApproved AS ProfileApproved, NULL AS RegisterConfirmGUID, aspnet_Membership.IsApproved AS ApprovedForForums, 0 AS Trusted, CASE aspnet_Roles.RoleName WHEN 'xg' THEN 0 ELSE 1 END AS DisplayInMemberList, NULL AS WebsiteURL, NULL AS Country, NULL AS [State], NULL AS Occupation, NULL AS Interests, NULL AS MSN, NULL AS Yahoo, NULL AS AIM, NULL AS ICQ, 0 AS TotalPosts, NULL AS AvatarURL, 0 AS TimeOffsetHours, NULL AS [Signature], aspnet_Membership.CreateDate AS DateCreated, aspnet_Membership.UserId AS userGUID, NULL AS Skin, 0 AS IsDeleted, aspnet_Users.LastActivityDate AS LastActivityDate, aspnet_Membership.LastLoginDate AS LastLoginDate, NULL AS LastPasswordChangedDate, NULL AS LastLockoutDate, 0 AS FailedPasswordAttemptCount, NULL AS FailedPwdAttemptWindowStart, 0 AS FailedPwdAttemptCount, NULL AS FailedPwdAnswerWindowStart, aspnet_Membership.IsLockedOut AS IsLockedOut, NULL AS MobilePin, NULL AS PasswordSalt, NULL AS Comment, NULL AS OpenIDURI, NULL AS WindowsLiveID, '77C33D82-D6F0-49ED-95A7-84C11919AD94' AS SiteGUID, NULL AS TotalRevenue, userInfo.ForeName AS FirstName, userInfo.Surname AS LastName, aspnet_Users.Username as Pwd, 1 AS MustChangePassword, NULL AS NewEmail, NULL AS EditorPreference, '00000000-0000-0000-0000-000000000000' AS EmailChangeGuid, NULL AS TimeZoneID, '00000000-0000-0000-0000-000000000000' AS PasswordResetGuid FROM %database%aspnet_Membership INNER JOIN %database %aspnet_Users ON aspnet_Membership.UserId=aspnet_Users.UserId INNER JOIN %database%userInfo on aspnet_Membership.UserId=userInfo.userId INNER JOIN %database%aspnet_UsersInRoles ON aspnet_Membership.UserId=aspnet_UsersInRoles.UserId INNER JOIN %database%aspnet_Roles ON aspnet_UsersInRoles.RoleId = aspnet_Roles.RoleId" queryout %dataDir%lharUsers.txt %switches% %login% -o output/usersOutput.txt</p>

<p>bcp "select RoleName,UserId from %database%aspnet_Roles INNER JOIN %database%aspnet_UsersInRoles on aspnet_Roles.RoleId=aspnet_UsersInRoles.RoleId" queryout %dataDir%lharUsersRoles.txt %switches% %login% -o output/userRolesOutput.txt</p>

<p>bcp "SELECT newid() AS PropertyID, UserId AS userGUID, <strong>[String to use as MojoPortal PropertyName]</strong> AS PropertyName, Title AS PropertyValueString, NULL AS PropertyValueBinary, GETDATE() AS LastUpdatedDate, 0 AS IsLazyLoaded FROM %database%UserInfo<br />
<strong>UNION ALL</strong><br />
SELECT newid() AS PropertyID, UserId AS userGUID, <strong>[String to use as MojoPortal PropertyName]</strong> AS PropertyName, Title AS PropertyValueString, NULL AS PropertyValueBinary, GETDATE() AS LastUpdatedDate, 0 AS IsLazyLoaded FROM %database%UserInfo" queryout %dataDir%lharUserProfiles.txt %switches% %login% -o output/userPropertiesOutput.txt</p>

<p>&nbsp;</p>

<h2>ImportMojoPortalUserData.bat</h2>

<p>set login=-U <strong>[Username]</strong> -P <strong>[Password]</strong> -S <strong>[SQL Server Instance]</strong><br />
set database=<strong>[Databasename].[Schema].</strong><br />
set dataDir=<strong>[Full path to data directory with trailing slash]</strong><br />
set switches= -k -R<br />
set formatDir=<strong>[Full path to outputs directory with trailing slash]</strong></p>

<p>bcp %database%mp_users IN %dataDir%lharUsers.txt %login% %switches% -f %formatDir%mojoUsers.xml -o output/importUsers.txt<br />
bcp %database%mp_userProperties IN %dataDir%lharUserProfiles.txt %login% %switches% -f %formatDir%mojoUserProperties.xml -o output/importUserProperties.txt<br />
bcp %database%mp_userRoles IN %dataDir%lharUsersRoles.txt %login% %switches% -f %formatDir%mp_userRoles.xml -o output/importUserRoles.txt</p>
<br /><a href='https://www.esdm.co.uk/transferring-user-accounts-from-aspnet-to-mojoportal'></a>&nbsp;&nbsp;<a href='https://www.esdm.co.uk/transferring-user-accounts-from-aspnet-to-mojoportal'>...</a>]]></description>
      <link>https://www.esdm.co.uk/transferring-user-accounts-from-aspnet-to-mojoportal</link>
      <author>()</author>
      <comments>https://www.esdm.co.uk/transferring-user-accounts-from-aspnet-to-mojoportal</comments>
      <guid isPermaLink="true">https://www.esdm.co.uk/transferring-user-accounts-from-aspnet-to-mojoportal</guid>
      <pubDate>Mon, 04 Mar 2013 13:32:00 GMT</pubDate>
    </item>
    <item>
      <title>How to set the spell checking language in CKEditor as used in mojoPortal</title>
      <description><![CDATA[<p>mojoPortal uses either CKEditor or TinyMCE as the default HTML editor. We tend to use CKEditor.</p>

<p><img alt="CKEditor toolbars in mojoPortal" border="0" height="95" src="https://www.esdm.co.uk/Data/Sites/1/media/wlw/image_34.png" style="border: 0px currentColor; padding-top: 0px; padding-right: 0px; padding-left: 0px; display: inline; background-image: none;" title="CKEditor toolbars in mojoPortal" width="640" /></p>

<p>The default configuration is American English. To change this in such a way that mojoPortal upgrades don't revert it back again, first configure the site to use a custom configuration file for CKEditor. Do this by first copying the default configuration file, found here: /ClientScript/ckeditor-mojoconfig.js, to create a new version (either in the same folder or anywhere else; any new file will not be overwritten in mojoPortal upgrades). Then add this setting to user.config:</p>

<p>&lt;add key="CKEditor:ConfigPath" value="~/ckeditor-mycustomconfig.js"/&gt; (this example presumes you have out the config file into the site root folder).</p>

<p>Then touch web.config to reload the settings.</p>

<p>Now you can edit the settings in the new file, to change the language (also to customize the toolbars etc, but that's another story).</p>

<p>To make the SCAYT (spell check as you type) function use British English, add this line into the main body of settings:</p>

<pre>
config.scayt_sLang = 'en_GB';</pre>

<p>And to make the "Check Spelling" tool use British English by default, set this:</p>

<pre>
config.wsc_lang = 'en_GB';</pre>

<p>Incidentally, since SCAYT often causes the editor to behave badly, I like to switch it off by default with this setting:</p>

<pre>
config.scayt_autoStartup = false;</pre>

<p>Finally, beware of caching when changing these settings. I kept finding that making a change didn’t work, but I think the CKEditor javaScript was being cached in the browser.&nbsp; In IE9, use F12 &gt; Cache &gt; Clear browser cache for this domain, plus I like to tick “Always refresh from server” to make sure.</p>
<br /><a href='https://www.esdm.co.uk/how-to-set-the-spell-checking-language-in-ckeditor-as-used-in-mojoportal'>Crispin Flower</a>&nbsp;&nbsp;<a href='https://www.esdm.co.uk/how-to-set-the-spell-checking-language-in-ckeditor-as-used-in-mojoportal'>...</a>]]></description>
      <link>https://www.esdm.co.uk/how-to-set-the-spell-checking-language-in-ckeditor-as-used-in-mojoportal</link>
      <author>crispin.flower@idoxgroup.com (Crispin Flower)</author>
      <comments>https://www.esdm.co.uk/how-to-set-the-spell-checking-language-in-ckeditor-as-used-in-mojoportal</comments>
      <guid isPermaLink="true">https://www.esdm.co.uk/how-to-set-the-spell-checking-language-in-ckeditor-as-used-in-mojoportal</guid>
      <pubDate>Thu, 14 Feb 2013 09:20:00 GMT</pubDate>
    </item>
    <item>
      <title>How to avoid version dependency when developing mojoPortal custom features</title>
      <description><![CDATA[<p>
	When developing custom modules for mojoPortal, the standard guidance (e.g. see <a href="http://www.mojoportal.com/developmentonwindows.aspx">http://www.mojoportal.com/developmentonwindows.aspx</a>) is to develop against the latest source code. However we have found that a) this leads to slow build times as you are compiling the entire project each time, and b) the resulting module DLLs will only run with the exact referenced mojoPortal DLLs (which have to be deployed into the live site along with the custom module). This means that the live site then cannot be upgraded to the latest deployed release of mojoPortal without also recompiling the custom modules, and redeploying the custom DLLs plus the newly built core DLLs. We are finding that life becomes much easier if you&nbsp;use one of these two methods:</p>
<ul>
	<li>
		Download&nbsp; the latest mojoPortal deployment files and reference the relevant dll’s from your project.</li>
	<li>
		Download the latest mojoPortal source code, build it and then reference the relevant dll’s from your project.</li>
</ul>
<p>
	Check the properties of these references and ensure that ‘specific version = false’.</p>
<p>
	This means that ths custom modules can then be dropped into any deployed mojoPortal site, regardless of version. Well nearly...</p>
<p>
	The only gotcha I found is when your project references a different version of the same strongly named assembly that mojoPortal does, e.g. AjaxControlToolkit.&nbsp; You’ll have to change your project to reference the same version as mojoPortal or, if you’re building against the source code rather than deployment build you could rebuild mojoPortal with the dll that your project references.</p>
<br /><a href='https://www.esdm.co.uk/how-to-avoid-version-dependency-when-developing-mojoportal-custom-features'>Stewart Bellamy</a>&nbsp;&nbsp;<a href='https://www.esdm.co.uk/how-to-avoid-version-dependency-when-developing-mojoportal-custom-features'>...</a>]]></description>
      <link>https://www.esdm.co.uk/how-to-avoid-version-dependency-when-developing-mojoportal-custom-features</link>
      <author>stewartb@esdm.co.uk (Stewart Bellamy)</author>
      <comments>https://www.esdm.co.uk/how-to-avoid-version-dependency-when-developing-mojoportal-custom-features</comments>
      <guid isPermaLink="true">https://www.esdm.co.uk/how-to-avoid-version-dependency-when-developing-mojoportal-custom-features</guid>
      <pubDate>Mon, 18 Jun 2012 12:51:00 GMT</pubDate>
    </item>
    <item>
      <title>Revealed: the Identity of the ApplicationPoolIdentity</title>
      <description><![CDATA[<p>While setting up a new <a title="mojoPortal" href="http://www.mojoportal.com" target="_blank">mojoPortal</a> site I tried our running the application pool with the identity “ApplicationPoolIdentity”. Previously we have tended to create a specific user account for each site (with each site running in its own app pool). An advantage of that approach was that we could see in Task Manager what CPU and memory was being used by each site, because the the w3wp.exe process showed as the specific user account. When switched to run as ApplicationPoolIdentity, the process appears to run as a user named the same as the application pool, so all good there.</p> <p>Aside: the problem with running an application pool under its own user account is that MapServer CGI will not run within the site – I’ve no idea why, though it must be a permissions issue. When the app pool runs as ApplicationPoolIdentity then MapServer works fine.</p> <p>As you’ll see from a previous post about <a href="http://www.esdmdata.co.uk/how-to-set-up-a-new-mojoportal-site-in-10-minutes" target="_blank">how to install a mojoPortal site</a>, it is necessary to secure the web site folders. When I came to do this I found there was no user account called ApplicationPoolIdentity, and no user with the name of the application pool either.</p> <p><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://www.esdm.co.uk/Data/Sites/1/media/wlw/image_10.png" width="217" height="244"></p> <p>It turns out there is a virtual user account, and it can be entered as</p> <p>IIS APPPOOL\ApplicationPoolName&nbsp; (obviously replacing ApplicationPoolName as appropriate):</p> <p><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://www.esdm.co.uk/Data/Sites/1/media/wlw/image_11.png" width="244" height="132"></p> <p>Folder permissions can then be granted/revoked for this user.</p><br /><a href='https://www.esdm.co.uk/revealed-the-identity-of-the-applicationpoolidentity'>Crispin Flower</a>&nbsp;&nbsp;<a href='https://www.esdm.co.uk/revealed-the-identity-of-the-applicationpoolidentity'>...</a>]]></description>
      <link>https://www.esdm.co.uk/revealed-the-identity-of-the-applicationpoolidentity</link>
      <author>crispin.flower@idoxgroup.com (Crispin Flower)</author>
      <comments>https://www.esdm.co.uk/revealed-the-identity-of-the-applicationpoolidentity</comments>
      <guid isPermaLink="true">https://www.esdm.co.uk/revealed-the-identity-of-the-applicationpoolidentity</guid>
      <pubDate>Fri, 08 Jun 2012 06:58:55 GMT</pubDate>
    </item>
    <item>
      <title>How to set up a new mojoPortal site in 10 minutes</title>
      <description><![CDATA[<p>OK you had better have a .Net 4 IIS server and a SQL server already, or this is not going to work. And if sharing the web server with other sites, you should have a host name configured and pointing at the web server. But if you do, then it really is this easy…</p>

<h3>Creating the site</h3>

<ol>
	<li>Download the latest release from <a href="https://www.mojoportal.com/download">https://www.mojoportal.com/download</a></li>
	<li>Unpack the zip and find the wwwroot folder. Copy the contents to wherever you want your web site files.</li>
	<li>On your SQL Server create an empty database, and give a login dbowner access to it.</li>
	<li>In the web site folder, rename user.config.sample to user.config and alter the MSSQLConnectionString to point at your new database. Better still copy in a user.config from another working site and adjust.</li>
	<li>In IIS Manager, we like to create a dedicated application pool per site:<br />
	<a href="https://www.esdm.co.uk/Data/Sites/1/media/wlw/image.png"><img alt="image" border="0" height="222" src="https://www.esdm.co.uk/Data/Sites/1/media/wlw/image_thumb_2.png" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px; border-top-width: 0px" title="image" width="244" /></a></li>
	<li>Then create a web site:<br />
	<a href="https://www.esdm.co.uk/Data/Sites/1/media/wlw/image_1.png"><img alt="image" border="0" height="240" src="https://www.esdm.co.uk/Data/Sites/1/media/wlw/image_thumb_3.png" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px; border-top-width: 0px" title="image" width="244" /></a></li>
	<li>On a PC, browse to your web site… you should see lots of messages appear like this:<br />
	Welcome to mojoPortal Setup<br />
	Probing system...<br />
	File system permissions ok.<br />
	MSSQL database connection ok.<br />
	database permissions are sufficient to alter schema.<br />
	database initial schema needs to be created.<br />
	Running script mojoportal-core - 2.3.4.8 - 00:00:00.0700000<br />
	Running script mojoportal-core - 2.3.4.9 - 00:00:03.2250000<br />
	Running script mojoportal-core - 2.3.5.0 - 00:00:03.2820000<br />
	Running script mojoportal-core - 2.3.5.1 - 00:00:03.3130000<br />
	etc etc</li>
	<li>Your site should now be up and running. Assuming it is, there are a couple more things to do to secure the site.</li>
</ol>

<h3>Securing the site</h3>

<ol>
	<li>Sign in as <a href="mailto:admin@admin.com">admin@admin.com</a> / admin</li>
	<li>Got to Administration &gt; Security Advisor – it will be warning you about the machine key. Click “Generate a new key”, copy the result, and paste it into your web.config on the web server (replacing the existing machine key – search the file for “machineKey”). This will make your site restart so you will have to log in again.</li>
	<li>Next visit the “Member List” page (using the link at the top of the page), and click “Add new user”. Create a new account for yourself, and after clicking “Create User” go to “Role Membership” and add the new account to the Administrators role. Sign out, and sign in again with your new account.</li>
	<li>Go to the Member List, “Manage” the “Admin” account, and delete it.</li>
	<li>Go to Administration &gt; Site Settings &gt; Security, and change the password format from “Clear Text in DB” to “Hashed in DB…”</li>
	<li>Screw down the permission on the web site folders <a href="http://www.mojoportal.com/securing-the-file-system.aspx" target="_blank">as instructed here</a>. We like to make the application pool run under a specific user account, then give this account the permissions described.</li>
</ol>

<p>That’s it – you have a secure mojoPortal web site.</p>

<h3>Useful settings</h3>

<p>We like to add the following settings to user.config (remembering to touch web.config to make these take effect):</p>

<pre class="csharpcode">
    <span class="rem">&lt;!-- to allow extensionless URLs --&gt;</span>
    <span class="kwrd">&lt;</span><span class="html">add</span> <span class="attr">key</span><span class="kwrd">="AllowChangingFriendlyUrlPattern"</span> <span class="attr">value</span><span class="kwrd">="true"</span> <span class="kwrd">/&gt;</span>
    <span class="rem">&lt;!-- Set these to false during design work --&gt;</span>
    <span class="kwrd">&lt;</span><span class="html">add</span> <span class="attr">key</span><span class="kwrd">="CacheCssOnServer"</span> <span class="attr">value</span><span class="kwrd">="false"</span><span class="kwrd">/&gt;</span>
    <span class="kwrd">&lt;</span><span class="html">add</span> <span class="attr">key</span><span class="kwrd">="CacheCssInBrowser"</span> <span class="attr">value</span><span class="kwrd">="false"</span><span class="kwrd">/&gt;</span>
    <span class="rem">&lt;!-- To prevent startup scripts running. Change to false when upgrading mojo --&gt;</span>
    <span class="kwrd">&lt;</span><span class="html">add</span> <span class="attr">key</span><span class="kwrd">="DisableSetup"</span> <span class="attr">value</span><span class="kwrd">="true"</span> <span class="kwrd">/&gt;</span>
    <span class="rem">&lt;!-- make sure admins put content files in same place as non-admins --&gt;</span>
    <span class="kwrd">&lt;</span><span class="html">add</span> <span class="attr">key</span><span class="kwrd">="ForceAdminsToUseMediaFolder"</span> <span class="attr">value</span><span class="kwrd">="true"</span> <span class="kwrd">/&gt;</span>
    <span class="kwrd">&lt;</span><span class="html">add</span> <span class="attr">key</span><span class="kwrd">="AllowForcingPreferredHostName"</span> <span class="attr">value</span><span class="kwrd">="true"</span> <span class="kwrd">/&gt;</span>
    <span class="rem">&lt;!-- EMAIL --&gt;</span>
    <span class="kwrd">&lt;</span><span class="html">add</span> <span class="attr">key</span><span class="kwrd">="DisableDotNetOpenMail"</span> <span class="attr">value</span><span class="kwrd">="true"</span> <span class="kwrd">/&gt;</span>
    <span class="kwrd">&lt;</span><span class="html">add</span> <span class="attr">key</span><span class="kwrd">="SMTPServer"</span> <span class="attr">value</span><span class="kwrd">="myserver"</span> <span class="kwrd">/&gt;</span>
    <span class="kwrd">&lt;</span><span class="html">add</span> <span class="attr">key</span><span class="kwrd">="SMTPRequiresAuthentication"</span> <span class="attr">value</span><span class="kwrd">="true"</span> <span class="kwrd">/&gt;</span>
    <span class="kwrd">&lt;</span><span class="html">add</span> <span class="attr">key</span><span class="kwrd">="SMTPUseSsl"</span> <span class="attr">value</span><span class="kwrd">="false"</span> <span class="kwrd">/&gt;</span>
    <span class="kwrd">&lt;</span><span class="html">add</span> <span class="attr">key</span><span class="kwrd">="SMTPPort"</span> <span class="attr">value</span><span class="kwrd">="25"</span> <span class="kwrd">/&gt;</span>
    <span class="kwrd">&lt;</span><span class="html">add</span> <span class="attr">key</span><span class="kwrd">="SMTPUser"</span> <span class="attr">value</span><span class="kwrd">="mymailserver"</span> <span class="kwrd">/&gt;</span>
    <span class="kwrd">&lt;</span><span class="html">add</span> <span class="attr">key</span><span class="kwrd">="SMTPPassword"</span> <span class="attr">value</span><span class="kwrd">="mypassword"</span> <span class="kwrd">/&gt;</span>
    <span class="kwrd">&lt;</span><span class="html">add</span> <span class="attr">key</span><span class="kwrd">="SMTPTimeoutInMilliseconds"</span> <span class="attr">value</span><span class="kwrd">="30000"</span> <span class="kwrd">/&gt;</span>
    <span class="rem">&lt;!-- Leave this blank for ASCII encoding. Allowed values are utf-8, utf-32, and unicode --&gt;</span>
    <span class="kwrd">&lt;</span><span class="html">add</span> <span class="attr">key</span><span class="kwrd">="SmtpPreferredEncoding"</span> <span class="attr">value</span><span class="kwrd">=""</span><span class="kwrd">/&gt;</span>
    <span class="rem">&lt;!-- END EMAIL --&gt;</span></pre>
<style type="text/css">.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
</style>
<style type="text/css">.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
</style>
<h3>Skinning the site</h3>

<p>Big topic, with plenty of guidance on <a href="http://www.mojoportal.com">www.mojoportal.com</a>, and we are now going over the 10 minutes! The easiest way to get started is to choose the shipped skin that is closest to your layout/behaviour requirements, clone this skin, then work on the CSS, layout.master and graphics. We usually review the extra skins that are available for each mojoPortal release (as well as the ones in the release folders). These are also found on the Codeplex download page (see above) as “extra-skins.zip”. If you drop the unzipped skin folders into \Data\skins in your web site folder they will be available for all child sites. If you have already create a site, you can drop them into \Data\Sites\N\skins (where N is the number of your site).</p>
<br /><a href='https://www.esdm.co.uk/how-to-set-up-a-new-mojoportal-site-in-10-minutes'>Crispin Flower</a>&nbsp;&nbsp;<a href='https://www.esdm.co.uk/how-to-set-up-a-new-mojoportal-site-in-10-minutes'>...</a>]]></description>
      <link>https://www.esdm.co.uk/how-to-set-up-a-new-mojoportal-site-in-10-minutes</link>
      <author>crispin.flower@idoxgroup.com (Crispin Flower)</author>
      <comments>https://www.esdm.co.uk/how-to-set-up-a-new-mojoportal-site-in-10-minutes</comments>
      <guid isPermaLink="true">https://www.esdm.co.uk/how-to-set-up-a-new-mojoportal-site-in-10-minutes</guid>
      <pubDate>Sat, 14 Jan 2012 23:08:00 GMT</pubDate>
    </item>
    <item>
      <title>Trying out Multi-Mechanize web performance and load testing framework</title>
      <description><![CDATA[<p>
	Information and download from <strike><a href="http://code.google.com/p/multi-mechanize/" title="http://code.google.com/p/multi-mechanize/">http://code.google.com/p/multi-mechanize/</a></strike></p>
<p>
	UPDATE 14th March 2012: now moved to <a href="http://testutils.org/multi-mechanize"><font color="#0066cc">http://testutils.org/multi-mechanize</font></a></p>
<blockquote>
	<p>
		Multi-Mechanize is an open source framework for API performance and load testing. It allows you to run simultaneous python scripts to generate load (synthetic transactions) against a web site or API/service.&nbsp;</p>
	<p>
		In your scripts, you have the convenience of mechanize along with the power of the full Python programming language at your disposal. You programmatically create test scripts to simulate virtual user activity. Your scripts will then generate HTTP requests to intelligently navigate a web site or send requests to a web service.</p>
	<p>
		…</p>
	<p>
		You should be proficient with Python, HTTP, and performance/load testing to use multi-mechanize successfully.</p>
</blockquote>
<h3>
	Installing Multi-Mechanize</h3>
<p>
	First time around I got this horribly wrong, probably through not being proficient with…. actually my problem was installing Python 3.2 for Windows 64 bit; it turns out Multi-Mechanize only works with Python 2.6 and 2.7, and if you install the wrong version you get loads of syntax error messages; so I had to start again. Here is the correct sequence:</p>
<ol>
	<li>
		First install Python 2.7<br />
		<a href="http://www.python.org/download/releases/2.7.2/" title="http://www.python.org/download/releases/2.7.2/">http://www.python.org/download/releases/2.7.2/</a>&nbsp;<br />
		specifically<br />
		<a href="http://www.python.org/ftp/python/2.7.2/python-2.7.2.amd64.msi">Windows X86-64 MSI Installer (2.7.2)</a> <a href="http://www.python.org/download/releases/2.7.2/#id5">[1]</a><a href="http://www.python.org/download/releases/2.7.2/python-2.7.2.amd64.msi.asc">(sig)</a></li>
	<li>
		To install mechanize, download<br />
		<a href="http://pypi.python.org/pypi/distribute#distribute-setup-py" title="http://pypi.python.org/pypi/distribute#distribute-setup-py">http://pypi.python.org/pypi/distribute#distribute-setup-py</a>&nbsp;<br />
		and run&nbsp;<br />
		C:\Python27\python C:\blah\Downloads\distribute_setup.py<br />
		then<br />
		C:\Python27\scripts\easy_install mechanize</li>
	<li>
		Install Numpy from <a href="http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy" title="http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy">http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy</a>&nbsp;<br />
		specifically <a href="http://www.lfd.uci.edu/~gohlke/pythonlibs/">numpy-MKL-1.6.1.win-amd64-py2.7.‌exe</a> [8.7 MB] [Python 2.7] [64 bit] [Oct 29, 2011]</li>
	<li>
		Then install Matplotlib from <a href="http://www.lfd.uci.edu/~gohlke/pythonlibs/#matplotlib" title="http://www.lfd.uci.edu/~gohlke/pythonlibs/#matplotlib">http://www.lfd.uci.edu/~gohlke/pythonlibs/#matplotlib</a>&nbsp;<br />
		specifically <a href="http://www.lfd.uci.edu/~gohlke/pythonlibs/">matplotlib-1.1.0.win-amd64-py2.7.‌exe</a> [4.4 MB] [Python 2.7] [64 bit] [Oct 06, 2011]</li>
	<li>
		Finally download Multi-Mechanize<br />
		<a href="http://code.google.com/p/multi-mechanize/downloads/list" title="http://code.google.com/p/multi-mechanize/downloads/list">http://code.google.com/p/multi-mechanize/downloads/list</a><br />
		and copy the unzipped folder somewhere (no installation).</li>
</ol>
<h3>
	Using Multi-Mechanize</h3>
<p>
	It’s pretty simple. Use a command like this to start a session:</p>
<p>
	&gt;c:\python27\python multi-mechanize.py testMySite</p>
<p>
	This refers to a “project” (in this case “testMySite”) which is a folder under \projects under your Multi-Mechanize folder.&nbsp; To create a project I just copied and adapted the “default_project” that came in the download.</p>
<p>
	In the project folder there is a config.cfg text file that specifies some global settings and some details about what scripts to run on and how many simultaneous sessions to run. There is some sparse information on the config settings here: <a href="http://code.google.com/p/multi-mechanize/wiki/ConfigFile" title="http://code.google.com/p/multi-mechanize/wiki/ConfigFile">http://code.google.com/p/multi-mechanize/wiki/ConfigFile</a></p>
<p>
	You can specify any number of “user groups”, each representing one sequence of actions on your web site/service (e.g. loading the home page, or executing a search). Each user group is associated with a python script defining the actions. Each user group has a number of threads, i.e. virtual users attempting the sequence of operations.</p>
<p>
	TODO: insert some information about the actual Python script - how to perform simple and more complex operations on a web site.</p>
<p>
	The global settings include how long to run the test for, the time series interval for results analysis, and how long to “rampup” the number of users, presumably from one up to the maximum number of threads specified in the user groups. The ramp-up is to see within one test how the site performs under low and then progressively higher loads.</p>
<p>
	The results of the test are output into a folder below the project, with a time-stamped name like \results\results_2011.12.27_16.32.07</p>
<p>
	This contains the raw results as CSV, plus some graphs as PNG images, and an HTML page that brings the numbers and images together into a report.</p>
<h3>
	Example tests</h3>
<p>
	I ran simple tests on the following sites:</p>
<ul>
	<li>
		<a href="http://www.esdm.co.uk">www.esdm.co.uk</a> (main exeGesIS web site built in DotNetNuke and running on one of our older Telehouse servers)</li>
	<li>
		<a href="http://www.esdm.no-ip.co.uk">www.esdm.no-ip.co.uk</a> (draft replacement exeGesIS web site built in mojoPortal and running on our newer Telehouse hosting stack)</li>
	<li>
		<a href="http://www.breconfans.org.uk">www.breconfans.org.uk</a> (a site I run at home, using mojoPortal on Arvixe hosting)</li>
	<li>
		<a href="http://www.wikipedia.org">www.wikipedia.org</a> (a high availability global site as a control)</li>
</ul>
<p>
	The test script simply loaded the home page and checked for some text on the page. I tested with two user groups undertaking the same actions, with 50 virtual users in each, ramping up throughout the 5 minute test period.</p>
<h3>
	www.esdm.co.uk</h3>
<h4>
	Timer Summary (secs)</h4>
<table>
	<tbody>
		<tr>
			<th>
				count</th>
			<th>
				min</th>
			<th>
				avg</th>
			<th>
				80pct</th>
			<th>
				90pct</th>
			<th>
				95pct</th>
			<th>
				max</th>
			<th>
				stdev</th>
		</tr>
		<tr>
			<td>
				1088</td>
			<td>
				0.480</td>
			<td>
				12.897</td>
			<td>
				19.550</td>
			<td>
				23.866</td>
			<td>
				28.932</td>
			<td>
				88.588</td>
			<td>
				9.897</td>
		</tr>
	</tbody>
</table>
<h4>
	Interval Details (secs)</h4>
<table>
	<tbody>
		<tr>
			<th>
				interval</th>
			<th>
				count</th>
			<th>
				rate</th>
			<th>
				min</th>
			<th>
				avg</th>
			<th>
				80pct</th>
			<th>
				90pct</th>
			<th>
				95pct</th>
			<th>
				max</th>
			<th>
				stdev</th>
		</tr>
		<tr>
			<td>
				1</td>
			<td>
				105</td>
			<td>
				3.50</td>
			<td>
				0.480</td>
			<td>
				1.613</td>
			<td>
				2.120</td>
			<td>
				2.290</td>
			<td>
				2.630</td>
			<td>
				4.190</td>
			<td>
				0.711</td>
		</tr>
		<tr>
			<td>
				2</td>
			<td>
				82</td>
			<td>
				2.73</td>
			<td>
				1.992</td>
			<td>
				4.856</td>
			<td>
				6.574</td>
			<td>
				8.324</td>
			<td>
				9.834</td>
			<td>
				11.624</td>
			<td>
				2.251</td>
		</tr>
		<tr>
			<td>
				3</td>
			<td>
				101</td>
			<td>
				3.37</td>
			<td>
				3.000</td>
			<td>
				6.962</td>
			<td>
				9.360</td>
			<td>
				11.960</td>
			<td>
				13.194</td>
			<td>
				14.610</td>
			<td>
				3.095</td>
		</tr>
		<tr>
			<td>
				4</td>
			<td>
				110</td>
			<td>
				3.67</td>
			<td>
				2.830</td>
			<td>
				9.231</td>
			<td>
				12.650</td>
			<td>
				17.330</td>
			<td>
				18.070</td>
			<td>
				30.890</td>
			<td>
				4.900</td>
		</tr>
		<tr>
			<td>
				5</td>
			<td>
				89</td>
			<td>
				2.97</td>
			<td>
				4.964</td>
			<td>
				13.425</td>
			<td>
				17.822</td>
			<td>
				20.912</td>
			<td>
				22.222</td>
			<td>
				28.932</td>
			<td>
				5.095</td>
		</tr>
		<tr>
			<td>
				6</td>
			<td>
				114</td>
			<td>
				3.80</td>
			<td>
				4.912</td>
			<td>
				14.126</td>
			<td>
				18.792</td>
			<td>
				22.286</td>
			<td>
				24.210</td>
			<td>
				48.924</td>
			<td>
				7.163</td>
		</tr>
		<tr>
			<td>
				7</td>
			<td>
				117</td>
			<td>
				3.90</td>
			<td>
				4.670</td>
			<td>
				14.342</td>
			<td>
				18.290</td>
			<td>
				20.986</td>
			<td>
				23.958</td>
			<td>
				58.470</td>
			<td>
				6.999</td>
		</tr>
		<tr>
			<td>
				8</td>
			<td>
				92</td>
			<td>
				3.07</td>
			<td>
				5.402</td>
			<td>
				19.430</td>
			<td>
				24.054</td>
			<td>
				28.328</td>
			<td>
				31.194</td>
			<td>
				51.860</td>
			<td>
				7.733</td>
		</tr>
		<tr>
			<td>
				9</td>
			<td>
				163</td>
			<td>
				5.43</td>
			<td>
				2.650</td>
			<td>
				17.628</td>
			<td>
				25.356</td>
			<td>
				31.604</td>
			<td>
				34.338</td>
			<td>
				88.588</td>
			<td>
				12.654</td>
		</tr>
		<tr>
			<td>
				10</td>
			<td>
				115</td>
			<td>
				3.83</td>
			<td>
				6.500</td>
			<td>
				22.619</td>
			<td>
				27.201</td>
			<td>
				33.947</td>
			<td>
				39.892</td>
			<td>
				86.551</td>
			<td>
				11.353</td>
		</tr>
	</tbody>
</table>
<h4>
	Graphs</h4>
<h6>
	Response Time: 30 sec time-series</h6>
<p>
	<a href="https://www.esdm.co.uk/Data/Sites/1/media/wlw/load_homepage_response_times_intervals%5B6%5D.png"><img alt="Load_Homepage_response_times_intervals[6]" border="0" height="103" src="https://www.esdm.co.uk/Data/Sites/1/media/wlw/load_homepage_response_times_intervals%5B6%5D_thumb.png" style="border-width: 0px; padding-top: 0px; padding-right: 0px; padding-left: 0px; display: inline; background-image: none;" title="Load_Homepage_response_times_intervals[6]" width="244" /></a></p>
<h6>
	Response Time: raw data (all points)</h6>
<p>
	<a href="https://www.esdm.co.uk/Data/Sites/1/media/wlw/load_homepage_response_times%5B6%5D.png"><img alt="Load_Homepage_response_times[6]" border="0" height="103" src="https://www.esdm.co.uk/Data/Sites/1/media/wlw/load_homepage_response_times%5B6%5D_thumb.png" style="border-width: 0px; margin: 0px; padding-top: 0px; padding-right: 0px; padding-left: 0px; display: inline; background-image: none;" title="Load_Homepage_response_times[6]" width="244" /></a></p>
<h6>
	Throughput: 30 sec time-series</h6>
<p>
	<a href="https://www.esdm.co.uk/Data/Sites/1/media/wlw/load_homepage_throughput%5B6%5D.png"><img alt="Load_Homepage_throughput[6]" border="0" height="103" src="https://www.esdm.co.uk/Data/Sites/1/media/wlw/load_homepage_throughput%5B6%5D_thumb.png" style="border-width: 0px; padding-top: 0px; padding-right: 0px; padding-left: 0px; display: inline; background-image: none;" title="Load_Homepage_throughput[6]" width="244" /></a></p>
<h3>
	www.esdm.no-ip.co.uk</h3>
<h4>
	Timer Summary (secs)</h4>
<table>
	<tbody>
		<tr>
			<th>
				count</th>
			<th>
				min</th>
			<th>
				avg</th>
			<th>
				80pct</th>
			<th>
				90pct</th>
			<th>
				95pct</th>
			<th>
				max</th>
			<th>
				stdev</th>
		</tr>
		<tr>
			<td>
				5105</td>
			<td>
				0.210</td>
			<td>
				2.914</td>
			<td>
				4.410</td>
			<td>
				5.954</td>
			<td>
				7.190</td>
			<td>
				27.443</td>
			<td>
				2.285</td>
		</tr>
	</tbody>
</table>
<h4>
	Interval Details (secs)</h4>
<table>
	<tbody>
		<tr>
			<th>
				interval</th>
			<th>
				count</th>
			<th>
				rate</th>
			<th>
				min</th>
			<th>
				avg</th>
			<th>
				80pct</th>
			<th>
				90pct</th>
			<th>
				95pct</th>
			<th>
				max</th>
			<th>
				stdev</th>
		</tr>
		<tr>
			<td>
				1</td>
			<td>
				518</td>
			<td>
				17.27</td>
			<td>
				0.210</td>
			<td>
				0.347</td>
			<td>
				0.410</td>
			<td>
				0.470</td>
			<td>
				0.520</td>
			<td>
				1.210</td>
			<td>
				0.119</td>
		</tr>
		<tr>
			<td>
				2</td>
			<td>
				599</td>
			<td>
				19.97</td>
			<td>
				0.300</td>
			<td>
				0.790</td>
			<td>
				1.110</td>
			<td>
				1.250</td>
			<td>
				1.320</td>
			<td>
				2.380</td>
			<td>
				0.322</td>
		</tr>
		<tr>
			<td>
				3</td>
			<td>
				473</td>
			<td>
				15.77</td>
			<td>
				0.960</td>
			<td>
				1.596</td>
			<td>
				1.920</td>
			<td>
				2.030</td>
			<td>
				2.332</td>
			<td>
				3.550</td>
			<td>
				0.399</td>
		</tr>
		<tr>
			<td>
				4</td>
			<td>
				528</td>
			<td>
				17.60</td>
			<td>
				1.020</td>
			<td>
				2.068</td>
			<td>
				2.410</td>
			<td>
				2.590</td>
			<td>
				2.742</td>
			<td>
				5.602</td>
			<td>
				0.505</td>
		</tr>
		<tr>
			<td>
				5</td>
			<td>
				504</td>
			<td>
				16.80</td>
			<td>
				1.250</td>
			<td>
				2.586</td>
			<td>
				3.020</td>
			<td>
				3.360</td>
			<td>
				3.550</td>
			<td>
				6.170</td>
			<td>
				0.713</td>
		</tr>
		<tr>
			<td>
				6</td>
			<td>
				461</td>
			<td>
				15.37</td>
			<td>
				2.314</td>
			<td>
				3.532</td>
			<td>
				4.204</td>
			<td>
				5.482</td>
			<td>
				6.124</td>
			<td>
				9.872</td>
			<td>
				1.253</td>
		</tr>
		<tr>
			<td>
				7</td>
			<td>
				406</td>
			<td>
				13.53</td>
			<td>
				2.670</td>
			<td>
				4.808</td>
			<td>
				6.440</td>
			<td>
				7.470</td>
			<td>
				8.340</td>
			<td>
				17.990</td>
			<td>
				2.107</td>
		</tr>
		<tr>
			<td>
				8</td>
			<td>
				556</td>
			<td>
				18.53</td>
			<td>
				2.080</td>
			<td>
				4.031</td>
			<td>
				5.340</td>
			<td>
				6.560</td>
			<td>
				8.332</td>
			<td>
				18.562</td>
			<td>
				2.157</td>
		</tr>
		<tr>
			<td>
				9</td>
			<td>
				506</td>
			<td>
				16.87</td>
			<td>
				1.960</td>
			<td>
				5.030</td>
			<td>
				6.570</td>
			<td>
				8.010</td>
			<td>
				9.734</td>
			<td>
				25.216</td>
			<td>
				2.685</td>
		</tr>
		<tr>
			<td>
				10</td>
			<td>
				554</td>
			<td>
				18.47</td>
			<td>
				2.050</td>
			<td>
				4.880</td>
			<td>
				6.540</td>
			<td>
				8.082</td>
			<td>
				8.882</td>
			<td>
				27.443</td>
			<td>
				2.432</td>
		</tr>
	</tbody>
</table>
<h4>
	Graphs</h4>
<h6>
	Response Time: 30 sec time-series</h6>
<p>
	<a href="https://www.esdm.co.uk/Data/Sites/1/media/wlw/load_homepage_response_times_intervals%5B4%5D.png"><img alt="Load_Homepage_response_times_intervals[4]" border="0" height="103" src="https://www.esdm.co.uk/Data/Sites/1/media/wlw/load_homepage_response_times_intervals%5B4%5D_thumb.png" style="border-width: 0px; margin: 0px; padding-top: 0px; padding-right: 0px; padding-left: 0px; display: inline; background-image: none;" title="Load_Homepage_response_times_intervals[4]" width="244" /></a></p>
<h6>
	Response Time: raw data (all points)</h6>
<p>
	<a href="https://www.esdm.co.uk/Data/Sites/1/media/wlw/load_homepage_response_times%5B4%5D.png"><img alt="Load_Homepage_response_times[4]" border="0" height="103" src="https://www.esdm.co.uk/Data/Sites/1/media/wlw/load_homepage_response_times%5B4%5D_thumb.png" style="border-width: 0px; margin: 0px; padding-top: 0px; padding-right: 0px; padding-left: 0px; display: inline; background-image: none;" title="Load_Homepage_response_times[4]" width="244" /></a></p>
<h6>
	Throughput: 30 sec time-series</h6>
<p>
	<a href="https://www.esdm.co.uk/Data/Sites/1/media/wlw/load_homepage_throughput%5B4%5D.png"><img alt="Load_Homepage_throughput[4]" border="0" height="103" src="https://www.esdm.co.uk/Data/Sites/1/media/wlw/load_homepage_throughput%5B4%5D_thumb.png" style="border-width: 0px; padding-top: 0px; padding-right: 0px; padding-left: 0px; display: inline; background-image: none;" title="Load_Homepage_throughput[4]" width="244" /></a></p>
<h3>
	www.breconfans.org.uk</h3>
<h4>
	Timer Summary (secs)</h4>
<table>
	<tbody>
		<tr>
			<th>
				count</th>
			<th>
				min</th>
			<th>
				avg</th>
			<th>
				80pct</th>
			<th>
				90pct</th>
			<th>
				95pct</th>
			<th>
				max</th>
			<th>
				stdev</th>
		</tr>
		<tr>
			<td>
				6710</td>
			<td>
				0.780</td>
			<td>
				2.218</td>
			<td>
				2.970</td>
			<td>
				4.620</td>
			<td>
				5.590</td>
			<td>
				16.120</td>
			<td>
				1.655</td>
		</tr>
	</tbody>
</table>
<h4>
	Interval Details (secs)</h4>
<table>
	<tbody>
		<tr>
			<th>
				interval</th>
			<th>
				count</th>
			<th>
				rate</th>
			<th>
				min</th>
			<th>
				avg</th>
			<th>
				80pct</th>
			<th>
				90pct</th>
			<th>
				95pct</th>
			<th>
				max</th>
			<th>
				stdev</th>
		</tr>
		<tr>
			<td>
				1</td>
			<td>
				220</td>
			<td>
				7.33</td>
			<td>
				0.780</td>
			<td>
				0.830</td>
			<td>
				0.850</td>
			<td>
				0.880</td>
			<td>
				0.890</td>
			<td>
				0.990</td>
			<td>
				0.031</td>
		</tr>
		<tr>
			<td>
				2</td>
			<td>
				500</td>
			<td>
				16.67</td>
			<td>
				0.790</td>
			<td>
				0.959</td>
			<td>
				1.020</td>
			<td>
				1.144</td>
			<td>
				1.420</td>
			<td>
				2.180</td>
			<td>
				0.216</td>
		</tr>
		<tr>
			<td>
				3</td>
			<td>
				703</td>
			<td>
				23.43</td>
			<td>
				0.874</td>
			<td>
				1.111</td>
			<td>
				1.200</td>
			<td>
				1.280</td>
			<td>
				1.400</td>
			<td>
				1.720</td>
			<td>
				0.153</td>
		</tr>
		<tr>
			<td>
				4</td>
			<td>
				761</td>
			<td>
				25.37</td>
			<td>
				0.980</td>
			<td>
				1.416</td>
			<td>
				1.620</td>
			<td>
				2.060</td>
			<td>
				2.120</td>
			<td>
				2.490</td>
			<td>
				0.356</td>
		</tr>
		<tr>
			<td>
				5</td>
			<td>
				857</td>
			<td>
				28.57</td>
			<td>
				1.080</td>
			<td>
				1.611</td>
			<td>
				1.810</td>
			<td>
				2.072</td>
			<td>
				2.430</td>
			<td>
				6.206</td>
			<td>
				0.556</td>
		</tr>
		<tr>
			<td>
				6</td>
			<td>
				982</td>
			<td>
				32.73</td>
			<td>
				0.940</td>
			<td>
				1.699</td>
			<td>
				1.720</td>
			<td>
				2.730</td>
			<td>
				3.240</td>
			<td>
				10.488</td>
			<td>
				0.778</td>
		</tr>
		<tr>
			<td>
				7</td>
			<td>
				628</td>
			<td>
				20.93</td>
			<td>
				1.250</td>
			<td>
				2.986</td>
			<td>
				4.340</td>
			<td>
				5.030</td>
			<td>
				5.600</td>
			<td>
				11.762</td>
			<td>
				1.473</td>
		</tr>
		<tr>
			<td>
				8</td>
			<td>
				693</td>
			<td>
				23.10</td>
			<td>
				1.450</td>
			<td>
				3.333</td>
			<td>
				4.870</td>
			<td>
				5.680</td>
			<td>
				7.000</td>
			<td>
				15.868</td>
			<td>
				1.905</td>
		</tr>
		<tr>
			<td>
				9</td>
			<td>
				663</td>
			<td>
				22.10</td>
			<td>
				1.680</td>
			<td>
				3.794</td>
			<td>
				5.150</td>
			<td>
				6.300</td>
			<td>
				7.600</td>
			<td>
				14.934</td>
			<td>
				1.986</td>
		</tr>
		<tr>
			<td>
				10</td>
			<td>
				703</td>
			<td>
				23.43</td>
			<td>
				1.660</td>
			<td>
				3.714</td>
			<td>
				5.390</td>
			<td>
				6.910</td>
			<td>
				7.900</td>
			<td>
				16.120</td>
			<td>
				2.171</td>
		</tr>
	</tbody>
</table>
<h4>
	Graphs</h4>
<h6>
	Response Time: 30 sec time-series</h6>
<p>
	<a href="https://www.esdm.co.uk/Data/Sites/1/media/wlw/load_homepage_response_times_intervals%5B8%5D.png"><img alt="Load_Homepage_response_times_intervals[8]" border="0" height="103" src="https://www.esdm.co.uk/Data/Sites/1/media/wlw/load_homepage_response_times_intervals%5B8%5D_thumb.png" style="border-width: 0px; margin: 0px; padding-top: 0px; padding-right: 0px; padding-left: 0px; display: inline; background-image: none;" title="Load_Homepage_response_times_intervals[8]" width="244" /></a></p>
<h6>
	Response Time: raw data (all points)</h6>
<p>
	<a href="https://www.esdm.co.uk/Data/Sites/1/media/wlw/load_homepage_response_times%5B8%5D.png"><img alt="Load_Homepage_response_times[8]" border="0" height="103" src="https://www.esdm.co.uk/Data/Sites/1/media/wlw/load_homepage_response_times%5B8%5D_thumb.png" style="border-width: 0px; margin: 0px; padding-top: 0px; padding-right: 0px; padding-left: 0px; display: inline; background-image: none;" title="Load_Homepage_response_times[8]" width="244" /></a></p>
<h6>
	Throughput: 30 sec time-series</h6>
<p>
	<a href="https://www.esdm.co.uk/Data/Sites/1/media/wlw/load_homepage_throughput%5B8%5D.png"><img alt="Load_Homepage_throughput[8]" border="0" height="103" src="https://www.esdm.co.uk/Data/Sites/1/media/wlw/load_homepage_throughput%5B8%5D_thumb.png" style="border-width: 0px; padding-top: 0px; padding-right: 0px; padding-left: 0px; display: inline; background-image: none;" title="Load_Homepage_throughput[8]" width="244" /></a></p>
<h3>
	www.wikipedia.org</h3>
<h4>
	Timer Summary (secs)</h4>
<table>
	<tbody>
		<tr>
			<th>
				count</th>
			<th>
				min</th>
			<th>
				avg</th>
			<th>
				80pct</th>
			<th>
				90pct</th>
			<th>
				95pct</th>
			<th>
				max</th>
			<th>
				stdev</th>
		</tr>
		<tr>
			<td>
				2748</td>
			<td>
				0.340</td>
			<td>
				4.880</td>
			<td>
				6.811</td>
			<td>
				9.970</td>
			<td>
				14.132</td>
			<td>
				98.597</td>
			<td>
				5.963</td>
		</tr>
	</tbody>
</table>
<h4>
	Interval Details (secs)</h4>
<table>
	<tbody>
		<tr>
			<th>
				interval</th>
			<th>
				count</th>
			<th>
				rate</th>
			<th>
				min</th>
			<th>
				avg</th>
			<th>
				80pct</th>
			<th>
				90pct</th>
			<th>
				95pct</th>
			<th>
				max</th>
			<th>
				stdev</th>
		</tr>
		<tr>
			<td>
				1</td>
			<td>
				278</td>
			<td>
				9.27</td>
			<td>
				0.340</td>
			<td>
				0.643</td>
			<td>
				0.780</td>
			<td>
				0.930</td>
			<td>
				0.970</td>
			<td>
				2.990</td>
			<td>
				0.264</td>
		</tr>
		<tr>
			<td>
				2</td>
			<td>
				269</td>
			<td>
				8.97</td>
			<td>
				0.570</td>
			<td>
				1.689</td>
			<td>
				2.240</td>
			<td>
				2.484</td>
			<td>
				3.030</td>
			<td>
				5.304</td>
			<td>
				0.796</td>
		</tr>
		<tr>
			<td>
				3</td>
			<td>
				239</td>
			<td>
				7.97</td>
			<td>
				1.944</td>
			<td>
				3.265</td>
			<td>
				4.040</td>
			<td>
				4.716</td>
			<td>
				5.542</td>
			<td>
				7.652</td>
			<td>
				1.096</td>
		</tr>
		<tr>
			<td>
				4</td>
			<td>
				303</td>
			<td>
				10.10</td>
			<td>
				0.750</td>
			<td>
				3.182</td>
			<td>
				4.310</td>
			<td>
				5.482</td>
			<td>
				7.074</td>
			<td>
				18.540</td>
			<td>
				2.366</td>
		</tr>
		<tr>
			<td>
				5</td>
			<td>
				293</td>
			<td>
				9.77</td>
			<td>
				0.880</td>
			<td>
				4.424</td>
			<td>
				6.282</td>
			<td>
				7.574</td>
			<td>
				9.214</td>
			<td>
				26.812</td>
			<td>
				3.156</td>
		</tr>
		<tr>
			<td>
				6</td>
			<td>
				297</td>
			<td>
				9.90</td>
			<td>
				0.960</td>
			<td>
				5.225</td>
			<td>
				7.410</td>
			<td>
				10.330</td>
			<td>
				14.050</td>
			<td>
				29.854</td>
			<td>
				4.526</td>
		</tr>
		<tr>
			<td>
				7</td>
			<td>
				290</td>
			<td>
				9.67</td>
			<td>
				0.830</td>
			<td>
				6.111</td>
			<td>
				8.510</td>
			<td>
				12.400</td>
			<td>
				15.470</td>
			<td>
				43.068</td>
			<td>
				5.177</td>
		</tr>
		<tr>
			<td>
				8</td>
			<td>
				252</td>
			<td>
				8.40</td>
			<td>
				0.930</td>
			<td>
				7.125</td>
			<td>
				9.380</td>
			<td>
				13.642</td>
			<td>
				21.808</td>
			<td>
				62.750</td>
			<td>
				6.843</td>
		</tr>
		<tr>
			<td>
				9</td>
			<td>
				278</td>
			<td>
				9.27</td>
			<td>
				0.870</td>
			<td>
				8.470</td>
			<td>
				10.430</td>
			<td>
				15.573</td>
			<td>
				23.071</td>
			<td>
				98.597</td>
			<td>
				10.443</td>
		</tr>
		<tr>
			<td>
				10</td>
			<td>
				249</td>
			<td>
				8.30</td>
			<td>
				1.170</td>
			<td>
				9.083</td>
			<td>
				12.550</td>
			<td>
				17.946</td>
			<td>
				23.132</td>
			<td>
				75.871</td>
			<td>
				8.477</td>
		</tr>
	</tbody>
</table>
<h4>
	Graphs</h4>
<h6>
	Response Time: 30 sec time-series</h6>
<p>
	<a href="https://www.esdm.co.uk/Data/Sites/1/media/wlw/load_front_page_response_times_intervals.png"><img alt="Load_Front_Page_response_times_intervals" border="0" height="103" src="https://www.esdm.co.uk/Data/Sites/1/media/wlw/load_front_page_response_times_intervals_thumb.png" style="margin: 0px; border: 0px currentColor; padding-top: 0px; padding-right: 0px; padding-left: 0px; display: inline; background-image: none;" title="Load_Front_Page_response_times_intervals" width="244" /></a></p>
<h6>
	Response Time: raw data (all points)</h6>
<p>
	<a href="https://www.esdm.co.uk/Data/Sites/1/media/wlw/load_front_page_response_times.png"><img alt="Load_Front_Page_response_times" border="0" height="103" src="https://www.esdm.co.uk/Data/Sites/1/media/wlw/load_front_page_response_times_thumb.png" style="margin: 0px; border: 0px currentColor; padding-top: 0px; padding-right: 0px; padding-left: 0px; display: inline; background-image: none;" title="Load_Front_Page_response_times" width="244" /></a></p>
<h6>
	Throughput: 30 sec time-series</h6>
<p>
	<a href="https://www.esdm.co.uk/Data/Sites/1/media/wlw/load_front_page_throughput.png"><img alt="Load_Front_Page_throughput" border="0" height="103" src="https://www.esdm.co.uk/Data/Sites/1/media/wlw/load_front_page_throughput_thumb.png" style="border: 0px currentColor; padding-top: 0px; padding-right: 0px; padding-left: 0px; display: inline; background-image: none;" title="Load_Front_Page_throughput" width="244" /></a></p>
<p>
	&nbsp;</p>
<h3>
	Analysis</h3>
<p>
	I am no expert in load testing, so I do not pretend to be able to analyse the results in any meaningful way. Looking to learn though…!</p>
<p>
	But bringing together the most significant statistics from these tests…</p>
<table border="1" cellpadding="2" cellspacing="0" width="574">
	<tbody>
		<tr>
			<td valign="top" width="130">
				Measurement</td>
			<td valign="top" width="116">
				esdm.co.uk</td>
			<td valign="top" width="113">
				esdm.no-ip.co.uk</td>
			<td valign="top" width="131">
				breconfans.org</td>
			<td valign="top" width="82">
				www.wikipedia.org</td>
		</tr>
		<tr>
			<td valign="top" width="130">
				CMS</td>
			<td valign="top" width="116">
				DNN</td>
			<td valign="top" width="113">
				mojoPortal</td>
			<td valign="top" width="131">
				mojoPortal</td>
			<td valign="top" width="82">
				n/a</td>
		</tr>
		<tr>
			<td valign="top" width="130">
				Platform</td>
			<td valign="top" width="116">
				exeGesIS Telehouse hosting.<br />
				Windows Server 2003 + SQL Server 2000</td>
			<td valign="top" width="113">
				exeGesIS Telehouse hosting.<br />
				Windows Server 2008 + SQL Server 2008 R2</td>
			<td valign="top" width="131">
				Arvixe hosting.<br />
				Windows Server 2008 + SQL Server 2008 Express</td>
			<td valign="top" width="82">
				n/a</td>
		</tr>
		<tr>
			<td valign="top" width="130">
				Successful requests</td>
			<td valign="top" width="116">
				1088</td>
			<td valign="top" width="113">
				5105</td>
			<td valign="top" width="131">
				6710</td>
			<td valign="top" width="82">
				2748</td>
		</tr>
		<tr>
			<td valign="top" width="130">
				Minimum response time</td>
			<td valign="top" width="116">
				0.480</td>
			<td valign="top" width="113">
				0.210</td>
			<td valign="top" width="131">
				0.780</td>
			<td valign="top" width="82">
				0.340</td>
		</tr>
		<tr>
			<td valign="top" width="130">
				Average response time</td>
			<td valign="top" width="116">
				12.897</td>
			<td valign="top" width="113">
				2.914</td>
			<td valign="top" width="132">
				2.218</td>
			<td valign="top" width="82">
				4.880</td>
		</tr>
		<tr>
			<td valign="top" width="130">
				95pct response time</td>
			<td valign="top" width="115">
				28.932</td>
			<td valign="top" width="113">
				7.190</td>
			<td valign="top" width="132">
				5.590</td>
			<td valign="top" width="82">
				14.132</td>
		</tr>
		<tr>
			<td valign="top" width="130">
				Average requests / sec</td>
			<td valign="top" width="118">
				3.63</td>
			<td valign="top" width="118">
				17.02</td>
			<td valign="top" width="139">
				22.37</td>
			<td valign="top" width="104">
				9.16</td>
		</tr>
	</tbody>
</table>
<p>
	These identical tests put the web sites under heavy load, particularly after the first minute or so. It is clear that the two mojoPortal sites dramatically out-perform our old esdm.co.uk, with average response times of 2.9 and 2.2 seconds compared with 12.8 over the full test period. The reasons for this are far less clear though.&nbsp; esdm.co.uk and esdm.no-ip.co.uk have about the same amount of content, but this is not really a fair comparison between DotNetNuke and mojoPortal, because esdm.no-ip.co.uk is running on faster servers. Also, we are running the latest version of mojoPortal (2.3.7.5) compared to an ancient version of DNN.</p>
<p>
	Interestingly the minimum response time was 0.48 for esdm.co.uk, significantly faster than the 0.78 seconds for breconfans.org.uk, perhaps because the latter is on US hosting meaning a longer round-trip regardless of other factors; esdm.no-ip.co.uk gave 0.21 seconds minimum, perhaps demonstrating the inherent responsiveness of our new hosting stack.</p>
<p>
	I was surprised that breconfans.org came out better under load than esdm.no-ip.co.uk, but I suspect this is because the latter is a much larger site, with hundreds of pages (and so a much larger mojoPortal database) compared to about 25 pages for breconfans.</p>
<p>
	Testing wikipedia was an afterthought, and of course it is not quite the same because it is always under heavy load; nonetheless it was reassuring to find that my mojoPortal sites performed better, and that the wikipedia performance also degraded through the test as more virtual users were added (though this does make me wonder whether some of the performance degradation is client-side, e.g. inherent bottle-neck in processing http requests in Windows?).</p>
<h3>
	Conclusion</h3>
<p>
	Multi-Mechanize was simple to set up and use (admittedly in a limited manner). It quickly demonstrates what kinds of load web sites can sustain before degrading.</p>
<p>
	More advanced configuration of the test scripts, e.g. to perform form-based operations, should be reasonably easy for our developers. This should give real power for load-testing our web applications.</p>
<p>
	&nbsp;</p>
<p>
	Aside: I found when running the longer tests with lots of threads (e.g. 100) that the routine would not complete after the allotted time, and would stick saying “waiting for all requests to finish”.&nbsp; Usually it would complete after a minute or two extra waiting. If not, no outputs were produced, but killing the python.exe process <em>sometimes</em> caused the output files to be created. This issue has been encountered by others, with no apparent resolution (e.g. <a href="http://groups.google.com/group/multi-mechanize/browse_thread/thread/706c30203c568d61" title="http://groups.google.com/group/multi-mechanize/browse_thread/thread/706c30203c568d61">http://groups.google.com/group/multi-mechanize/browse_thread/thread/706c30203c568d61</a>)</p>
<br /><a href='https://www.esdm.co.uk/trying-out-multi-mechanize-web-performance-and-load-testing-framework'>Crispin Flower</a>&nbsp;&nbsp;<a href='https://www.esdm.co.uk/trying-out-multi-mechanize-web-performance-and-load-testing-framework'>...</a>]]></description>
      <link>https://www.esdm.co.uk/trying-out-multi-mechanize-web-performance-and-load-testing-framework</link>
      <author>crispin.flower@idoxgroup.com (Crispin Flower)</author>
      <comments>https://www.esdm.co.uk/trying-out-multi-mechanize-web-performance-and-load-testing-framework</comments>
      <guid isPermaLink="true">https://www.esdm.co.uk/trying-out-multi-mechanize-web-performance-and-load-testing-framework</guid>
      <pubDate>Tue, 27 Dec 2011 18:46:00 GMT</pubDate>
    </item>
    <item>
      <title>Useful Windows Live Writer plugins</title>
      <description><![CDATA[<p>Windows Live Writer is a great blog authoring tool that we use with this knowledgebase (a mojoPortal blog + pages).&nbsp; Since we are often posting code snippets, here are a couple of useful plugins. They take very different approaches, the first using CSS classes designed for each language, then analysing the code you paste in and assigning the classes accordingly; the second simple preserves the cosmetics of the incoming text with in-line styling.</p> <h3>Insert Code </h3> <p><a title="http://plugins.live.com/writer/detail/insert-code-for-windows-live-writer" href="http://plugins.live.com/writer/detail/insert-code-for-windows-live-writer">http://plugins.live.com/writer/detail/insert-code-for-windows-live-writer</a></p> <p>Here’s an example of inserted HTML, with line numbers switched on:</p> <div class="csharpcode"><pre><span class="lnum">   1:  </span><span class="kwrd">&lt;!</span><span class="html">DOCTYPE</span> <span class="attr">html</span><span class="kwrd">&gt;</span></pre><pre><span class="lnum">   2:  </span><span class="kwrd">&lt;</span><span class="html">html</span><span class="kwrd">&gt;</span></pre><pre><span class="lnum">   3:  </span><span class="kwrd">&lt;</span><span class="html">head</span> <span class="attr">id</span><span class="kwrd">="ctl01_Head1"</span><span class="kwrd">&gt;&lt;</span><span class="html">title</span><span class="kwrd">&gt;</span></pre><pre><span class="lnum">   4:  </span>    Authoring with Windows Live Writer or Word - exeGesIS SDM Ltd</pre><pre><span class="lnum">   5:  </span><span class="kwrd">&lt;/</span><span class="html">title</span><span class="kwrd">&gt;</span></pre><pre><span class="lnum">   6:  </span><span class="kwrd">&lt;</span><span class="html">link</span> <span class="attr">rel</span><span class="kwrd">='stylesheet'</span> <span class="attr">type</span><span class="kwrd">='text/css'</span> <span class="attr">href</span><span class="kwrd">='http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.14/themes/blitzer/jquery-ui.css'</span> <span class="kwrd">/&gt;</span></pre><pre><span class="lnum">   7:  </span><span class="kwrd">&lt;</span><span class="html">link</span> <span class="attr">rel</span><span class="kwrd">='stylesheet'</span> <span class="attr">type</span><span class="kwrd">='text/css'</span> <span class="attr">href</span><span class="kwrd">='/csshandler.ashx?skin=esdm-website&amp;amp;s=1&amp;amp;v=2.3.7.0'</span> <span class="kwrd">/&gt;</span></pre></div>
<style type="text/css">.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
</style>

<p>&nbsp;</p>
<h3>Paste from Visual Studio</h3>
<p><a title="http://plugins.live.com/writer/detail/paste-from-visual-studio" href="http://plugins.live.com/writer/detail/paste-from-visual-studio">http://plugins.live.com/writer/detail/paste-from-visual-studio</a></p>
<p>Here’s an example of pasting direct from VS2010:</p><pre class="code"><span style="color: blue">protected override void </span>OnPreRender(<span style="color: #2b91af">EventArgs </span>e)
{
    <span style="color: blue">base</span>.OnPreRender(e);

    SetupColumnCss(forceShowLeft, forceShowRight);
   
}
</pre><br /><a href='https://www.esdm.co.uk/useful-windows-live-writer-plugins'>Crispin Flower</a>&nbsp;&nbsp;<a href='https://www.esdm.co.uk/useful-windows-live-writer-plugins'>...</a>]]></description>
      <link>https://www.esdm.co.uk/useful-windows-live-writer-plugins</link>
      <author>crispin.flower@idoxgroup.com (Crispin Flower)</author>
      <comments>https://www.esdm.co.uk/useful-windows-live-writer-plugins</comments>
      <guid isPermaLink="true">https://www.esdm.co.uk/useful-windows-live-writer-plugins</guid>
      <pubDate>Thu, 17 Nov 2011 20:28:47 GMT</pubDate>
    </item>
  </channel>
</rss>