<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Cameron Priem &#187; Coding</title>
	<atom:link href="http://cameronpriem.com/category/code/feed/" rel="self" type="application/rss+xml" />
	<link>http://cameronpriem.com</link>
	<description>Professional Software Development</description>
	<lastBuildDate>Tue, 11 Aug 2009 12:12:06 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>IE 6 on windows 2000 hangs on ajax</title>
		<link>http://cameronpriem.com/2009/08/ie-6-on-windows-2000-hangs-on-ajax/</link>
		<comments>http://cameronpriem.com/2009/08/ie-6-on-windows-2000-hangs-on-ajax/#comments</comments>
		<pubDate>Tue, 11 Aug 2009 12:12:06 +0000</pubDate>
		<dc:creator>Campo</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://cameronpriem.com/?p=60</guid>
		<description><![CDATA[This problem took me a few days to sort out.  We just started using Ajax in our application and everything was running fine, loading fast and being totally awesome (because its Ajax , and I heart Ajax).  I couldn&#8217;t figure it out, every browser and every O/S this was working fine, there was just one customer using IE6 [...]]]></description>
			<content:encoded><![CDATA[<p>This problem took me a few days to sort out.  We just started using Ajax in our application and everything was running fine, loading fast and being totally awesome (because its Ajax , and I heart Ajax).  I couldn&#8217;t figure it out, every browser and every O/S this was working fine, there was just one customer using IE6 with windows 2000.  The problem was the Ajax call was hanging, for a really long time.  At first I thought the Ajax wasn&#8217;t firing at all, but with out live http headers for IE6, there wasn&#8217;t any way I could confirm this.</p>
<p>So after about 5 minutes of sitting there pulling my hair out&#8230;..the ajax returned a result and the next part of the process ran.   Sooo&#8230;.what the hell?!?!  A few days of googling, trying different things, asking other people in the development team, and finally praying (all religions), I came across a blog post that explained that IE6 doesn&#8217;t handle closed connections very well.  We had this line in our javascript:</p>
<p><em>xh.setRequestHeader(&#8220;Connection&#8221;, &#8220;close&#8221;);</em></p>
<p>We now had to change our code to only include this if the browser was not IE6.  I wasn&#8217;t sure what performance hit this would have or what side affects it would have, but we&#8217;ve been running this for a few years and haven&#8217;t seen any difference with performance or had any problems.  If anyone else has a better understanding of why IE6 behaves like this, please leave me a comment!!</p>
]]></content:encoded>
			<wfw:commentRss>http://cameronpriem.com/2009/08/ie-6-on-windows-2000-hangs-on-ajax/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>FireFox Page Break CSS Not Displaying Correctly</title>
		<link>http://cameronpriem.com/2009/08/firefox-page-break-css-not-displaying-correctly/</link>
		<comments>http://cameronpriem.com/2009/08/firefox-page-break-css-not-displaying-correctly/#comments</comments>
		<pubDate>Fri, 07 Aug 2009 13:10:32 +0000</pubDate>
		<dc:creator>Campo</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Coding]]></category>

		<guid isPermaLink="false">http://cameronpriem.com/?p=49</guid>
		<description><![CDATA[I&#8217;ve always used CSS to handle page breaks when printing from the web, and its always been easy and pretty straight forward to implement.  However FireFox would stop printing after 1 or 2 pages from what should have been about a 10 page print job.
After some googling I found that a fair few people have [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve always used CSS to handle page breaks when printing from the web, and its always been easy and pretty straight forward to implement.  However FireFox would stop printing after 1 or 2 pages from what should have been about a 10 page print job.</p>
<p>After some googling I found that a fair few people have been having the same problem as me, only in FireFox though, every other browser is fine.  The problem was the CSS I was using:</p>
<blockquote><p><em>page-break-after:always;</em></p></blockquote>
<p>FireFox didn&#8217;t like this.  From what I found on the web the work around was to use page-break-before instead.  I searched bugzilla to try and find out more details on why this happens, the best I could find was <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=136714" target="_blank">this lengthy discussion</a>, with instances of this problem from 2002.   So my lesson from this is to use <em>page-break-before:always</em> instead of after.</p>
]]></content:encoded>
			<wfw:commentRss>http://cameronpriem.com/2009/08/firefox-page-break-css-not-displaying-correctly/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Firefox 3 drop down list disables on postback with update panel</title>
		<link>http://cameronpriem.com/2009/06/firefox-3-drop-down-list-disables-on-postback-with-update-panel/</link>
		<comments>http://cameronpriem.com/2009/06/firefox-3-drop-down-list-disables-on-postback-with-update-panel/#comments</comments>
		<pubDate>Wed, 10 Jun 2009 12:23:43 +0000</pubDate>
		<dc:creator>Campo</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Coding]]></category>

		<guid isPermaLink="false">http://cameronpriem.com/?p=43</guid>
		<description><![CDATA[We came across a weird problem a few weeks ago where we were using an UpdatePanel through ASP.NET AJAX (.Net Framework 3.5 SP1) with an asp:dropdownlist on that page.  When the update panel did a post back using ajax the drop down lists stopped working.  You could click on the select list but they would not [...]]]></description>
			<content:encoded><![CDATA[<p>We came across a weird problem a few weeks ago where we were using an UpdatePanel through ASP.NET AJAX (.Net Framework 3.5 SP1) with an asp:dropdownlist on that page.  When the update panel did a post back using ajax the drop down lists stopped working.  You could click on the select list but they would not drop down with any options.  This only happened in Firefox 3, no other FF version or Internet Explorer.</p>
<p>Through ages of google searching we found a work around online, adding a window.setTimeout() around the alert box, eg:</p>
<p><code> ScriptManager.RegisterClientScriptBlock(this, typeof(Page), "validationAlert", "window.setTimeout(\"alert('Just testing')\", 0);", true);</code></p>
<p>Hope this saves some other people time and heart ache.</p>
]]></content:encoded>
			<wfw:commentRss>http://cameronpriem.com/2009/06/firefox-3-drop-down-list-disables-on-postback-with-update-panel/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>How to measure connection pooling SQLOLE</title>
		<link>http://cameronpriem.com/2009/01/how-to-measure-connection-pooling-sqlole/</link>
		<comments>http://cameronpriem.com/2009/01/how-to-measure-connection-pooling-sqlole/#comments</comments>
		<pubDate>Sat, 03 Jan 2009 01:15:51 +0000</pubDate>
		<dc:creator>Campo</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://cameronpriem.com/?p=16</guid>
		<description><![CDATA[Our web app has been having some problems with &#8221; [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.&#8221; error at random times.  The connection string is fine, the app runs without any dramas, but at random times it will display this error message. After consultation with other people we think that the connection pooling may be failing on some areas of our app.  I wasn&#8217;t really sure how to measure this [...]]]></description>
			<content:encoded><![CDATA[<p>Our web app has been having some problems with &#8221; <em>[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.</em>&#8221; error at random times.  The connection string is fine, the app runs without any dramas, but at random times it will display this error message. After consultation with other people we think that the connection pooling may be failing on some areas of our app.  I wasn&#8217;t really sure how to measure this in a test environment, so after some research I found out that you can use perfmon to do this.</p>
<div><strong>Using perfmon to measure connection pools</strong></div>
<div>Start &gt; run &gt; perfmon</div>
<div>Add the counter for SQL Server: General Statistics &gt; Logins/sec</div>
<div>If this stays moderately low, at about 1 or 0 it should be fine, which was consistent with a majority of the different parts of our system until we ran a report.  The screen shot shows logging in which was next to nothing in the graph,  the large spike was running 1 report.</div>
<div>
<div id="attachment_17" class="wp-caption aligncenter" style="width: 310px"><a href="http://cameronpriem.com/wp-content/uploads/2008/10/report103.gif"><img class="size-medium wp-image-17" title="report103" src="http://cameronpriem.com/wp-content/uploads/2008/10/report103-300x247.gif" alt="connection pooling in perfmon" width="300" height="247" /></a><p class="wp-caption-text">connection pools in perfmon</p></div>
<p>And as you can see my computer name is deathstar&#8230;.orsm!  The next step is to find out why the connection is not pooling correctly in our reporting engine&#8230;</p></div>
]]></content:encoded>
			<wfw:commentRss>http://cameronpriem.com/2009/01/how-to-measure-connection-pooling-sqlole/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Get subversion changes for single author</title>
		<link>http://cameronpriem.com/2008/10/get-subversion-changes-for-single-author/</link>
		<comments>http://cameronpriem.com/2008/10/get-subversion-changes-for-single-author/#comments</comments>
		<pubDate>Mon, 20 Oct 2008 12:11:41 +0000</pubDate>
		<dc:creator>Campo</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[subversion]]></category>

		<guid isPermaLink="false">http://cameronpriem.com/?p=13</guid>
		<description><![CDATA[A while ago I was approached by my boss
&#8220;I need a list of all the changes a former employee committed into subversion&#8221;
&#8220;No problem!&#8221; I replied with gusto.
It didn&#8217;t turn out to be as easy as I thought.  I figured there would be an inbuilt subversion command to do this, but after searching the subversion documentation [...]]]></description>
			<content:encoded><![CDATA[<p>A while ago I was approached by my <a href="http://ndn.newsweek.com/media/25/71014_MoneyHappiness_vl-vertical.jpg" target="_blank">boss</a><br />
&#8220;<em>I need a list of all the changes a former employee committed into subversion</em>&#8221;<br />
&#8220;<em>No problem!</em>&#8221; I replied with gusto.</p>
<p>It didn&#8217;t turn out to be as easy as I thought.  I figured there would be an inbuilt subversion command to do this, but after searching the subversion documentation I couldn&#8217;t find anything helpful.  I then went to plan B which consisted of:</p>
<p>-  Download windows sed editor: <a href="http://www.cornerstonemag.com/sed/">http://www.cornerstonemag.com/sed/</a><br />
-  export svn log to a txt file<br />
-  Run this sed command on txt file (this example was for only author of cpriem): sed -n &#8220;/cpriem/,/&#8212;&#8211;$/ p&#8221; svn.txt &gt; cpriemSvn.txt<br />
<em><br />
svn.txt is input file from svn log<br />
cpriemSvn.txt is output file</em></p>
<p>sed command from: <a href="http://svn.haxx.se/users/archive-2007-08/0748.shtml">http://svn.haxx.se/users/archive-2007-08/0748.shtml</a></p>
<p>There may be an easier way with the latest version of subversion so just check out the documentation first.</p>
]]></content:encoded>
			<wfw:commentRss>http://cameronpriem.com/2008/10/get-subversion-changes-for-single-author/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Classic ASP session timeout / loss</title>
		<link>http://cameronpriem.com/2008/10/classic-asp-session-timeout-loss/</link>
		<comments>http://cameronpriem.com/2008/10/classic-asp-session-timeout-loss/#comments</comments>
		<pubDate>Wed, 08 Oct 2008 13:30:25 +0000</pubDate>
		<dc:creator>Campo</dc:creator>
				<category><![CDATA[ASP]]></category>
		<category><![CDATA[Coding]]></category>
		<category><![CDATA[Helpful Tips]]></category>
		<category><![CDATA[classic asp session timeout]]></category>

		<guid isPermaLink="false">http://cameronpriem.com/?p=10</guid>
		<description><![CDATA[Session timeout&#8230; this is the bain of my existence in our classic ASP site.  We set it in global.asa, we set it in IIS 6 (properties &#62; home directory &#62; configuration &#62; options tab &#8220;enable session state&#8221;)  we setup the application pool to only recycle when we want it to.  But still every now and [...]]]></description>
			<content:encoded><![CDATA[<p>Session timeout&#8230; this is the bain of my existence in our classic ASP site.  We set it in global.asa, we set it in IIS 6 (properties &gt; home directory &gt; configuration &gt; options tab &#8220;enable session state&#8221;)  we setup the application pool to only recycle when we want it to.  But still every now and again we have problems.  Maybe the application pool is reaching its memory limit and recycling anyways?</p>
<p>One problem on a clients server took me ages to figure out.  We had initially setup IIS 6 from our stock standard documented configuration, no surprises, no bells &amp; whistles, just stock standard.  A few months later we started receiving notices that users were being &#8220;kicked off&#8221; the system and directed to the log in page.  Session time out seemed to be the issue here.</p>
<p>So I checked the usual suspects that I wrote above, and these were all set fine.  I could not actually reproduce this issue when using my local broswer on the site.  After investigating the user&#8217;s computer I thought it may be something blocking the asp cookie, or removing it.  But this was a dead end.  I eventually gave up and focussed my efforts back on the server.  But i did end up recording my longest showmypc.com session of 2hours +, hi-5&#8217;s all round!  The problem ended up being with the application pool, the sys admins had set the multiple process option in the application pool.</p>
<p><strong>DON&#8217;T setup classic ASP sites to use a web garden ( &gt; 1 worker processes in the application pool). </strong> If you do this, more than one instance of w3wp.exe is started for a given Application Pool. This means two HTTP requests for a given user using the same application within that application pool may be directed to any of the w3wp.exe instances running that application and session data is not shared between w3wp.exe instances because they are separate processes. In the sys admin&#8217;s defence they were trying to improve the performance and scalability of the site.</p>
<p>The purpose for this post is to help point other people in the right direction to set what we have setup, and also to get feedback from other developers out there. Got a suggestion for me? Let me know by leaving a comment!</p>
]]></content:encoded>
			<wfw:commentRss>http://cameronpriem.com/2008/10/classic-asp-session-timeout-loss/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
