<?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>Geospecialling</title>
	<atom:link href="http://www.geospecialling.com/index.php/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.geospecialling.com</link>
	<description>Being a (G)IS Developer...</description>
	<lastBuildDate>Fri, 11 May 2012 22:13:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Like father like daughter&#8211;AKA Alienware is purrty</title>
		<link>http://www.geospecialling.com/index.php/2012/01/like-father-like-daughteraka-alienware-is-purrty/</link>
		<comments>http://www.geospecialling.com/index.php/2012/01/like-father-like-daughteraka-alienware-is-purrty/#comments</comments>
		<pubDate>Thu, 26 Jan 2012 02:33:41 +0000</pubDate>
		<dc:creator>Darrin Maidlow</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Alienware]]></category>
		<category><![CDATA[babby]]></category>

		<guid isPermaLink="false">http://www.geospecialling.com/index.php/2012/01/like-father-like-daughteraka-alienware-is-purrty/</guid>
		<description><![CDATA[My six month old daughter LOVES my notebook… &#160; &#160; &#160; &#160; &#160; Maybe when she grows up, she’ll be a nerd and work with her dad – like I grew up to work with mine… Technorati Tags: Alienware]]></description>
			<content:encoded><![CDATA[<p align="left">My six month old daughter LOVES my notebook…</p>
<p align="center"><a href="http://www.geospecialling.com/wp-content/uploads/2012/01/SAM_1389.jpg"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: left; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="SAM_1389" border="0" alt="SAM_1389" align="left" src="http://www.geospecialling.com/wp-content/uploads/2012/01/SAM_1389_thumb.jpg" width="244" height="184" /></a></p>
<p>&#160;</p>
<p>&#160;</p>
<p>&#160;</p>
<p>&#160;</p>
<p>&#160;</p>
<p>Maybe when she grows up, she’ll be a nerd and work with her dad – like I grew up to work with mine…</p>
<p><a href="http://www.geospecialling.com/wp-content/uploads/2012/01/SAM_1391.jpg"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="SAM_1391" border="0" alt="SAM_1391" src="http://www.geospecialling.com/wp-content/uploads/2012/01/SAM_1391_thumb.jpg" width="244" height="184" /></a></p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:ded208a5-d86f-48df-8024-b7a1a5ef7638" class="wlWriterEditableSmartContent">Technorati Tags: <a href="http://technorati.com/tags/Alienware" rel="tag">Alienware</a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.geospecialling.com/index.php/2012/01/like-father-like-daughteraka-alienware-is-purrty/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SWTOR Hack&#8211;Re-install without the 20GB+ Download</title>
		<link>http://www.geospecialling.com/index.php/2012/01/swtor-hackre-install-without-the-20gb-download/</link>
		<comments>http://www.geospecialling.com/index.php/2012/01/swtor-hackre-install-without-the-20gb-download/#comments</comments>
		<pubDate>Sun, 15 Jan 2012 07:24:55 +0000</pubDate>
		<dc:creator>Darrin Maidlow</dc:creator>
				<category><![CDATA[Gaming]]></category>
		<category><![CDATA[SWTOR]]></category>

		<guid isPermaLink="false">http://www.geospecialling.com/index.php/2012/01/swtor-hackre-install-without-the-20gb-download/</guid>
		<description><![CDATA[I’ve been having&#160; a lot problem with my notebook since a bit before Christmas.&#160; I’ve had to re-install Windows like 3 times now (and yes I was using RAID and had backups…long store).&#160; Anyhow, the first couple of times I went through the 20GB+ download for Star Wars The Old Republic and my internet out [...]]]></description>
			<content:encoded><![CDATA[<p>I’ve been having&#160; a lot problem with my notebook since a bit before Christmas.&#160; I’ve had to re-install Windows like 3 times now (and yes I was using RAID and had backups…long store).&#160; Anyhow, the first couple of times I went through the <a href="http://www.geospecialling.com/index.php/2011/12/star-wars-the-old-republic-install-download-breakout/">20GB+ download</a> for <a href="http://www.swtor.com">Star Wars The Old Republic</a> and my internet out here is not great.&#160; The entire download process takes 12+ hours.&#160; Tonight I was determined to find a better way…</p>
<p>Well I found it.&#160; What you need to do is make a copy of the C:\Program Files (x86)\Electronic Arts\BioWare\Star Wars &#8211; The Old Republic folder.&#160; Put it somewhere safe.&#160; Also save a copy of the 37MB installer for SWTOR.&#160;&#160; On your fresh Windows install run the SWTOR installer.&#160;&#160; This will create all the needed folders and registry keys.&#160; Finally copy the SWTOR program files folder from your backup overtop of the fresh install and you’re all set.&#160; Fire up SWTOR and you didn’t have to download the monstrous pig of a download.&#160; So glad I won’t have to be doing that download anymore! </p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:d27e1a24-763e-4484-8792-1466c70d5cc6" class="wlWriterEditableSmartContent">Technorati Tags: <a href="http://technorati.com/tags/SWTOR" rel="tag">SWTOR</a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.geospecialling.com/index.php/2012/01/swtor-hackre-install-without-the-20gb-download/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Using Log4Net with Visual Lisp</title>
		<link>http://www.geospecialling.com/index.php/2012/01/using-log4net-with-visual-lisp/</link>
		<comments>http://www.geospecialling.com/index.php/2012/01/using-log4net-with-visual-lisp/#comments</comments>
		<pubDate>Fri, 13 Jan 2012 19:07:35 +0000</pubDate>
		<dc:creator>Darrin Maidlow</dc:creator>
				<category><![CDATA[AutoCAD]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Log4Net]]></category>
		<category><![CDATA[ObjectARX.NET]]></category>
		<category><![CDATA[Visual Lisp]]></category>

		<guid isPermaLink="false">http://www.geospecialling.com/index.php/2012/01/using-log4net-with-visual-lisp/</guid>
		<description><![CDATA[If you’ve worked with me or talked technical with me in the past there is a good chance you area already very aware that I love Log4Net.&#160; There is also a really good chance that you know I still have a special place in my heart for Visual Lisp.&#160; Not only did I spend what [...]]]></description>
			<content:encoded><![CDATA[<p>If you’ve worked with me or talked technical with me in the past there is a good chance you area already very aware that I love <a title="Log4Net for the awesome!" href="http://logging.apache.org/log4net/index.html" rel="tag" target="_blank">Log4Net</a>.&#160; There is also a really good chance that you know I still have a special place in my heart for <a title="Visual Lisp" href="http://usa.autodesk.com/adsk/servlet/index?siteID=123112&amp;id=770237" rel="tag" target="_blank">Visual Lisp</a>.&#160; Not only did I spend what may have been the “best years of my life” buried in VLIDE (or hey, maybe all those 30+ hour days and passing out under my desk were the best years of my life? =)) , I still firmly believe that Lisp is one of the most effective way to bang out even a relatively complex operation in AutoCAD when it comes to data manipulation.&#160; ObjectARX (both original and .NET) is great – but the time and effort overhead is pretty high when you just need to bang out a quick routine.</p>
<h2>&lt;3 Visual Lisp</h2>
<p>Even the quick routines need a little error handling and logging can make a huge difference in documenting the results or diagnosing problems.&#160; Yes, Visual Lisp comes with file I/O calls and I’m sure most of you reading this have rolled your own logging code.&#160; We had some at Kanotech that is still in use for DraftLogic.&#160; Not for long though :=)&#160; Today I’m here to show you how you could bring your Visual Lisp logging into the 21st century.&#160; Not only will it give you <a title="Robust and configurable logging with Log4Net" href="http://logging.apache.org/log4net/release/config-examples.html" rel="tag" target="_blank">insanely robust and configurable logging</a> – it will let even complex systems that mix technologies (ie. Visual Lisp, ObjectARX .NET) to bring the logging together into a common set of log files.</p>
<h2>Overview</h2>
<p>There are two sides to this.&#160; First, in .NET we setup Log4Net and expose it to Visual Lisp.&#160; Over on the Lisp side, we’ll load the vlx, setup an error handler, and issue some logging calls.&#160; As usual I’ve attached a Visual Studio solution with sample code.&#160; I’ve also included a compiled dll that you can just go ahead and use.&#160; The attached project is built using .NET 3.5 as this machine only has AutoCAD 2010 installed.&#160; Log4Net itself is built targeting .NET 1.0 so you can modify the .NET runtimes and ObjectARX references used in the attached project and use this code for pretty much any .NET enabled version of AutoCAD/ObjectARX.</p>
<h2>In .NET – Setup Log4Net and Lisp Bindings</h2>
<p>The Lisp bindings are pretty straight forward.&#160; Expose your call(s) to AutoCAD as a LispFunction.&#160; I’ve built two exposed calls.&#160; One takes two parameters, and uses the value of the first parameter to determine the log type.&#160; The second parameter is the message to log.&#160; The second call is a LogError call that could be used to just log error type messages.&#160; This call could be duplicated for each type of logging state if desired.</p>
<div>&#160;</div>
<div>
<div style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px">
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">   1:</span> <span style="color: #008000">/// &lt;summary&gt;</span></pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">   2:</span> <span style="color: #008000">/// Lisp exported Log call.  Expects two parameters in lisp.  First the log type which may be either INFO, WARNING, DEBUG, or ERROR.  The second is a string containing the error / message.</span></pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">   3:</span> <span style="color: #008000">/// &lt;/summary&gt;</span></pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">   4:</span> <span style="color: #008000">/// &lt;param name=&quot;lispArgs&quot;&gt;&lt;/param&gt;</span></pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">   5:</span> <span style="color: #008000">/// &lt;returns&gt;&lt;/returns&gt;</span></pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">   6:</span> <span style="color: #008000">/// &lt;remarks&gt;Lisp syntax (Loggit &lt;/remarks&gt;</span></pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">   7:</span> [LispFunction(<span style="color: #006080">&quot;Loggit&quot;</span>)]</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">   8:</span> <span style="color: #0000ff">public</span> TypedValue Log(ResultBuffer lispArgs)</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">   9:</span> {</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  10:</span>     <span style="color: #008000">//Check that we have the correct number of parameters</span></pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  11:</span>     Editor ed = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor;</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  12:</span>     <span style="color: #0000ff">if</span> (lispArgs == <span style="color: #0000ff">null</span>)</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  13:</span>     {</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  14:</span>         ed.WriteMessage(<span style="color: #006080">&quot;\nLoggit - Incorrect number of arguments.  Expected 2 parameters, received none\n&quot;</span>);</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  15:</span>         <span style="color: #0000ff">return</span> <span style="color: #0000ff">new</span> TypedValue((<span style="color: #0000ff">int</span>)LispDataType.Nil);</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  16:</span>     }</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  17:</span>     <span style="color: #0000ff">if</span> (lispArgs.AsArray().Length != 2)</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  18:</span>     {</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  19:</span>         ed.WriteMessage(<span style="color: #006080">&quot;\nLoggit - Incorrect number of arguments.  Exepected 2 parameters, received &quot;</span> + Convert.ToString(lispArgs.AsArray().Length));</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  20:</span>         <span style="color: #0000ff">return</span> <span style="color: #0000ff">new</span> TypedValue((<span style="color: #0000ff">int</span>)LispDataType.Nil);</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  21:</span>     }</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  22:</span>     </pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  23:</span>     <span style="color: #008000">//params are good.  We expect two strings so rather than test type just convert to string</span></pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  24:</span>     String logType = Convert.ToString(lispArgs.AsArray()[0].Value).ToUpper();</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  25:</span>     String logMessage = Convert.ToString(lispArgs.AsArray()[1].Value);</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  26:</span>&#160; </pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  27:</span>     <span style="color: #0000ff">switch</span>(logType)</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  28:</span>     {</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  29:</span>         <span style="color: #0000ff">case</span> <span style="color: #006080">&quot;INFO&quot;</span>:</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  30:</span>             Logger.Current.Info(logMessage);</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  31:</span>             <span style="color: #0000ff">break</span>;</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  32:</span>         <span style="color: #0000ff">case</span> <span style="color: #006080">&quot;WARNING&quot;</span>:</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  33:</span>         Logger.Current.Warning(logMessage);</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  34:</span>             <span style="color: #0000ff">break</span>;</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  35:</span>         <span style="color: #0000ff">case</span> <span style="color: #006080">&quot;DEBUG&quot;</span>:</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  36:</span>         Logger.Current.Debug(logMessage);</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  37:</span>             <span style="color: #0000ff">break</span>;</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  38:</span>         <span style="color: #0000ff">case</span> <span style="color: #006080">&quot;ERROR&quot;</span>:</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  39:</span>             Logger.Current.Error(logMessage);</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  40:</span>             <span style="color: #0000ff">break</span>;</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  41:</span>     }</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  42:</span>     <span style="color: #0000ff">return</span> <span style="color: #0000ff">new</span> TypedValue((<span style="color: #0000ff">int</span>)LispDataType.T_atom);</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  43:</span> }</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  44:</span>&#160; </pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  45:</span> <span style="color: #008000">//Alternately you could expose individual calls like LogError here.</span></pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  46:</span>&#160; </pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  47:</span> <span style="color: #008000">/// &lt;summary&gt;</span></pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  48:</span> <span style="color: #008000">/// Exposed Lisp function that logs an error directly. Expects a single lisp parameter of type string which is the message to log.</span></pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  49:</span> <span style="color: #008000">/// &lt;/summary&gt;</span></pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  50:</span> <span style="color: #008000">/// &lt;param name=&quot;lispArgs&quot;&gt;&lt;/param&gt;</span></pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  51:</span> <span style="color: #008000">/// &lt;returns&gt;&lt;/returns&gt;</span></pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  52:</span> [LispFunction(<span style="color: #006080">&quot;LogError&quot;</span>)]</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  53:</span> <span style="color: #0000ff">public</span> TypedValue LogError(ResultBuffer lispArgs)</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  54:</span> {</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  55:</span>     <span style="color: #008000">//Check that we have the correct number of parameters</span></pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  56:</span>     Editor ed = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor;</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  57:</span>     <span style="color: #0000ff">if</span> (lispArgs == <span style="color: #0000ff">null</span>)</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  58:</span>     {</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  59:</span>         ed.WriteMessage(<span style="color: #006080">&quot;\nLoggit - Incorrect number of arguments.  Expected 2 parameters, received none\n&quot;</span>);</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  60:</span>         <span style="color: #0000ff">return</span> <span style="color: #0000ff">new</span> TypedValue((<span style="color: #0000ff">int</span>)LispDataType.Nil);</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  61:</span>     }</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  62:</span>&#160; </pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  63:</span>     String logMessage = Convert.ToString(lispArgs.AsArray()[0].Value);</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  64:</span>     Logger.Current.Error(logMessage);</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  65:</span>&#160; </pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  66:</span>     <span style="color: #0000ff">return</span> <span style="color: #0000ff">new</span> TypedValue((<span style="color: #0000ff">int</span>)LispDataType.T_atom);</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  67:</span> }</pre>
</p></div>
</div>
<h2>&#160;</h2>
<p>One awesome little bit of magic exists in the Logger.cs class.&#160; When configuring the logger it loads the assemblies in question using System.Reflection.&#160; Then it checks in the folder of each loaded dll for the log4net.config file.&#160; This means that logging will only actually log if you have a log4net.config file exists in the same folder as the loaded ObjectARX.NET assembly.&#160; With AutoCAD based extensions this is especially important.&#160; I’ve never liked placing my assemblies (vlx, arx, dll) in the AutoCAD folders.&#160; I’ve always been a huge proponent of extending the AutoCAD search path if needed and using my own directory structures.&#160; This configuration searching technique also eliminates the need for hard coded “here is my log config file” stored in the registry or some other config location.&#160; </p>
<p>Compile that dll and you should be able to run with that in Visual Lisp.</p>
<h2>Configure the Logging</h2>
<p>As mentioned previously we need to create the configuration file to place with our dll.&#160; There are a couple of lines of code that are quite relevant to get the logging working.&#160; First we have a hard coded configuration file name defined in Logger.cs.&#160; You can customize this if you want.</p>
<div>
<div style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px">
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">   1:</span> <span style="color: #008000">/// &lt;summary&gt;</span></pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">   2:</span> <span style="color: #008000">/// Name of the file name to search for when trying to configure logging.</span></pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">   3:</span> <span style="color: #008000">/// &lt;/summary&gt;</span></pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">   4:</span> <span style="color: #0000ff">public</span> <span style="color: #0000ff">const</span> <span style="color: #0000ff">string</span> ConfigFileName = <span style="color: #006080">&quot;log4net.config&quot;</span>;</pre>
</p></div>
</div>
<p>Next is the name of the logger.&#160; This is quite relevant when configuring your logging.&#160; If this value does not match the value in the config file you will be very frustrated trying to get the logging to fire! If desired change the VisualLisp value to whatever you would like.</p>
<div>
<div style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px">
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">   1:</span> <span style="color: #008000">/// &lt;summary&gt;</span></pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">   2:</span> <span style="color: #008000">/// This logger name is referenced in the log4net configuration</span></pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">   3:</span> <span style="color: #008000">/// &lt;/summary&gt;</span></pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">   4:</span> <span style="color: #0000ff">private</span> ILog _logImplementation = LogManager.GetLogger(<span style="color: #006080">&quot;VisualLisp&quot;</span>);</pre>
</p></div>
</div>
<p>Next we have a little bit of XML to slough through.</p>
<div>
<div style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px">
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">   1:</span> <span style="color: #0000ff">&lt;?</span><span style="color: #800000">xml</span> <span style="color: #ff0000">version</span><span style="color: #0000ff">=&quot;1.0&quot;</span> <span style="color: #ff0000">encoding</span><span style="color: #0000ff">=&quot;UTF-8&quot;</span>?<span style="color: #0000ff">&gt;</span></pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">   2:</span> <span style="color: #0000ff">&lt;</span><span style="color: #800000">log4net</span> <span style="color: #ff0000">xmlns</span><span style="color: #0000ff">=&quot;urn:log&quot;</span><span style="color: #0000ff">&gt;</span></pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">   3:</span>   <span style="color: #0000ff">&lt;</span><span style="color: #800000">appender</span> <span style="color: #ff0000">name</span><span style="color: #0000ff">=&quot;GeneralLog&quot;</span> <span style="color: #ff0000">type</span><span style="color: #0000ff">=&quot;log4net.Appender.FileAppender&quot;</span><span style="color: #0000ff">&gt;</span></pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">   4:</span>     <span style="color: #0000ff">&lt;</span><span style="color: #800000">file</span> <span style="color: #ff0000">value</span><span style="color: #0000ff">=&quot;VisualLisp.log&quot;</span> <span style="color: #0000ff">/&gt;</span></pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">   5:</span>     <span style="color: #0000ff">&lt;</span><span style="color: #800000">appendToFile</span> <span style="color: #ff0000">value</span><span style="color: #0000ff">=&quot;true&quot;</span> <span style="color: #0000ff">/&gt;</span></pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">   6:</span>     <span style="color: #0000ff">&lt;</span><span style="color: #800000">layout</span> <span style="color: #ff0000">type</span><span style="color: #0000ff">=&quot;log4net.Layout.PatternLayout&quot;</span><span style="color: #0000ff">&gt;</span></pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">   7:</span>         <span style="color: #0000ff">&lt;</span><span style="color: #800000">conversionPattern</span> <span style="color: #ff0000">value</span><span style="color: #0000ff">=&quot;%date [%thread] %-5level %logger [%property{NDC}] - %message%newline&quot;</span> <span style="color: #0000ff">/&gt;</span></pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">   8:</span>     <span style="color: #0000ff">&lt;/</span><span style="color: #800000">layout</span><span style="color: #0000ff">&gt;</span></pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">   9:</span> <span style="color: #0000ff">&lt;/</span><span style="color: #800000">appender</span><span style="color: #0000ff">&gt;</span></pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  10:</span>   <span style="color: #0000ff">&lt;</span><span style="color: #800000">logger</span> <span style="color: #ff0000">name</span><span style="color: #0000ff">=&quot;VisualLisp&quot;</span><span style="color: #0000ff">&gt;</span></pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  11:</span>     <span style="color: #0000ff">&lt;</span><span style="color: #800000">level</span> <span style="color: #ff0000">value</span><span style="color: #0000ff">=&quot;ALL&quot;</span> <span style="color: #0000ff">/&gt;</span></pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  12:</span>     <span style="color: #0000ff">&lt;</span><span style="color: #800000">appender-ref</span> <span style="color: #ff0000">ref</span><span style="color: #0000ff">=&quot;GeneralLog&quot;</span> <span style="color: #0000ff">/&gt;</span></pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  13:</span>   <span style="color: #0000ff">&lt;/</span><span style="color: #800000">logger</span><span style="color: #0000ff">&gt;</span></pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  14:</span> <span style="color: #0000ff">&lt;/</span><span style="color: #800000">log4net</span><span style="color: #0000ff">&gt;</span></pre>
</p></div>
</div>
<p>This is where things can get crazy!&#160; First the appender section.&#160; This is where you define all the different settings for the actual logging.&#160; I’m running with a standard log file appender, but there are so many choices.&#160; Log to file, log to rolling file, log to database, log to e-mail, log to eventlog, log to almost whatever you want.&#160; You can even write your own custom appenders to log to your toaster oven if you really wanted to.&#160; This is one of the many reasons I &lt;3 Log4Net soooo much.&#160;&#160; The basics here are straight forward.&#160; Set the file value=”” to the name and optionally path (either full or relative).&#160; One important note., if you do not specify a full path or you use a relative path the logfile the base point used will be the AutoCAD program files folder.&#160;&#160; If you are not running with administrative rights the Vista/Windows 7 file system virtualization will kick in and the log file location will be quite confusing.&#160; It’s probably a good idea to specify a full path here.&#160; More details on some Log4Net configurations can be found on the <a title="Log4Net configs" href="http://logging.apache.org/log4net/release/config-examples.html" rel="tag" target="_blank">Log4Net site</a>.</p>
<p>Next take a look at the logger element.&#160; You can define multiple loggers, and each can log to multiple appenders.&#160; Or a single logger can log to multiple appenders.&#160;&#160; Note the important value of “Visual Lisp”.&#160; This must match the GetLogger value defined in the private ILog above.&#160; You can also specify which “level” of notice to log.&#160; Though our code may log INFO, WARNING, DEBUG and ERROR calls – if your level is set to ERROR – only the actual error level messages will be logged.</p>
<h2>In Visual Lisp – Setup an Error Handler and Issue Logging </h2>
<p>So now we have an ObjectARX.NET assembly to load.&#160; We have a handle on configuring our logging.&#160; Here is the contents of the included Lisp file.</p>
<div>
<div style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px">
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">   1:</span> ;only load the assembly <span style="color: #0000ff">if</span> it has not been loaded once</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">   2:</span> (<span style="color: #0000ff">if</span> (not (car (atoms-family 1 <span style="color: #006080">'(&quot;loggit&quot;))))</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">   3:</span>     (command &quot;netload&quot; &quot;C:/Users/dmaidlow/Documents/Visual Studio 2010/Projects/Log4Net.VisualLisp/bin/debug/Log4Net.VisualLisp.dll&quot;)</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">   4:</span> )</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">   5:</span>&#160; </pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">   6:</span> (defun new_ErrorHandler (err)</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">   7:</span>     (if (or (= (substr err 1 4) &quot;quit&quot;)</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">   8:</span>             (= err &quot;Function cancelled&quot;)</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">   9:</span>         )</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  10:</span>         (progn</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  11:</span>             ;put any function cancelled logic here</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  12:</span>             (princ)</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  13:</span>         )</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  14:</span>         (progn</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  15:</span>             ;an actual error happened here..</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  16:</span>             ;you could spew some stuff out to the console, or issue an alert..</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  17:</span>             ;(prompt (strcat &quot;\nLisp Returned the following error: \&quot;&quot; st &quot;\&quot;\n&quot;))</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  18:</span>             ;(alert (strcat &quot;*ERROR*\nLisp returned the following error: \n\t&quot; st))</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  19:</span>&#160; </pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  20:</span>             ;but we'</span>re here to log!</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  21:</span>             (Loggit <span style="color: #006080">&quot;ERROR&quot;</span> (strcat <span style="color: #006080">&quot;An error occurred\n&quot;</span> err))</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  22:</span>             </pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  23:</span>         )</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  24:</span>     )</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  25:</span>     (gc)</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  26:</span>     (princ)</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  27:</span> )</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  28:</span>&#160; </pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  29:</span> (setq *error* new_ErrorHandler)</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  30:</span> (LogError <span style="color: #006080">&quot;Oh No an Error!&quot;</span>)</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  31:</span> (Loggit <span style="color: #006080">&quot;INFO&quot;</span> <span style="color: #006080">&quot;This is an informational message&quot;</span>)</pre>
</p></div>
</div>
<p>Not much to it.&#160; To prevent some command line spewage if you load the assembly twice we check first to see if the function has already been exported to the environment.&#160; Here we’ve setup a new error handler that differentiates between a function cancellation and an actual error.&#160; At the bottom you can see a couple of examples of the logging.&#160; If you’ve defined your log4net.config file in the same folder as the assembly if you load this lisp file you will see a log file get created.</p>
<h2>Summary</h2>
<p>So in review – we’ve exposed Log4Net to the Visual Lisp and command line environment inside of AutoCAD.&#160; This will allow you to unify your logging (if you are already using Log4Net) and may even make you a Log4Net enthusiast as well.&#160; As always I’m always interested in your feedback and constructive criticism!</p>
<p><div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:fb3a1972-4489-4e52-abe7-25a00bb07fdf:9c1625b0-792e-4dd7-812d-3835aabd477f" class="wlWriterEditableSmartContent">
<p> <a href="http://www.geospecialling.com/wp-content/uploads/2012/01/Geospecialling.Log4Net.VisualLisp1.zip" target="_blank">Download the Visual Studio solution</a></p>
</div>
<p><div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:d9a34082-84de-4056-8acd-de04abe1fd9f" class="wlWriterEditableSmartContent">Technorati Tags: <a href="http://technorati.com/tags/Log4Net" rel="tag">Log4Net</a>,<a href="http://technorati.com/tags/Visual+Lisp" rel="tag">Visual Lisp</a>,<a href="http://technorati.com/tags/ObjectARX.NET" rel="tag">ObjectARX.NET</a>,<a href="http://technorati.com/tags/AutoCAD+Customization" rel="tag">AutoCAD Customization</a>,<a href="http://technorati.com/tags/.NET" rel="tag">.NET</a></div></p>
]]></content:encoded>
			<wfw:commentRss>http://www.geospecialling.com/index.php/2012/01/using-log4net-with-visual-lisp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mapguide 6.5 Server Not Found on Hardened Windows 2008 Server</title>
		<link>http://www.geospecialling.com/index.php/2011/12/mapguide-6-5-server-not-found-on-hardened-windows-2008-server/</link>
		<comments>http://www.geospecialling.com/index.php/2011/12/mapguide-6-5-server-not-found-on-hardened-windows-2008-server/#comments</comments>
		<pubDate>Wed, 14 Dec 2011 17:39:36 +0000</pubDate>
		<dc:creator>Darrin Maidlow</dc:creator>
				<category><![CDATA[Mapguide]]></category>
		<category><![CDATA[IIS 7]]></category>
		<category><![CDATA[ISAPI]]></category>
		<category><![CDATA[Windows 2008]]></category>

		<guid isPermaLink="false">http://www.geospecialling.com/index.php/2011/12/mapguide-6-5-server-not-found-on-hardened-windows-2008-server/</guid>
		<description><![CDATA[It seems I’ve become the “go to guy” when it comes to Mapguide 6.5 on modern platforms!&#160;&#160; This post builds on my previous post that documents how to install Mapguide 6.5 on Windows 2008.&#160; In this edition we look at the situation faced on a clients server.&#160;&#160; Basically the installation went off without a hitch [...]]]></description>
			<content:encoded><![CDATA[<p>It seems I’ve become the “go to guy” when it comes to <a title="Autodesk Mapguide" href="http://www.mapguide.com" target="_blank">Mapguide</a> 6.5 on modern platforms!&#160;&#160; This post builds on my previous post that documents <a title="Installing Mapguide 6.5 on Windows 2008" href="http://www.geospecialling.com/index.php/2011/10/installing-mapguide-6-5-sp1-on-windows-2008-server/" rel="tag" target="_blank">how to install Mapguide 6.5 on Windows 2008</a>.&#160; In this edition we look at the situation faced on a clients server.&#160;&#160; Basically the installation went off without a hitch with one exception.&#160; When attempting to test the Mapguide 6.5 ISAPI the following error occurred:</p>
<blockquote><p>HTTP Error 500.19 &#8211; Internal Server Error The requested page cannot be accessed because the related configuration data for the page is invalid</p>
</blockquote>
<p>Odd – but I realized immediately this server felt different.&#160; I added the Local Computer \ Users group to the folder permissions for the MapAgents folder and gave that group Read and Execute.&#160; This resulted in the page at least rendering.&#160; At this point the listener was active, but the Mapguide server could not be found.</p>
<blockquote><p>MapGuide Server #1 [Local] Autodesk MapGuide Server could not be found. If you need more assistance, please contact your Autodesk MapGuide Server Administrator.</p>
</blockquote>
<p>This looked similar to the <a title="old Mapguide 6.5 XP SP2 DCOM problem" href="http://forums.autodesk.com/t5/Autodesk-MapGuide/MapAgent-running-but-MapGuide-Server-not-found/td-p/1158970" rel="tag" target="_blank">old DCOM problem</a> that occurred back on XP when you applied Windows XP service pack 2 – but the server service was running.&#160; I checked the DCOM permissions and everything there was correct.&#160; After a bit of messing around I realized that indeed this Windows server was hardened and the permissions has been restricted.&#160; To resolve this problem I had to give the local Users group read and execute permissions to the Mapguide folder.&#160; I had to give the local Users group write access to the logs folder.&#160;&#160; After that the mapagent could talk to the server no problem!</p>
<p>Now I admit I screwed up troubleshooting 101 here.&#160; I had a hard stop coming and really needed to get this resolved ASAP.&#160; Instead of doing one thing at a time and testing I added both permissions.&#160; When I tried to undo the permissions to see if I could replicate the problem I could not reproduce it.&#160; It may be possible that I only needed to give the local Users group modify access to the logs folder.&#160; If you encounter this problem and determine this to be the case please let me know!</p>
<p>If you’re having problems with Mapguide 6.5 and could use a little help – feel free to contact me via <a title="ChasmTech can help you with your Mapguide 6.5 installations" href="http://www.chasmtech.com/about-us/contact" rel="tag" target="_blank">ChasmTech</a>.</p>
<p>&#160;</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:bbb56e20-575a-47f7-ab98-2ccc7a2e41b6" class="wlWriterEditableSmartContent">Technorati Tags: <a href="http://technorati.com/tags/Mapguide" rel="tag">Mapguide</a>,<a href="http://technorati.com/tags/Windows+2008" rel="tag">Windows 2008</a>,<a href="http://technorati.com/tags/ISAPI" rel="tag">ISAPI</a>,<a href="http://technorati.com/tags/IIS" rel="tag">IIS</a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.geospecialling.com/index.php/2011/12/mapguide-6-5-server-not-found-on-hardened-windows-2008-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Country / State Lookup Tables for Oracle</title>
		<link>http://www.geospecialling.com/index.php/2011/12/country-state-lookup-tables-for-oracle/</link>
		<comments>http://www.geospecialling.com/index.php/2011/12/country-state-lookup-tables-for-oracle/#comments</comments>
		<pubDate>Fri, 09 Dec 2011 21:10:15 +0000</pubDate>
		<dc:creator>Darrin Maidlow</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Lookup]]></category>
		<category><![CDATA[Province]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[State]]></category>

		<guid isPermaLink="false">http://www.geospecialling.com/index.php/2011/12/country-state-lookup-tables-for-oracle/</guid>
		<description><![CDATA[The time has come for Country / State-Province lookup tables for Oracle!&#160;&#160; Building on my earlier post on Country / State Lookup Tables for SQL Server I’ve built a new script for Oracle.&#160; This script will create two tables, two sequences for the primary keys, and two triggers to setup the auto-numbering.&#160;&#160; Run the script [...]]]></description>
			<content:encoded><![CDATA[<p>The time has come for Country / State-Province lookup tables for Oracle!&#160;&#160; Building on my earlier post on <a title="Country / State Lookup Tables for SQL Server" href="http://www.geospecialling.com/index.php/2009/02/country-state-province-lookup-tables-for-sql-server/" rel="tag" target="_blank">Country / State Lookup Tables for SQL Server</a> I’ve built a new script for Oracle.&#160; This script will create two tables, two sequences for the primary keys, and two triggers to setup the auto-numbering.&#160;&#160; Run the script and you should be good to go!</p>
<p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:fb3a1972-4489-4e52-abe7-25a00bb07fdf:fdb3ba17-6102-408e-940a-65d70250084a" class="wlWriterEditableSmartContent">
<p> <a href="http://www.geospecialling.com/wp-content/uploads/2011/12/state-prov-country-oracle.zip" target="_blank">Oracle Country / State / Province Lookup Tables</a></p>
</div>
<p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:d928505b-8010-4560-aa94-4c99737e5d75" class="wlWriterEditableSmartContent">Technorati Tags: <a href="http://technorati.com/tags/Oracle" rel="tag">Oracle</a>,<a href="http://technorati.com/tags/State+Province+Lookup+Table" rel="tag">State Province Lookup Table</a></div></p>
]]></content:encoded>
			<wfw:commentRss>http://www.geospecialling.com/index.php/2011/12/country-state-lookup-tables-for-oracle/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Star Wars: The Old Republic Install Download Breakout</title>
		<link>http://www.geospecialling.com/index.php/2011/12/star-wars-the-old-republic-install-download-breakout/</link>
		<comments>http://www.geospecialling.com/index.php/2011/12/star-wars-the-old-republic-install-download-breakout/#comments</comments>
		<pubDate>Thu, 08 Dec 2011 21:59:57 +0000</pubDate>
		<dc:creator>Darrin Maidlow</dc:creator>
				<category><![CDATA[Gaming]]></category>
		<category><![CDATA[MMORPG]]></category>
		<category><![CDATA[Star Wars: The Old Republic]]></category>

		<guid isPermaLink="false">http://www.geospecialling.com/index.php/2011/12/star-wars-the-old-republic-install-download-breakout/</guid>
		<description><![CDATA[And now for something completely random!&#160; Star Wars: The Old Republic has gone live for pre-orders today.&#160; Yesterday I was invited to start downloading the client. (Hey this is my “personal” blog – and sometimes I like to play computer games =))&#160; This post is to smash the hopes of those rocking less than awesome [...]]]></description>
			<content:encoded><![CDATA[<p>And now for something completely random!&#160; <a title="Star Wars:  The Old Republic" href="http://www.swtor.com" rel="tag" target="_blank">Star Wars: The Old Republic</a> has gone live for pre-orders today.&#160; Yesterday I was invited to start downloading the client. (Hey this is my “personal” blog – and sometimes I like to play computer games =))&#160; This post is to smash the hopes of those rocking less than awesome internet!&#160; If you’re not rocking fiber or some other insane internet don’t get TOO excited when you first start downloading SWTOR.&#160; Since we moved out of the city we’ve been rocking the <a title="peasant-net" href="http://www.google.ca/url?sa=t&amp;rct=j&amp;q=xplornet&amp;source=web&amp;cd=1&amp;ved=0CDgQFjAA&amp;url=http%3A%2F%2Fwww.xplornet.com%2F&amp;ei=izDhToy4Bcno2AXzz5j4BA&amp;usg=AFQjCNFjQ1bIGAL3mQ-dw9pVRimbB8rv6A" rel="tag" target="_blank">line-of-sight peasant-net</a> – which actually costs a lot more than the fancy high bandwidth you city slickers get!&#160; I get 3MBit burst for 30 seconds then 2.5Mbit sustained and 0.5Mbit up.&#160; As I started my download I settled in for the long haul..&#160; Here is a summary of my download experience – in point a point form list:</p>
<ul>
<li>The initial download brought down a roughly 1.8GB&#160; video file.&#160;&#160; Ohh this doesn’t look to bad!&#160; </li>
<li>Ok that file is done, Doh, now its downloading an 11GB file.&#160; Ok time for bed. </li>
<li>Oooh 6AM conference call.&#160; Up super early.&#160; Mad at guy that scheduled call at 8am EST.&#160; Oh only 3GB left.&#160; Sweet!</li>
<li>Oh now we have a 60MB file.&#160; Nice.</li>
<li>Oh, shoot, 4GB file.&#160; Great.&#160; At least I’m getting 320KB/s.</li>
<li>Oh okay half a dozen small files totaling a couple hundred megs.&#160; Sweet its installed. Only what, 18GB downloaded?</li>
</ul>
<p>Oh excellent.&#160; Now it’s installed but my account has not yet been activated for pre-release play…Oh well back to work.&#160; Maybe my account will be activated this afternoon? hmmmmm.</p>
<p><a href="http://www.geospecialling.com/wp-content/uploads/2011/12/swtorinstalled.png"><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="swtorinstalled" border="0" alt="swtorinstalled" src="http://www.geospecialling.com/wp-content/uploads/2011/12/swtorinstalled_thumb.png" width="644" height="387" /></a></p>
<p>**Note – in the time it took me to write this post my buddy with Telus Optik downloaded the entire game.</p>
<p>Anyhow – very much looking forward to this game.&#160; Here is a couple screen captures I took from the beta a month ago.&#160; I know you wanted to see them <img src='http://www.geospecialling.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="yea i got me a freakin lightsaber" border="0" alt="yea i got me a freakin lightsaber" src="http://www.geospecialling.com/wp-content/uploads/2011/12/yea-i-got-me-a-freakin-lightsaber_thumb.png" width="244" height="139" /><a href="http://www.geospecialling.com/wp-content/uploads/2011/12/dualLS.png"><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="dualLS" border="0" alt="dualLS" src="http://www.geospecialling.com/wp-content/uploads/2011/12/dualLS_thumb.png" width="244" height="180" /></a></p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:ae9217db-f0d7-4179-8422-2ce84fe7b319" class="wlWriterEditableSmartContent">Technorati Tags: <a href="http://technorati.com/tags/MMORPG" rel="tag">MMORPG</a>,<a href="http://technorati.com/tags/Star+Wars" rel="tag">Star Wars</a>,<a href="http://technorati.com/tags/The+Old+Republic" rel="tag">The Old Republic</a>,<a href="http://technorati.com/tags/Gaming" rel="tag">Gaming</a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.geospecialling.com/index.php/2011/12/star-wars-the-old-republic-install-download-breakout/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Put your credit card to work for you &#8211; a novel way to generate revenue</title>
		<link>http://www.geospecialling.com/index.php/2011/11/put-your-credit-card-to-work-for-you-a-novel-way-to-generate-revenue/</link>
		<comments>http://www.geospecialling.com/index.php/2011/11/put-your-credit-card-to-work-for-you-a-novel-way-to-generate-revenue/#comments</comments>
		<pubDate>Mon, 28 Nov 2011 23:04:57 +0000</pubDate>
		<dc:creator>Darrin Maidlow</dc:creator>
				<category><![CDATA[Small Business]]></category>
		<category><![CDATA[Credit Card]]></category>
		<category><![CDATA[Visa]]></category>

		<guid isPermaLink="false">http://www.geospecialling.com/index.php/2011/11/put-your-credit-card-to-work-for-you-a-novel-way-to-generate-revenue/</guid>
		<description><![CDATA[I’m a huge fan of my RBC Avion Visa.&#160;&#160; It’s one of those random things that get me excited.&#160;&#160; Every year I deposit a significant amount of money into my retirement savings (RRSP) thanks to my credit card.&#160; I thought I would share this technique with you.&#160; These principles should work with any card that [...]]]></description>
			<content:encoded><![CDATA[<p>I’m a huge fan of my <a title="RBC Avion Visa" href="http://www.rbcroyalbank.com/credit-cards/travel-credit-cards/platinum-avion.html" rel="tag" target="_blank">RBC Avion Visa.</a>&#160;&#160; It’s one of those random things that get me excited.&#160;&#160; Every year I deposit a significant amount of money into my retirement savings (RRSP) thanks to my credit card.&#160; I thought I would share this technique with you.&#160; These principles should work with any card that gives points that you can redeem for gift certificates or cash back, though this post focuses on the RBC Avion.&#160;&#160; With <a title="RBC Rewards" href="https://points.rbcrewards.com/Catalogue/Financial" rel="tag" target="_blank">this program</a> you can get gift certificates for RRSPs, RESPs, or put towards loans or mortgages.</p>
<p>I’m in no way endorsing any particular bank or program here.&#160; RBC’s Avion visa is the program I’m familiar with and I’ve been using for the past six years.&#160; Please feel free to leave a comment describing your experiences with other banks and rewards programs.</p>
<h2>Interest kills the entire thing</h2>
<p>The very first thing you need to know is that you can NOT carry a balance on your card.&#160; <strong>Ever</strong>.&#160; These “premium” cards that give points always have a very high interest rate – 19% and up.&#160; Carrying even a tiny balance will eat any potential benefits in no time.&#160; Though I never encourage spending more than you can afford, if one month you over extend yourself, paying off your balance with a lower interest credit&#160; might be your best option.&#160; It’s important to note that if used properly, a credit card is a free loan.&#160; Depending on the timing of your purchase(s) you can get up to a 45 day, interest free loan.&#160;&#160; </p>
<h2>Use Your Visa for EVERYTHING</h2>
<p>The next key step to this process is to use your Visa card for EVERYTHING.&#160; Even if you have cash in your wallet get used to using your Visa exclusively.&#160; Save your cash to pay off your next Visa statement!&#160; Setup as many of your automatic monthly expenses as possible to automatically deduct from your Visa:</p>
<ul>
<li>Cell Phone</li>
<li>Home Phone</li>
<li>Satellite / Cable TV</li>
<li>Internet</li>
<li>etc.</li>
</ul>
<p>This also has the added benefit of making bills a little easier to pay each month as instead of having to pay them individually.&#160;&#160; There are several other benefits to this including no debit card fees, better exchange rates than cash when travelling abroad, and you also get all the various benefits of the premium card like insurance and what not.&#160; Sadly my power and gas companies refuse to accept Visa so I have to waste time each month to manually transfer money to each one of these accounts.&#160; (Come on Epcor and Altagas.&#160; Get with the times).</p>
<p>Big ticket items rack up the points quickly.&#160; If you’re planning on buying a new TV or other large items– put it on the card.&#160; We renovated our new home this year and I managed to get 75% of the expenses on my visa.&#160; This significantly increased the points earned for the year.&#160;&#160; A lot of times car dealerships will let you make a down payment on a new vehicle using your Visa.&#160; It is unlikely they will let you buy the entire vehicle using your card, as there are costs to vendors when accepting credit cards.&#160;&#160; </p>
<p>Let’s consider the new car scenario.&#160; Assume for a minute you have negotiated a price of $10K for a new vehicle.&#160; You have $10K in cash in the bank to pay for your new vehicle.&#160;&#160; The dealership will allow you to pay for up to $5000 of your new vehicle using your credit card.&#160;&#160; Instead of giving the dealership $10K in cash, you make one payment of $5000 with your Visa, and one payment of $5000 with your cash.&#160; At the end of the month you use the other $5000 to pay off your credit card.&#160; So at this point you’ve spend the same amount of money BUT you gained 5000 points.</p>
<p>Using a credit card this was does take some personal responsibility and care.&#160; Spending on credit as opposed to spending cash can result in EASILY over spending.&#160; Be mindful of this if you’re new to credit cards.&#160;&#160; Learn your payment due dates and set calendar reminders for the day before as well as the week before to make sure you pay it on time!</p>
<h2>Leverage your business</h2>
<p>Companies spend a lot of money.&#160; Especially technology companies!&#160; Software, hardware, books, meals, travel etc – it all adds up.&#160; Ask your bank if you can setup a corporate business card and have the points transfer into your personal card.&#160; RBC let me setup a company Avion card and each month the points are transferred.&#160; I run my business almost exclusively using this card.&#160; With the exception of payroll and the odd strange expense that requires checks &#8211; 99% of my company spending happens through my corporate card.&#160; This also makes my accounting significantly simpler and saves me money on bookkeeping and accounting come year end.</p>
<h2>Profit from your employer</h2>
<p>Years ago when I worked for a company where I was the head of IT in addition to being a software developer.&#160; My boss was really cool back in the day when it came to expenses for the company.&#160; He would let me make purchases (including very significant ones) for the company using my personal card and expense them back to the company.&#160; Not only did this help me build up points – but it also helped me build up a great credit rating.&#160; When I moved on to start my own business I had a personal credit card with a huge limit (tens of thousands) that I paid off every month.&#160; This really helped my personal credit at a critical time in my life.</p>
<p>So if you can spend on behalf of your employer and be reimbursed each month go for it.&#160; Free points == free money!</p>
<h2>45 day interest free loan</h2>
<p>What the heck I’ll share this little tidbit too.&#160; Find your credit card cutoff date.&#160; This is the date that charges for the current month are stopped and will start to count against the next month.&#160; For example, both my cards (personal and corporate) are synchronized.&#160; The cutoff is the 10th of each month.&#160; So any charges made up to and including the 10th will need to be paid on the 27th of that month.&#160; Anything charged on the 11th or later will need to be paid on the 27th of the following month.&#160; This is significant.&#160; There are not many other ways to get a 45 day interest free loan.</p>
<h2>Redeem early.&#160; Redeem often!</h2>
<p>This is especially important for rewards going into investment accounts or that go towards paying down mortgages.&#160; I used to wait until the end of the year to cash out my points and do one large deposit into my investment account.&#160; I realized that this was silly.&#160; Now I strive for quarterly deposits.&#160; This lets me try and capitalize on market downturns – buying low!&#160; Also if you’re going for other rewards like mortgage payments – why pay the extra interest with a single deposit?&#160; Instead of depositing say 1000$ once a year, do 250$ quarterly.&#160; This decreases the principle of your loan and in turn the interest paid.</p>
<p>With the <a title="RBC Registered RRSP rewards" href="https://points.rbcrewards.com/Catalogue/FinancialCategory/180" rel="tag" target="_blank">RRSP rewards</a> it costs 3000 points to redeem 25$ worth of credit.&#160; There is a minimum purchase requirement of 12000 points&#160; which results in a 100$ gift cert.&#160; After that the amount increases in 3000 point increments.&#160; Redeem 60K points, get 500$ gift certificate. </p>
<p>One last benefit to an RRSP contribution is that in addition to the 25$ going into your account – you SHOULD get a ~5$ tax refund on that amount at the end of the year.&#160; This makes the 3000 points actually worth a little bit more.&#160; The same can be said about paying down mortgage principle – you should save money in interest.</p>
<h2>Nifty huh?&#160; </h2>
<p>So by changing the way you spend money you already spend in life you can gain a number of benefits – free 45 day loans, save money on accounting, save time paying bills and finally – free money!&#160; I’d love to hear about other creative ways to use your credit card to earn reward points.&#160; I’d also love to hear about other banks and credit card programs.&#160; Please feel free to contact me by e-mail, Google+ or leave a comment here!</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:341dbef8-c83e-4996-87e6-7a7b042ae043" class="wlWriterEditableSmartContent">Technorati Tags: <a href="http://technorati.com/tags/Finance" rel="tag">Finance</a>,<a href="http://technorati.com/tags/Credit+Cards" rel="tag">Credit Cards</a>,<a href="http://technorati.com/tags/Avion" rel="tag">Avion</a>,<a href="http://technorati.com/tags/Visa" rel="tag">Visa</a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.geospecialling.com/index.php/2011/11/put-your-credit-card-to-work-for-you-a-novel-way-to-generate-revenue/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OracleCommand and parameterized update statements</title>
		<link>http://www.geospecialling.com/index.php/2011/11/oraclecommand-and-parameterized-update-statements/</link>
		<comments>http://www.geospecialling.com/index.php/2011/11/oraclecommand-and-parameterized-update-statements/#comments</comments>
		<pubDate>Tue, 08 Nov 2011 22:07:53 +0000</pubDate>
		<dc:creator>Darrin Maidlow</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[RADE]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[ODP.NET]]></category>
		<category><![CDATA[Parameterized Queries]]></category>

		<guid isPermaLink="false">http://www.geospecialling.com/index.php/2011/11/oraclecommand-and-parameterized-update-statements/</guid>
		<description><![CDATA[This week I encountered an irritating situation with Oracle while working on code in the RADE application logic.&#160; In a nutshell I am building dynamically created parameterized insert and update statements based on the RADE metadata and the values entered by the user.&#160; The first call InsertNewRecord works perfectly.&#160; The next call UpdateExistingRecord however was [...]]]></description>
			<content:encoded><![CDATA[<p>This week I encountered an irritating situation with Oracle while working on code in the <a title="RADE" href="http://www.geospecialling.com/index.php/2008/06/rade-build-custom-web-applications-without-writing-custom-code/" rel="tag" target="_blank">RADE</a> application logic.&#160; In a nutshell I am building dynamically created parameterized insert and update statements based on the RADE metadata and the values entered by the user.&#160; The first call InsertNewRecord works perfectly.&#160; The next call UpdateExistingRecord however was not.&#160; The parameterized SQL was being created.&#160; The parameters were being created and assigned to the <a title="DbCommand" href="http://msdn.microsoft.com/en-us/library/system.data.common.dbcommand.aspx" rel="tag" target="_blank">DbCommand</a>.&#160; The ExecuteNonQuery() call was executing without returning an error.&#160; Oracle just would not update.&#160;&#160; Even more frustrating – this “just worked” in SQL server.</p>
<h2>What were the differences?</h2>
<p>The basic logic for insert was this (parts omitted because you probably just don’t care):</p>
<ol>
<li>Get table metadata </li>
<li>Loop through fields in table </li>
<li>for each field retrieve the value from the UI </li>
<li>Add field to parameterized SQL statement with placeholder </li>
<li>Create new parameter with appropriate name and value.&#160;&#160; Add parameter to collection </li>
<li>Loop through parameters in the collection and add to the DbCommand </li>
<li>Finally execute the parameterized SQL statement </li>
</ol>
<p>As I mentioned this worked great.&#160; Fields were inserted and there was much rejoicing.</p>
<p>The logic for an update was similar but there was one big difference:</p>
<ol>
<li>Get Table </li>
<li>Loop through fields in table </li>
<li>for each field retrieve the value from the UI </li>
<li>If the field is a key add the placeholder to the where condition, otherwise add the field name and value to the update fields part of the SQL </li>
<li>Create new parameter with appropriate name and value.&#160; Add parameter to collection </li>
<li>Loop through parameters in the collection and add to the DbCommand </li>
<li>Finally execute the parameterized SQL statement. </li>
</ol>
<p>The branch in step 4 and the if statement ended up causing the problem.</p>
<h2>The Problem</h2>
<p><a title="OracleCommand" href="http://msdn.microsoft.com/en-us/library/system.data.oracleclient.oraclecommand(v=VS.100).aspx" rel="tag" target="_blank">OracleCommand</a> defaults to “bind by order” – making the order in which the parameters exist in the SQL statement match the order in which the parameters are added to the OracleCommand. This was happening during the insert because of the structure of an insert statement being so linear. However in the update statement I was building the SQL in a more dynamic way. I was maintaining a list field=value conditions and a separate where condition. In the ended up merging them :</p>
<div>
<div style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px">
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">   1:</span> String parameterizedSQL = <span style="color: #006080">&quot;UPDATE &quot;</span> + table.Name + <span style="color: #006080">&quot; SET &quot;</span> + updateStatement + <span style="color: #006080">&quot; WHERE &quot;</span> + whereStatement;</pre>
</p></div>
</div>
<p>So unless my key field( s) all lined up at the end of the table metadata definitions,&#160; appending that where condition at the end my parameter order got all out of whack in the DbCommand.&#160; So my where condition was actually being set to the wrong value – which could have resulted in the wrong records being updated. Nasty.&#160;&#160; Fortunately this can be resolved.</p>
<h2>The Fix – BindByName=true</h2>
<p>To correct this I had to set the Oracle specific BindByName property to true.&#160; (btw this being the default behavior is just silly.&#160; All the other big data providers default to bind by name and Oracle should too.&#160; That’s a rant for another day though.)&#160;&#160; My initial solution was to check if the command is an OracleCommand and if found do a little casting to set the BindByName property then recast it back to DbCommand before executing the query.&#160; Constructive feedback is always welcome!</p>
<div>
<div style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px">
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">   1:</span> <span style="color: #008000">/// &lt;summary&gt;</span></pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">   2:</span> <span style="color: #008000">/// Execute the parameterized query</span></pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">   3:</span> <span style="color: #008000">/// &lt;/summary&gt;</span></pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">   4:</span> <span style="color: #008000">/// &lt;param name=&quot;conn&quot;&gt;open and active DbConnection&lt;/param&gt;</span></pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">   5:</span> <span style="color: #008000">/// &lt;param name=&quot;trans&quot;&gt;Active DbTransaction&lt;/param&gt;</span></pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">   6:</span> <span style="color: #008000">/// &lt;param name=&quot;parameterizedSQL&quot;&gt;the parameterized SQL&lt;/param&gt;</span></pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">   7:</span> <span style="color: #008000">/// &lt;param name=&quot;paramList&quot;&gt;List of OledDbParameter&lt;/param&gt;</span></pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">   8:</span> <span style="color: #008000">/// &lt;returns&gt;DataTable containing the results&lt;/returns&gt;</span></pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">   9:</span> <span style="color: #0000ff">public</span> <span style="color: #0000ff">static</span> <span style="color: #0000ff">void</span> RunParameterizedInsertUpdate(DbConnection conn, DbTransaction trans, String parameterizedSQL, List&lt;DbParameter&gt; paramList)</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  10:</span> {</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  11:</span>     <span style="color: #008000">//create the db command and set the parameterized SQL as a property</span></pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  12:</span>     DbCommand command = conn.CreateCommand();</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  13:</span>     <span style="color: #0000ff">if</span>(trans != <span style="color: #0000ff">null</span>)</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  14:</span>     {</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  15:</span>         command.Transaction = trans;</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  16:</span>     }</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  17:</span>     <span style="color: #008000">//hack attack!  By default, Oracle requires its parameters to be placed into the command</span></pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  18:</span>     <span style="color: #008000">//in the order the parameters appear in the parameterized SQL.  Little hackery here</span></pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  19:</span>     <span style="color: #008000">//to set the Oracle Command to bind by name</span></pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  20:</span>     <span style="color: #0000ff">if</span> (command <span style="color: #0000ff">is</span> Oracle.DataAccess.Client.OracleCommand)</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  21:</span>     {</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  22:</span>         OracleCommand oraCmd = (OracleCommand) command;</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  23:</span>         oraCmd.BindByName = <span style="color: #0000ff">true</span>;</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  24:</span>         command = oraCmd;</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  25:</span>     }</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  26:</span>     command.CommandText = parameterizedSQL;</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  27:</span>     command.CommandType = CommandType.Text;</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  28:</span>&#160; </pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  29:</span>     <span style="color: #008000">//loop through the params and add them to the command</span></pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  30:</span>     <span style="color: #0000ff">foreach</span> (DbParameter parameter <span style="color: #0000ff">in</span> paramList)</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  31:</span>     {</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  32:</span>         command.Parameters.Add(parameter);</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  33:</span>     }</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  34:</span>     <span style="color: #0000ff">try</span></pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  35:</span>     {</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  36:</span>         command.Prepare();</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  37:</span>         command.ExecuteNonQuery();</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  38:</span>     }</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  39:</span>     <span style="color: #0000ff">catch</span> (Exception ex)</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  40:</span>     {</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  41:</span>         command.Dispose();</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  42:</span>         <span style="color: #0000ff">throw</span>;</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  43:</span>     }</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  44:</span> }</pre>
</p></div>
</div>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:65e08d4f-940e-4b86-baf5-ae193e7dbe34" class="wlWriterEditableSmartContent">Technorati Tags: <a href="http://technorati.com/tags/Oracle.+ODP.NET" rel="tag">Oracle. ODP.NET</a>,<a href="http://technorati.com/tags/c%23" rel="tag">c#</a>,<a href="http://technorati.com/tags/parameterized+query" rel="tag">parameterized query</a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.geospecialling.com/index.php/2011/11/oraclecommand-and-parameterized-update-statements/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Introducing Question of the Week for ObjectARX.NET and Mapguide</title>
		<link>http://www.geospecialling.com/index.php/2011/11/introducing-question-of-the-week-for-objectarx-net-and-mapguide/</link>
		<comments>http://www.geospecialling.com/index.php/2011/11/introducing-question-of-the-week-for-objectarx-net-and-mapguide/#comments</comments>
		<pubDate>Sat, 05 Nov 2011 05:32:30 +0000</pubDate>
		<dc:creator>Darrin Maidlow</dc:creator>
				<category><![CDATA[AutoCAD]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Mapguide]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[Mapguide Enterprise]]></category>
		<category><![CDATA[ObjectARX.NET]]></category>
		<category><![CDATA[QOTW]]></category>

		<guid isPermaLink="false">http://www.geospecialling.com/index.php/2011/11/introducing-question-of-the-week-for-objectarx-net-and-mapguide/</guid>
		<description><![CDATA[Every good developer is constantly evolving and learning new technologies.&#160; This can be a challenge when you’re hard at work in maintenance mode on familiar technology or when your every day needs don’t go as deeply into topics as you would like.&#160; If you take a step back and look at AutoCAD and ObjectARX – [...]]]></description>
			<content:encoded><![CDATA[<p>Every good developer is constantly evolving and learning new technologies.&#160; This can be a challenge when you’re hard at work in maintenance mode on familiar technology or when your every day needs don’t go as deeply into topics as you would like.&#160; </p>
<p>If you take a step back and look at AutoCAD and <a title="ObjectARX" href="http://usa.autodesk.com/adsk/servlet/index?id=773204&amp;siteID=123112" rel="tag" target="_blank">ObjectARX</a> – its a huge body of work and it is a challenge to get experience in all the various parts of it.&#160; The recent request I received on how to <a title="Control AutoCAD ribbon from Visual Lisp" href="http://www.geospecialling.com/index.php/2011/10/control-active-autocad-ribbon-tab-from-visual-lisp-ribbonninja/" rel="tag" target="_blank">control the AutoCAD ribbon from Visual Lisp</a> or the command line and the subsequent research, code and blog post I wrote made me think,&#160; what if I solicited small problems from the AutoCAD community that could make fun little 4 hour research projects.&#160; These would allow me to dig into various portions of ObjectARX.NET once a week, write some fun code, and give me things to write about.&#160; Everybody wins!</p>
<p>I’m looking to spend about 4-6 hours on each question.&#160; I’m hoping to do one question per week, assuming I get enough requests.&#160; I’ll provide the full source and project with each post.&#160; All code will be written in c#.&#160; Some examples of valid requests would be:</p>
<ul>
<li>Submit a Visual Lisp routine to convert to ObjectARX.NET.</li>
<li>Request a particular routine that does some sort of drawing clean up or modifies something.</li>
<li>Identify some functionality that is missing in AutoCAD.</li>
<li>Request a piece of sample code explaining how to use API x of ObjectARX.NET or Mapguide Enterprise/Open Source.</li>
</ul>
<h2>The Do’s</h2>
<ul>
<li>Please keep your request realistic.&#160;&#160; I’ve only got 4 to 6 hours and you’re not paying me =)</li>
<li>Please submit specific functionality along with sample data.</li>
<li>Please be available to answer any questions&#160; I might have via e-mail, phone/skype or possibly gotomeeting.</li>
<li>Please keep the underlying technology somewhat current.&#160; Don’ t request AutoCAD/Mapguide 2007.</li>
<li>Please review my code and comment if you see something wrong or that I could do more efficiently.&#160; This is about me learning and I’m gonna make mistakes.</li>
</ul>
<h2>The Don&#8217;ts</h2>
<ul>
<li>Don’t expect days worth of work, I just don’t have that much spare time.</li>
<li>Don’t ask me to work on your project (unless of course you want to hire my team via <a title="ChasmTech Consuting Services" href="http://www.chasmtech.com/services/consulting" rel="tag" target="_blank">ChasmTech</a>).</li>
<li>Please don’t get upset if I don’t pick your question.</li>
<li>I did my ten odd years in the trenches writing Visual Lisp – I don’t really want to write any more, so please don’t ask for lisp code.</li>
<li>Don’t be a ass.&#160; I don’t have time for asses.</li>
</ul>
<h2>Let’s See What Happens</h2>
<p>So I have no idea how this will play out.&#160; I don’t know if 4-6 hours is a reasonable amount of time to allocate each week to do this right.&#160;&#160; I don’t know if I will be able to make the time every week.&#160; Maybe I’ll change it from “Question of the Week” to “Question of the Every Second Week”.&#160; I’m going to put this out there and see what happens.&#160;&#160; I reserve the right to change anything and everything! s&#160; E-mail your requests to contact ~@~ geospecialling dot com.</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:317ea19e-9f67-4cf5-8050-e6e87582ce9e" class="wlWriterEditableSmartContent">Technorati Tags: <a href="http://technorati.com/tags/ObjectARX.NET" rel="tag">ObjectARX.NET</a>,<a href="http://technorati.com/tags/Visual+Lisp" rel="tag">Visual Lisp</a>,<a href="http://technorati.com/tags/AutoCAD" rel="tag">AutoCAD</a>,<a href="http://technorati.com/tags/Mapguide" rel="tag">Mapguide</a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.geospecialling.com/index.php/2011/11/introducing-question-of-the-week-for-objectarx-net-and-mapguide/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Remotesoft Protector Runtime Error &#8211; yet to handle multiple .NET framework runtime</title>
		<link>http://www.geospecialling.com/index.php/2011/11/remotesoft-protector-runtime-error-yet-to-handle-multiple-net-framework-runtime/</link>
		<comments>http://www.geospecialling.com/index.php/2011/11/remotesoft-protector-runtime-error-yet-to-handle-multiple-net-framework-runtime/#comments</comments>
		<pubDate>Thu, 03 Nov 2011 03:07:49 +0000</pubDate>
		<dc:creator>Darrin Maidlow</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[Code Protection]]></category>
		<category><![CDATA[Remotesoft Protector]]></category>

		<guid isPermaLink="false">http://www.geospecialling.com/index.php/2011/11/remotesoft-protector-runtime-error-yet-to-handle-multiple-net-framework-runtime/</guid>
		<description><![CDATA[Remotesoft protector is one of the best code protection tools out there.&#160; In fact, its pretty much the only one that really works.&#160; Since I moved to .NET 4.0 I’ve been getting an annoying error when attempting to protect my binaries using the 4.0 suite of tools (with the updated protector runtime).&#160; Everything still runs [...]]]></description>
			<content:encoded><![CDATA[<p>Remotesoft protector is one of the <a title="Remotesoft protector" href="http://www.remotesoft.com/salamander/protector.html" rel="tag" target="_blank">best code protection tools</a> out there.&#160; In fact, its pretty much the only one that really works.&#160; Since I moved to .NET 4.0 I’ve been getting an annoying error when attempting to protect my binaries using the 4.0 suite of tools (with the <a title="updated protector runtime" href="http://www.remotesoft.com/salamander/download_protector/rscoree.zip" rel="tag" target="_blank">updated protector runtime</a>).&#160; Everything still runs – it just pops up nasty alert boxes on load which is no good <img src='http://www.geospecialling.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<blockquote><p>Remotesoft Protector Runtime Error &#8211; yet to handle multiple .NET framework runtime</p>
</blockquote>
<p>One other symptom of this was that .exe files would just blow chunks.&#160; I’ve finally figured out what was causing this!&#160; Most of our products are protected during the nightly builds.&#160; This error however is specific to assemblies protected using the the Remotesoft .NET Explorer UI.&#160; When using this application for the protect or obfuscate functionality it is really just a front end around the protector.exe/obfuscator.exe.&#160; The UI is building the following command line string and tonight it finally dawned on me:<a href="http://www.geospecialling.com/wp-content/uploads/2011/11/Remotesoft-.NET-Explorer.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: right; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Remotesoft .NET Explorer" border="0" alt="Remotesoft .NET Explorer" align="right" src="http://www.geospecialling.com/wp-content/uploads/2011/11/Remotesoft-.NET-Explorer_thumb.png" width="232" height="244" /></a></p>
<blockquote><p>Command: C:\Program Files (x86)\Remotesoft\Protector\bin\protector.exe -neutral -resource -string -cctor -clrversion v2.0.50727 &quot;C:\temp\SmartInk for Kahua\SmartInk.UI.exe&quot;</p>
</blockquote>
<p>The UI was forcing the clr version to .NET 2.0 – when my assemblies are all built against .NET 4.0.&#160; Oops…</p>
<p>After a bit of digging I found that you can set the CLR version in .NET Explorer from the Action / CLR Version menu item.&#160; Unfortunately it has not been updated to support .NET 4.0 – and so has been rendered pretty much useless as a front end for protector.</p>
<h2>The Fix</h2>
<p>The only solution is to use the command line to execute your protection.&#160;&#160; The updated command line ended up looking pretty similar:</p>
<blockquote><p>&quot;C:\Program Files (x86)\Remotesoft\Protector\bin\protector.exe&quot; -neutral -resource -string&#160; -clrversion v4.0.30319 &quot;C:\temp\SmartInk for Kahua\SmartInk.UI.exe&quot;</p>
</blockquote>
<p>There you have it – I can’t believe I missed that…</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:372d8d96-7723-4196-8917-b501d70c3e74" class="wlWriterEditableSmartContent">Technorati Tags: <a href="http://technorati.com/tags/Remotesoft+Protector" rel="tag">Remotesoft Protector</a>,<a href="http://technorati.com/tags/.NET" rel="tag">.NET</a>,<a href="http://technorati.com/tags/Code+Protection" rel="tag">Code Protection</a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.geospecialling.com/index.php/2011/11/remotesoft-protector-runtime-error-yet-to-handle-multiple-net-framework-runtime/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Control Active AutoCAD Ribbon Tab from Visual Lisp &#8211; RibbonNinja!</title>
		<link>http://www.geospecialling.com/index.php/2011/10/control-active-autocad-ribbon-tab-from-visual-lisp-ribbonninja/</link>
		<comments>http://www.geospecialling.com/index.php/2011/10/control-active-autocad-ribbon-tab-from-visual-lisp-ribbonninja/#comments</comments>
		<pubDate>Fri, 28 Oct 2011 23:18:07 +0000</pubDate>
		<dc:creator>Darrin Maidlow</dc:creator>
				<category><![CDATA[AutoCAD]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Ninjas]]></category>
		<category><![CDATA[ObjectARX.NET]]></category>
		<category><![CDATA[Ribbon]]></category>
		<category><![CDATA[Visual Lisp]]></category>

		<guid isPermaLink="false">http://www.geospecialling.com/index.php/2011/10/control-active-autocad-ribbon-tab-from-visual-lisp-ribbonninja/</guid>
		<description><![CDATA[A friend asked me recently if there was some way to control the active AutoCAD ribbon tab from a macro.&#160; After a little bit of digging I could not find any lisp or command line command that would do this.&#160; ObjectARX however does provide the functionality I needed so I decided to whip something together [...]]]></description>
			<content:encoded><![CDATA[<p>A friend asked me recently if there was some way to control the active <a title="http://usa.autodesk.com/autocad/" href="http://usa.autodesk.com/autocad/" rel="tag" target="_blank">AutoCAD</a> ribbon tab from a macro.&#160; After a little bit of digging I could not find any lisp or command line command that would do this.&#160; ObjectARX however does provide the functionality I needed so I decided to whip something together in c#.&#160; I’ve named it RibbonNinja – because lets face it, ninjas are awesome and should play a much larger part of everyday life.</p>
<h2>How’s it work?</h2>
<p>Attached is a zip file that contains the dll.&#160; To use this simply netload the dll into your AutoCAD session and issue the all powerful RibbonNinja lisp call.&#160; It takes a single string parameter that is the name of the tab you want to activate.&#160; If it finds and activates the tab it will return T, if not it returns nil.&#160; For example given the following AutoCAD ribbon:</p>
<p><a href="http://www.geospecialling.com/wp-content/uploads/2011/10/mapribbon.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="mapribbon" border="0" alt="mapribbon" src="http://www.geospecialling.com/wp-content/uploads/2011/10/mapribbon_thumb.png" width="644" height="107" /></a></p>
<p>Issuing the following lisp statement will change the active tab from “Map Setup” to “Analyze”.&#160; Then it would switch to “Home&quot;</p>
<div>
<div style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px">
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">   1:</span> (RibbonNinja “Analyze”)</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">   2:</span> (RibbonNinja “Home”)</pre>
</p></div>
</div>
<p>This code is not case sensitive.&#160; If its even possible to have multiple menus within AutoCAD with the same spelling but in different cases you’re probably S.O.L. and it will always choose the last one.&#160; I’ve assumed unique tab names.</p>
<p>This dll has been compiled to work against AutoCAD 2012.&#160; It will support both x86 and x64 versions.&#160; It should also work on any AutoCAD vertical (i.e AutoCAD Map, Civil, ADT etc etc).&#160; If you get the following&#160; error when you try to netload the dll we have one last change to make:</p>
<blockquote>
<p><em>Cannot load assembly. Error details: System.IO.FileLoadException: Could not load file or assembly &#8216;file:///C:\Program Files\Autodesk\AutoCAD 2012 – English\RibbonNinja.dll&#8217; or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0&#215;80131515) File name: &#8216;file:/// C:\Program Files\Autodesk\AutoCAD 2012 – English\RibbonNinjadll &#8216; &#8212;&gt; System.NotSupportedException: An attempt was made to load an assembly from a network location which would have caused the assembly to be sandboxed in previous versions of the .NET Framework. This release of the .NET Framework does not enable CAS policy by default, so this load may be dangerous. If this load is not intended to sandbox the assembly, please enable the loadFromRemoteSources switch.</em></p>
</blockquote>
<p>Please read and try the following posts.&#160; .NET 4.0 is “protecting” us so we need to fix that.&#160; First you can try and “unblock” the dll following the steps outlined on <a title="Unblock dlls to prevent error loading on netload" href="http://labs.blogs.com/its_alive_in_the_lab/2011/05/unblock-net.html" rel="tag" target="_blank">Scott Sheppard’s blog</a>.&#160; If that doesn’t work for you again shut down AutoCAD and edit your acad.exe.config file as explained by Kean Walmsley on <a title="edit AutoCAD config to load downloaded dlls" href="http://through-the-interface.typepad.com/through_the_interface/2011/07/loading-blocked-and-network-hosted-assemblies-with-net-4.html" rel="tag" target="_blank">Through the Interface</a>.&#160; Remember to run notepad or whatever editor you’re using as an administrator – or you will get permission errors when you try to save the config file.</p>
<h2>Turn up the nerd</h2>
<p>For those of you more technically inclined the source is pretty simple once you figure out the mess of&#160; references that are needed:</p>
<div>
<div style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px">
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">   1:</span> [LispFunction(<span style="color: #006080">&quot;RibbonNinja&quot;</span>)]</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">   2:</span> <span style="color: #0000ff">public</span> TypedValue GoNinjaGoNinjaGo(ResultBuffer lispArgs)</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">   3:</span> {</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">   4:</span>     <span style="color: #008000">//check the params</span></pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">   5:</span>     Editor ed = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor;</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">   6:</span>     <span style="color: #0000ff">if</span> (lispArgs == <span style="color: #0000ff">null</span>)</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">   7:</span>     {</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">   8:</span>         ed.WriteMessage(<span style="color: #006080">&quot;\nIncorrect number of arguments.  Expected 1 parameter, received none\n&quot;</span>);</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">   9:</span>         <span style="color: #0000ff">return</span> <span style="color: #0000ff">new</span> TypedValue((<span style="color: #0000ff">int</span>)LispDataType.Nil);</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  10:</span>     }</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  11:</span>&#160; </pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  12:</span>     <span style="color: #0000ff">if</span>(lispArgs.AsArray().Length != 1)</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  13:</span>     {</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  14:</span>         ed.WriteMessage(<span style="color: #006080">&quot;\nRibbonNinja - Incorrect number of arguments.  Expected String - tab keyboard shortcut\n&quot;</span>);</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  15:</span>         <span style="color: #0000ff">return</span> <span style="color: #0000ff">new</span> TypedValue((<span style="color: #0000ff">int</span>)LispDataType.Nil);</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  16:</span>     }</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  17:</span>     <span style="color: #008000">//get the tab name</span></pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  18:</span>     String tabKey = Convert.ToString(lispArgs.AsArray()[0].Value);</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  19:</span>&#160; </pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  20:</span>     <span style="color: #008000">//get the ribbon</span></pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  21:</span>     Autodesk.Windows.RibbonControl ribCntrl = Autodesk.AutoCAD.Ribbon.RibbonServices.RibbonPaletteSet.RibbonControl;</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  22:</span>     </pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  23:</span>     <span style="color: #008000">//find the custom tab using the Id</span></pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  24:</span>     <span style="color: #0000ff">foreach</span> (RibbonTab tab <span style="color: #0000ff">in</span> ribCntrl.Tabs)</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  25:</span>     {</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  26:</span>         <span style="color: #008000">//is this the one we're looking for?</span></pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  27:</span>         <span style="color: #0000ff">if</span>(tab.AutomationName.ToUpper() == tabKey.ToUpper())</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  28:</span>         {</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  29:</span>             <span style="color: #008000">//yup - get it active and bail. weeeeee</span></pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  30:</span>             tab.IsActive = <span style="color: #0000ff">true</span>;</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  31:</span>             <span style="color: #0000ff">return</span> <span style="color: #0000ff">new</span> TypedValue((<span style="color: #0000ff">int</span>)LispDataType.T_atom);</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  32:</span>         }</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  33:</span>     }</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  34:</span>     <span style="color: #0000ff">return</span> <span style="color: #0000ff">new</span> TypedValue((<span style="color: #0000ff">int</span>)LispDataType.Nil);</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">  35:</span> }</pre>
</p></div>
</div>
<p>Thanks for the challenge <a title="https://plus.google.com/u/0/115187156780570046715/posts" href="https://plus.google.com/u/0/115187156780570046715/posts" target="_blank">Shawn</a>!&#160; Here is your shiny new </p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:fb3a1972-4489-4e52-abe7-25a00bb07fdf:77ce2ccf-4665-421a-ac2e-4c1c21d24c4b" class="wlWriterEditableSmartContent">
<p> <a href="http://www.geospecialling.com/wp-content/uploads/2011/10/RibbonNinja3.zip" target="_blank">RibbonNinja DLL</a></p>
</div>
<p>.&#160; Feel free to use this commercially – I always appreciate links to my posts in exchange&#160; =) </p>
<p>p.s. Two posts in two days.&#160; that’s crazy talk I tell ya!</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:b2a16783-b26e-44d7-b233-5be350d07e6f" class="wlWriterEditableSmartContent">Technorati Tags: <a href="http://technorati.com/tags/AutoCAD" rel="tag">AutoCAD</a>,<a href="http://technorati.com/tags/ObjectARX.NET" rel="tag">ObjectARX.NET</a>,<a href="http://technorati.com/tags/AutoCAD+Customization" rel="tag">AutoCAD Customization</a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.geospecialling.com/index.php/2011/10/control-active-autocad-ribbon-tab-from-visual-lisp-ribbonninja/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Installing Mapguide 6.5 SP1 on Windows 2008 Server</title>
		<link>http://www.geospecialling.com/index.php/2011/10/installing-mapguide-6-5-sp1-on-windows-2008-server/</link>
		<comments>http://www.geospecialling.com/index.php/2011/10/installing-mapguide-6-5-sp1-on-windows-2008-server/#comments</comments>
		<pubDate>Thu, 27 Oct 2011 23:22:24 +0000</pubDate>
		<dc:creator>Darrin Maidlow</dc:creator>
				<category><![CDATA[Mapguide]]></category>
		<category><![CDATA[Hackery]]></category>
		<category><![CDATA[IIS 7]]></category>
		<category><![CDATA[Orca]]></category>
		<category><![CDATA[Windows 2008]]></category>

		<guid isPermaLink="false">http://www.geospecialling.com/index.php/2011/10/installing-mapguide-6-5-sp1-on-windows-2008-server/</guid>
		<description><![CDATA[In reply to a previous comment I assumed that Windows 2008 was “close enough” to Vista and that Mapguide 6.5 would install no problem.&#160; I was wrong.&#160; When attempting the install I was prompted with an “MDAC Not Detected” warning.&#160; MDAC you may remember is the old tyme “Microsoft Data Access Component” and 2.8 was [...]]]></description>
			<content:encoded><![CDATA[<p>In reply to a previous comment I assumed that Windows 2008 was “close enough” to Vista and that <a title="Autodesk Mapguide" href="http://www.mapguide.com" target="_blank">Mapguide</a> 6.5 would install no problem.&#160; I was wrong.&#160; When attempting the install I was prompted with</p>
<p><a href="http://www.geospecialling.com/wp-content/uploads/2011/10/Mapguide-6.5-MDAC-2.8-Missing.png"><img style="background-image: none; border-right-width: 0px; margin: 5px 0px 0px; padding-left: 0px; padding-right: 0px; display: inline; float: right; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Mapguide 6.5 MDAC 2.8 Missing" border="0" alt="Mapguide 6.5 MDAC 2.8 Missing" align="right" src="http://www.geospecialling.com/wp-content/uploads/2011/10/Mapguide-6.5-MDAC-2.8-Missing_thumb.png" width="244" height="140" /></a>an “MDAC Not Detected” warning.&#160; MDAC you may remember is the old tyme “Microsoft Data Access Component” and <a title="MDAC 2.8 - RIP" href="http://www.microsoft.com/download/en/details.aspx?id=5793" rel="tag" target="_blank">2.8</a> was one of the last releases.&#160; MDAC has since been superseded and is apparently not included with Windows 2008.&#160; Nor can it be installed.&#160;&#160; I didn’t even bother contact Autodesk – I knew their response was likely going to start off with a good laugh, followed by something to the effect of “yeah that’s really old, you should probably just find an equally old Windows server.”&#160; This of course is not an option =)&#160;&#160; The good news though is that we can hack the Mapguide Server 6.5 installer and once installed Mapguide Server seems to run just fine.&#160; Big thanks to Microsoft for all the effort they put into maintaining backwards compatibility.&#160; Note this process may well work for Windows Vista and will probably work for Windows 7 – but I have not tested that.&#160; Also – I should add this is going to be completely unsupported by Autodesk and will definitely be completely unsupported by me.&#160; Please do the appropriate amount of testing before you put this into production.&#160; That said, I’ve not noticed any problems with Mapguide 6.5 running on Windows 2008.</p>
<h2>Getting Started</h2>
<p><a href="http://www.geospecialling.com/wp-content/uploads/2011/10/Mapguide-6.5-Task-Manager.png"><img style="background-image: none; border-right-width: 0px; margin: 0px 10px 0px 0px; padding-left: 0px; padding-right: 0px; display: inline; float: left; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Mapguide 6.5 Task Manager" border="0" alt="Mapguide 6.5 Task Manager" align="left" src="http://www.geospecialling.com/wp-content/uploads/2011/10/Mapguide-6.5-Task-Manager_thumb.png" width="220" height="244" /></a>So to get started.&#160; You’ll need a piece of free software from Microsoft called <a title="http://msdn.microsoft.com/en-us/library/windows/desktop/aa370557(v=vs.85).aspx" href="http://msdn.microsoft.com/en-us/library/windows/desktop/aa370557(v=vs.85).aspx" rel="tag" target="_blank">Orca</a>.&#160; You’ll also need your <a title="Mapguide 6.5 Server downloads" href="http://usa.autodesk.com/adsk/servlet/ps/dl/item?siteID=123112&amp;id=9473387&amp;linkID=9242099" rel="tag" target="_blank">Mapguide 6.5 Server install</a> which can be downloaded from Autodesk.&#160;&#160;&#160; Once Orca is installed start the Mapguide 6.5 server setup.&#160; The required MSI file that we need to edit is stored inside a single self extracting exe.&#160; You can extract these files by launching the installer on your Windows 2008 server and starting task manager once the “MDAC Not Detected” error is displayed.&#160;&#160; Make sure the “Show processes from all users” is checked and find “ServerInstall.exe”&#160; Right click on this process and choose “Open File Location”.&#160; Take a copy of these files and place them somewhere, preferably on your Windows 2008 server’s local drive.</p>
<p><strong>**Update</strong>– thanks to Krzysztof Skwarek for pointing out that Orca is a bit of a pain in the ass to get ahold of.&#160; I have the Windows SDK installed already so I didn’t notice this pain point.&#160;&#160; Given that the platform SDK is freely available, I’ve uploaded the here for your convenience. (If this is a problem Microsoft, please don’t get litigious…just send me an e-mail to let me know. I’ll gladly take it down and make the good people download the 250MB platform SDK =])</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:fb3a1972-4489-4e52-abe7-25a00bb07fdf:e8cd1051-f506-4f04-bcc7-dc5ca7f58f16" class="wlWriterSmartContent">
<p><a href="http://www.geospecialling.com/wp-content/uploads/2011/10/Orca1.zip" target="_blank">2MB Orca.msi</a></p>
</p></div>
<p>&#160;</p>
<h2>Hacking the Installer and Installing</h2>
<p>Next, fire up Orca.&#160;&#160; Choose File / Open and browse to your copy of the installation files.&#160; Select ServerInstall.msi.&#160; In the left hand window scroll down and find <a href="http://www.geospecialling.com/wp-content/uploads/2011/10/Orca-MDAC-Not-Detected.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: right; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Orca MDAC Not Detected" border="0" alt="Orca MDAC Not Detected" align="right" src="http://www.geospecialling.com/wp-content/uploads/2011/10/Orca-MDAC-Not-Detected_thumb.png" width="244" height="121" /></a>“InstallUISequence”&#160; Select that.&#160; In the right hand pane find and select “MDACNotDetected” .&#160;&#160; Right click on this row and pick “Drop Row”.&#160; You will be prompted that this will permanently remove 1 rows.&#160; Click Ok and save the msi.</p>
<p>Your installation is now hacked and will get past that error message when you run ServerInstall.exe.&#160; Make sure your run this from a local drive.&#160; When I tried to run the install from a network share, Windows “protected” me and it wouldn’t work.</p>
<p>At this point you can run through the installation process.</p>
<p>So where were we, yes installing.&#160; When you get to the “Select Components” screen make sure that “ISAPI MapAgent” is selected.&#160; By default is not installed.&#160; Don’t be alarmed on the next screen when the installer tells you it will not create the virtual directory.&#160; Like with Vista, the installer is not capable of dealing with IIS7.&#160; That’s no problem as configuring Mapguide 6.5 on IIS7+ is pretty simple and we’ll go over that in a minute.&#160; You may need to reboot once the installation is complete but after that the “Autodesk Mapguide® Server 6.5” service should be up and running.&#160;&#160; Start / Run / services.msc will bring up the services.</p>
<h2>IIS 7 Configuration</h2>
<p>You’ll need IIS 7 installed with support for ISAPIs.&#160; If you do not have this installed, <a title="Google will help you install IIS 7" href="http://www.google.com/search?gcx=c&amp;ix=c2&amp;sourceid=chrome&amp;ie=UTF-8&amp;q=IIS7+enable+isapi+with+non-dll+extension#sclient=psy-ab&amp;hl=en&amp;source=hp&amp;q=install+iis7+windows+server+2008&amp;pbx=1&amp;oq=Install+IIS7+windows+&amp;aq=1&amp;aqi=g4&amp;aql=1&amp;gs_sm=e&amp;gs_upl=2079665l2082370l0l2083313l21l12l0l1l1l2l885l6710l4-6.4.2l12l0&amp;bav=on.2,or.r_gc.r_pw.r_cp.,cf.osb&amp;fp=b4c14b174b3e10f4&amp;biw=1250&amp;bih=756" rel="tag" target="_blank">Google</a> can probably help you out.&#160; Next start the IIS manager (start / run / inetmgr) .&#160; First let’s create a new application pool.&#160; Expand the server and choose “Application Pools”.&#160;&#160; Right click and choose “Add Application Pool”.&#160;&#160; Name the app pool (Mapguide6.5 might be a good name).&#160; Set the pipeline mode to classic.&#160;&#160; If you’re on a 64 bit version of Windows you must set the app pool to 32bit mode as Mapguide 6.5 is a 32bit app.&#160; Right click on the newly created application pool and choose “Advanced Settings”.&#160; Set “Enable 32-Bit Applications” to true.&#160; This setting will only be available on 64 bit systems.&#160; If you don’t see it – you probably don’t need to worry about it.</p>
<p>Now expand Sites and choose the web site you want to create the application (formerly called virtual directory) in.&#160; Right click the site and choose “Add Application”.&#160; Name the application Mapguide6.5.&#160; For the physical path browse to C:\Program Files\Autodesk\MapGuideServer6.5\MapAgents (or Program Files (x86) on x64 systems).&#160; Select our newly created application pool.<a href="http://www.geospecialling.com/wp-content/uploads/2011/10/isapi-access.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: right; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="isapi access" border="0" alt="isapi access" align="right" src="http://www.geospecialling.com/wp-content/uploads/2011/10/isapi-access_thumb.png" width="244" height="202" /></a><a href="http://www.geospecialling.com/wp-content/uploads/2011/10/isapi-config.png"><img style="background-image: none; border-right-width: 0px; margin: 10px 10px 0px; padding-left: 0px; padding-right: 0px; display: inline; float: right; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="isapi config" border="0" alt="isapi config" align="right" src="http://www.geospecialling.com/wp-content/uploads/2011/10/isapi-config_thumb.png" width="244" height="166" /></a></p>
<p>Finally we need to enable the ISAPI agent.&#160; One last round of dirty trickery and we’ll have Mapguide 6 running.&#160; In windows explorer browse to C:\Program Files\Autodesk\MapGuideServer6.5\MapAgents\ and make a copy of MapAgent_isapi.isa.&#160; Name it MapAgent_isapi.dll.&#160;&#160; In the inetmgr tree select the virtual directory and double click Handler Mappings.&#160;&#160; Next we’re going to “Add Module Mapping”.&#160; Set the request path to be MapAgent_Isapi.isa.&#160; For module choose “IsapiModule”.&#160;&#160; For executable browse to the newly copied MapAgent_Isapi.dll.&#160; Set the name to Mapguide 6.5.&#160; Click on the Request Restrictions button and choose the Access tab.&#160; Click the Execute radio button.</p>
<p><strong>**Update </strong>– thanks to Krzysztof Skwarek for pointing out that you can choose “Script” here instead of “Execute”.</p>
<p>You will be prompted to “allow this ISAPI” extension.&#160; Click Yes.</p>
<h2>The Test</h2>
<p>At this point you should be done!&#160; You can fire up a browser and test the isapi using the following url (assuming you used my default virtual directory name):</p>
<p><a title="http://localhost/mapguide6.5/mapagent_isapi.isa?item=test" href="http://localhost/mapguide6.5/mapagent_isapi.isa?item=test">http://localhost/mapguide6.5/mapagent_isapi.isa?item=test</a></p>
<p>If you get the following results you should be good to go!</p>
<p><a href="http://www.geospecialling.com/wp-content/uploads/2011/10/mapguiderunning.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="mapguiderunning" border="0" alt="mapguiderunning" src="http://www.geospecialling.com/wp-content/uploads/2011/10/mapguiderunning_thumb.png" width="644" height="150" /></a></p>
<p>I considered posting the modified installer but I’m not sure if that would have been poking “the sleeping dragon”.&#160; As much as I would like to help – I don’t need any nasty letters from the Autodesk legal team =).&#160; If this is something you need done but you’re not comfortable editing installers or delving into the guts of IIS7,&#160; feel free to contact me.&#160;&#160; We might be able to come to some sort of arrangement. =)</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:a576acc5-605d-4b31-a4d4-af353dc3fbfc" class="wlWriterEditableSmartContent">Technorati Tags: <a href="http://technorati.com/tags/Mapguide" rel="tag">Mapguide</a>,<a href="http://technorati.com/tags/Installer+Hacking" rel="tag">Installer Hacking</a>,<a href="http://technorati.com/tags/Windows+2008" rel="tag">Windows 2008</a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.geospecialling.com/index.php/2011/10/installing-mapguide-6-5-sp1-on-windows-2008-server/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Anoto Digital Pen Library Utility</title>
		<link>http://www.geospecialling.com/index.php/2011/08/anoto-digital-pen-library-utility/</link>
		<comments>http://www.geospecialling.com/index.php/2011/08/anoto-digital-pen-library-utility/#comments</comments>
		<pubDate>Tue, 30 Aug 2011 04:07:09 +0000</pubDate>
		<dc:creator>Darrin Maidlow</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Anoto]]></category>
		<category><![CDATA[ChasmTech]]></category>
		<category><![CDATA[Digital Paper]]></category>
		<category><![CDATA[Smartpens]]></category>

		<guid isPermaLink="false">http://www.geospecialling.com/index.php/2011/08/anoto-digital-pen-library-utility/</guid>
		<description><![CDATA[My colleague Arne just released a helpful little utility aptly named the Digital Pen Library Utility.&#160; This tool plugs a few gaps we’ve noticed in the Anoto digital paper library software during our development sprints while building our smartpen based solutions at ChasmTech.&#160; This utility provides the ability to more effectively manage your digital paper [...]]]></description>
			<content:encoded><![CDATA[<p>My colleague <a title="Arne Joris" href="http://ca.linkedin.com/in/arnejoris" rel="tag" target="_blank">Arne</a> just released a helpful little utility aptly named the <a title="Digital Pen Library Utility" href="http://www.chasmtech.com/downloadFiles/DigitalPenLibrary.exe" rel="tag" target="_blank">Digital Pen Library Utility</a>.&#160; This tool plugs a few gaps we’ve noticed in the <a title="Anoto Digital Paper" href="http://en.wikipedia.org/wiki/Digital_paper" rel="tag" target="_blank">Anoto digital paper</a> library software during our development sprints while building our smartpen based solutions at <a title="ChasmTech solutions" href="http://www.chasmtech.com/solutions" rel="tag" target="_blank">ChasmTech</a>.&#160; This utility provides the ability to more effectively manage your digital paper libraries by checking if printed documents in the library are still pending.&#160; This will give you a clear view of the current library allowing you to decide if it is safe to archive the current library and start a fresh one.&#160;&#160; More details on this download can be found on the <a title="ChasmTech downloads" href="http://www.chasmtech.com/downloads/" rel="tag" target="_blank">ChasmTech download page</a>.</p>
<p>Have a feature request for this app or a comment?&#160;&#160; We’d love to hear it.&#160; Comment here or <a title="Contact ChasmTech" href="http://www.chasmtech.com/contact" rel="tag" target="_blank">contact Arne via ChasmTech</a>.</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:007676a1-7e4a-411f-b73f-dc2cbccb36f7" class="wlWriterEditableSmartContent">Technorati Tags: <a href="http://technorati.com/tags/Anoto" rel="tag">Anoto</a>,<a href="http://technorati.com/tags/Digital+Pen" rel="tag">Digital Pen</a>,<a href="http://technorati.com/tags/SmartPen" rel="tag">SmartPen</a>,<a href="http://technorati.com/tags/ChasmTech" rel="tag">ChasmTech</a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.geospecialling.com/index.php/2011/08/anoto-digital-pen-library-utility/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Hacking Visual Lisp IDE to be a little more awesome!</title>
		<link>http://www.geospecialling.com/index.php/2011/08/hacking-visual-lisp-ide-to-be-a-little-more-awesome/</link>
		<comments>http://www.geospecialling.com/index.php/2011/08/hacking-visual-lisp-ide-to-be-a-little-more-awesome/#comments</comments>
		<pubDate>Tue, 09 Aug 2011 17:12:51 +0000</pubDate>
		<dc:creator>Darrin Maidlow</dc:creator>
				<category><![CDATA[AutoCAD]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Visual Lisp]]></category>
		<category><![CDATA[VLIDE]]></category>

		<guid isPermaLink="false">http://www.geospecialling.com/index.php/2011/08/hacking-visual-lisp-ide-to-be-a-little-more-awesome/</guid>
		<description><![CDATA[Even though it’s the year 2011 and ObjectARX is available in all its glory for .NET I still spend a lot of time in the Visual Lisp IDE (VLIDE).&#160;&#160; While ObjectARX is powerful and full of awesome, it comes at a cost of a lot of overhead to setup a project, add all the needed [...]]]></description>
			<content:encoded><![CDATA[<p>Even though it’s the year 2011 and <a title="ObjecARX" href="http://usa.autodesk.com/adsk/servlet/index?id=773204&amp;siteID=123112" rel="tag" target="_blank">ObjectARX</a> is available in all its glory for .NET I still spend a lot of time in the <a title="Visual Lisp" href="http://usa.autodesk.com/adsk/servlet/index?siteID=123112&amp;id=770237" rel="tag" target="_blank">Visual Lisp</a> IDE (VLIDE).&#160;&#160; While ObjectARX is powerful and full of awesome, it comes at a cost of a lot of overhead to setup a project, add all the needed references, heck even compiling / debugging is a huge pain in the ass in comparison to Lisp.&#160; Lisp is still hands down the most efficient way to do most batch modifications within an AutoCAD session for those who have made the time to learn it.<a href="http://www.geospecialling.com/wp-content/uploads/2011/08/lispide.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: right; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="lispide" border="0" alt="lispide" align="right" src="http://www.geospecialling.com/wp-content/uploads/2011/08/lispide_thumb.png" width="244" height="154" /></a></p>
<p>There are a couple of problems with Visual Lisp right now though.&#160; One of my biggest complaints about the VLIDE is the default colors.&#160; The high contrast white background is an eye killer.&#160;&#160; The IDE is configurable though and we’re given full a 16 bit color palette – with which I was able to configure a color scheme that was more to my liking.&#160;&#160; If you start Visual Lisp, go to the Tools menu and choose Window Attributes you are presented with the dialog that should let you configure your colors.&#160;&#160; Before opening this configuration dialog select a code window in Visual Lisp to modify. Set the properties accordingly. If you are happy with the colors when you press Ok on the dialog you will be prompted to “Use current as EDITOR prototype?”. Clicking yes here will update you editor prototype, resulting in future windows using these defaults.</p>
<p>One key limitation here is that on x64 editions of AutoCAD this dialog is broken.&#160; You may also see the following error when you attempt to close the dialog:</p>
<blockquote><p>; warning: unwind skipped on exception      <br />; error: Exception occurred: 0xC0000094</p>
</blockquote>
<p>**Update May 11th 2012 – This appears to have been fixed in AutoCAD 2013 x64.&#160; Hurray!</p>
<p>It seems that Autodesk has let this code go to some extent. I’ve seen a number of <a title="Visual Lisp IDE error" href="http://forums.autodesk.com/t5/AutoCAD-Civil-3D/Problem-IDE-Editor-Visual-Lisp-in-Civil-2011-2012-x64-in-Windows/td-p/3091434" rel="tag" target="_blank">forum posts</a> of&#160; people mentioning the unwind error.&#160; This is a shame and partly why I’m writing this post!&#160; First off – if you have an x86 release of AutoCAD you are in luck.&#160; You can configure your IDE no problem using the UI.&#160; For you x64 users, all is not lost.&#160; Lucky for us Visual Lisp saves all this configuration information to a text file named VLIDE.dsk.&#160; On my Vista x64 machine its found in the following locations:</p>
<p>AutoCAD 2006 &#8211; C:\Users\dmaidlow\AppData\Roaming\Autodesk\AutoCAD 2006\R16.2\enu</p>
<p>AutoCAD 2009 &#8211; C:\Users\dmaidlow\AppData\Roaming\Autodesk\AutoCAD 2009\R17.2\enu</p>
<p>AutoCAD 2010 &#8211; C:\Users\dmaidlow\AppData\Roaming\Autodesk\AutoCAD 2010\R18.0\enu</p>
<p>AutoCAD 2011 &#8211; C:\Users\dmaidlow\AppData\Roaming\Autodesk\AutoCAD 2011\R18.1\enu</p>
<p>AutoCAD 2012 &#8211; C:\Users\dmaidlow\AppData\Roaming\Autodesk\AutoCAD 2012 &#8211; English\R18.2\enu</p>
<p>These paths should be the same or similar on Windows 7.</p>
<p>If you open up this file you’ll see a large list of dotted pair lists full of settings.&#160; The one I’m most interested in here is the *editor-sample-window property.&#160; This is the “default” configuration to use when opening a lisp file.</p>
<div>
<div style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px">
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060">   1:</span> (*editor-sample-window* (:AUTOLISP :FGC 16777215 :BGC 0 :LXC T :CLV #40(nil nil 16711935 nil nil nil 16776960 nil 32768 nil 32768 nil 8421376 nil 8388736 12632256 8388736 12632256 8388736 12632256 255 nil 128 nil 8388608 nil 128 nil 12632256 nil 16777215 0 16777215 16750899 16777215 255 nil 8388608 nil 16776960) :TW 4 :LM 10))</pre>
</p></div>
</div>
<p>Two values of importance are FGC (foreground color) and BGC (background color).&#160; I was having a hard time finding a color wheel that did integer based color codes – but you can convert your favorite hex color codes to decimal (<a title="hex to decimal" href="http://easycalculation.com/decimal-converter.php" rel="tag" target="_blank">helpful hex to decimal converter here</a>).&#160; The next bit is a little ugly.&#160; Within the :CLV property we have a list.&#160; This list is basically a list of 16 bit integers containing a color code of the foreground and background color of each window property.&#160; If the color is set to nil – it is transparent.&#160; This list appears to be in the order in which the properties are displayed within the UI:</p>
<ul>
<li>:LEX-SPACE </li>
<li>:LEX-STR </li>
<li>:LEX-SYM </li>
<li>:LEX-NUM </li>
<li>:LEX-INT </li>
<li>:LEX-REAL </li>
<li>:LEX-COMM </li>
<li>:LEX-COMM1 </li>
<li>:LEX-COMM2 </li>
<li>:LEX-PAREN </li>
<li>:LEX-SPEC </li>
<li>:LEX-SPEC1 </li>
<li>:LEX-UNKN </li>
<li>:WINDOW-TEXT </li>
<li>:WINDOW-SELECTION </li>
<li>:ERROR-HIGHLIGHT </li>
<li>:INPUT-ZONE </li>
<li>:CONSOLE-MESSAGE </li>
</ul>
<p>TW and LM contain the tab width and left margin respectively.&#160; So go wild editing these values and configure your new IDE!&#160; Keep in mind when editing the Visual Lisp settings using the UI, the vlide.dsk file is not saved&#160; until AutoCAD is shutdown cleanly.&#160; If AutoCAD crashes, you will lose your configuration.&#160; If you would like to try out my IDE settings – I’ve attached a zip file containing&#160; a copy of my .DSK file.&#160; I also recommend you make a backup of the .dsk file before you start tinkering.</p>
<p>Now, if only I could figure out some way to build a vlx file from the command line so as to integrate it into my automated build system..</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:fb3a1972-4489-4e52-abe7-25a00bb07fdf:018ccf01-e62e-4952-8ac4-a3c942c5378e" class="wlWriterSmartContent">
<p><a href="http://www.geospecialling.com/wp-content/uploads/2011/10/VLIDE.zip" target="_blank">my VLIDE.DSK file</a></p>
</div>
<p><strong>Update!</strong></p>
<p>For those of you who don’t read the comments &#8211; Dennis Hill was cool enough to share his digging into the DSK file and also his IDE colors which I’ve been running for a week or so now.&#160; Take a minute to read the comments and check out his color scheme.&#160; Thanks Dennis!</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:6deb737d-1817-4743-82ee-46c3b2beded3" class="wlWriterSmartContent">Technorati Tags: <a href="http://technorati.com/tags/Visual+Lisp" rel="tag">Visual Lisp</a>,<a href="http://technorati.com/tags/VLIDE" rel="tag">VLIDE</a>,<a href="http://technorati.com/tags/Hack" rel="tag">Hack</a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.geospecialling.com/index.php/2011/08/hacking-visual-lisp-ide-to-be-a-little-more-awesome/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Mapguide Development Tips from The Map Guy(de)</title>
		<link>http://www.geospecialling.com/index.php/2011/07/mapguide-development-tips-from-the-map-guyde/</link>
		<comments>http://www.geospecialling.com/index.php/2011/07/mapguide-development-tips-from-the-map-guyde/#comments</comments>
		<pubDate>Thu, 28 Jul 2011 21:41:28 +0000</pubDate>
		<dc:creator>Darrin Maidlow</dc:creator>
				<category><![CDATA[Mapguide]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://www.geospecialling.com/index.php/2011/07/mapguide-development-tips-from-the-map-guyde/</guid>
		<description><![CDATA[Jackie Ng posted a great post on Mapguide application development tips that I wanted to share with you – some great tips for anyone starting out with Mapguide development or even seasoned pros!&#160;&#160; I especially enjoyed his thoughts on antique browsers =) Thanks Jackie!&#160; I have a couple of things to add to his list.&#160;&#160; [...]]]></description>
			<content:encoded><![CDATA[<p>Jackie Ng posted a great post on <a title="Mapguide Application Development Tips" href="http://themapguyde.blogspot.com/2011/06/mapguide-application-development-tips.html" rel="tag" target="_blank">Mapguide application development tips</a> that I wanted to share with you – some great tips for anyone starting out with Mapguide development or even seasoned pros!&#160;&#160; I especially enjoyed his thoughts on antique browsers =) Thanks Jackie!&#160; I have a couple of things to add to his list.&#160;&#160; My first addition to his list would be Chrome.&#160; I did have a few problems with firebug causing random ajax errors to occur in the <a title="Autodesk Mapguide" href="http://www.mapguide.com" target="_blank">Mapguide</a> javascript which prompted me to switch to Chrome and its development tools.&#160; I have not looked back…</p>
<p>The other thing I have to add is <a title="ReSharper" href="http://www.jetbrains.com/resharper/" rel="tag" target="_blank">ReSharper</a> 6.0.&#160; Every .NET developer should have this incredible toolset.&#160;&#160; It really does enhance the Visual Studio IDE.&#160; The javascript/ajax support is great with some syntax highlighting, the .NET refactoring and code generation tools are huge productivity enhancements once you get them figured out.&#160;&#160; I couldn’t live without the navigation and&#160; on-the-fly code analysis tools.&#160; The built-in de-compiler can be incredibly handy too, and ties right in with the navigation tools.</p>
<p>If you are into Mapguide dev, I strongly encourage you to check out Jackie’s post – and become a regular reader of <a title="Jackie Ng - The Map Guy(de)" href="http://themapguyde.blogspot.com/" rel="tag" target="_blank">his blog</a>.</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:eabcb743-5504-4c1c-afa5-590220550817" class="wlWriterEditableSmartContent">Technorati Tags: <a href="http://technorati.com/tags/Mapguide" rel="tag">Mapguide</a>,<a href="http://technorati.com/tags/ReSharper" rel="tag">ReSharper</a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.geospecialling.com/index.php/2011/07/mapguide-development-tips-from-the-map-guyde/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>It&#8217;s a girl!</title>
		<link>http://www.geospecialling.com/index.php/2011/07/its-a-girl/</link>
		<comments>http://www.geospecialling.com/index.php/2011/07/its-a-girl/#comments</comments>
		<pubDate>Mon, 25 Jul 2011 23:02:57 +0000</pubDate>
		<dc:creator>Darrin Maidlow</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[babby]]></category>

		<guid isPermaLink="false">http://www.geospecialling.com/index.php/2011/07/its-a-girl/</guid>
		<description><![CDATA[Hey everyone! It’s been an insane month.&#160; Just wanted to take a moment to let my friends, colleagues and my loyal readers know that my wife popped out our first child the other day.&#160; July 12th at 2:10 am Ms. Georgia Laine Pawliuk-Maidlow was born and let me tell you she is full of awesome!&#160; [...]]]></description>
			<content:encoded><![CDATA[<p>Hey everyone!<a href="http://www.geospecialling.com/wp-content/uploads/2011/07/smallgeorgia.jpg" target="_blank"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: right; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="OLYMPUS DIGITAL CAMERA         " border="0" alt="OLYMPUS DIGITAL CAMERA         " align="right" src="http://www.geospecialling.com/wp-content/uploads/2011/07/smallgeorgia_thumb.jpg" width="244" height="184" /></a></p>
<p>It’s been an insane month.&#160; Just wanted to take a moment to let my friends, colleagues and my loyal readers know that my wife popped out our first child the other day.&#160; July 12th at 2:10 am Ms. Georgia Laine Pawliuk-Maidlow was born and let me tell you she is full of awesome!&#160; Both Mom and Babby are doing great.&#160; Both Mom and Dad are both pretty tired&#160; =)&#160; Here is a picture for your viewing enjoyment =P</p>
]]></content:encoded>
			<wfw:commentRss>http://www.geospecialling.com/index.php/2011/07/its-a-girl/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Coolest marketing campaign I&#8217;ve seen in a long time..</title>
		<link>http://www.geospecialling.com/index.php/2011/06/coolest-marketing-campaign-ive-seen-in-a-long-time/</link>
		<comments>http://www.geospecialling.com/index.php/2011/06/coolest-marketing-campaign-ive-seen-in-a-long-time/#comments</comments>
		<pubDate>Thu, 30 Jun 2011 19:39:53 +0000</pubDate>
		<dc:creator>Darrin Maidlow</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Awesome]]></category>

		<guid isPermaLink="false">http://www.geospecialling.com/index.php/2011/06/coolest-marketing-campaign-ive-seen-in-a-long-time/</guid>
		<description><![CDATA[Ok.&#160; I had to break the long blog silence here to send a tip of the hat to Telerik for their Ninja in the maze promo.&#160; Not only do you get to play a cool PacMan’esque game (WITH throwing stars), but they also give you Telerik Points that you can redeem for discounts on products.&#160; [...]]]></description>
			<content:encoded><![CDATA[<p>Ok.&#160; I had to break the long blog silence here to send a tip of the hat to Telerik for their <a title="Ninja in the maze" href="http://www.telerik.com/products/ninja-in-the-maze.aspx" rel="tag" target="_blank">Ninja in the maze</a> promo.&#160; Not only do you get to play a cool PacMan’esque game (WITH throwing stars), but they also give you <a title="telerik points" href="http://www.telerik.com/telerik-points.aspx" rel="tag" target="_blank">Telerik Points</a> that you can redeem for discounts on products.&#160; Check it out.&#160; Hugely cool.&#160; <a title="http://www.telerik.com/products/ninja-in-the-maze.aspx" href="http://www.telerik.com/products/ninja-in-the-maze.aspx">http://www.telerik.com/products/ninja-in-the-maze.aspx</a></p>
<p>well done!</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:c5779b1b-7440-4cc2-82d9-f61ed8f5d7dd" class="wlWriterEditableSmartContent">Technorati Tags: <a href="http://technorati.com/tags/Marketing" rel="tag">Marketing</a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.geospecialling.com/index.php/2011/06/coolest-marketing-campaign-ive-seen-in-a-long-time/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Transferring US Dollar Funds out of PayPal</title>
		<link>http://www.geospecialling.com/index.php/2011/06/transferring-us-dollar-funds-out-of-paypal/</link>
		<comments>http://www.geospecialling.com/index.php/2011/06/transferring-us-dollar-funds-out-of-paypal/#comments</comments>
		<pubDate>Mon, 27 Jun 2011 18:27:59 +0000</pubDate>
		<dc:creator>Darrin Maidlow</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[PayPal]]></category>

		<guid isPermaLink="false">http://www.geospecialling.com/?p=237</guid>
		<description><![CDATA[Great post on how to setup PayPal with Royal Bank of Canada US dollar account to save on the steep exchange rates charged by PayPal.. Transferring US Dollar Funds out of PayPal.]]></description>
			<content:encoded><![CDATA[<p>Great post on how to setup <a title="PayPal" href="http://www.paypal.com" target="_blank">PayPal</a> with Royal Bank of Canada US dollar account to save on the steep exchange rates charged by PayPal..</p>
<p><a href="http://www.canadiancapitalist.com/transferring-us-dollar-funds-out-of-paypal/">Transferring US Dollar Funds out of PayPal</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.geospecialling.com/index.php/2011/06/transferring-us-dollar-funds-out-of-paypal/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A new breed of scam &#8211; QuickResolve.Net</title>
		<link>http://www.geospecialling.com/index.php/2011/05/a-new-breed-of-scam-quickresolve-net/</link>
		<comments>http://www.geospecialling.com/index.php/2011/05/a-new-breed-of-scam-quickresolve-net/#comments</comments>
		<pubDate>Thu, 12 May 2011 18:33:09 +0000</pubDate>
		<dc:creator>Darrin Maidlow</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Junk Files]]></category>
		<category><![CDATA[Karesh]]></category>
		<category><![CDATA[Scam]]></category>

		<guid isPermaLink="false">http://www.geospecialling.com/index.php/2011/05/a-new-breed-of-scam-quickresolve-net/</guid>
		<description><![CDATA[Today I received an unsolicited phone call from a helpful Indian fellow named Karesh, sadly his number was blocked so I cannot share that with you =).&#160; He informed me that there were &#34;deadly junk files” on my computer, that were much worse than virii and trojans.&#160; He really cared about the health of my [...]]]></description>
			<content:encoded><![CDATA[<p>Today I received an unsolicited phone call from a helpful Indian fellow named Karesh, sadly his number was blocked so I cannot share that with you =).&#160; He informed me that there were &quot;deadly junk files” on my computer, that were much worse than virii and trojans.&#160; He really cared about the health of my PC.&#160; He asked me to start the event viewer and showed me all the errors that were on my computer.&#160; It was terrifying.</p>
<p>Finally, he informed me that given the age of my PC we needed to “register my license with Microsoft to receive ongoing security assistance from Microsoft Certified Technicians”.&#160;&#160; He told me that “Microsoft provides two kinds of secure warranty.&#160; hardware and software! “ I needed to reactivate this protection…For the low low price of 109$ / year or 388 for 4 years I could get my computer protected from junk files, virii, trojans, and terrorists.</p>
<p>Next step was a LogmeInRescue session.&#160; At this time, I told my helpful friend Karesh that my PC had blue screened!&#160; Oh no!&#160; This bought me a little time to fire up a test virtual machine and Camtasia <img src='http://www.geospecialling.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .&#160; Turns out now a Mr. Kevin Andersen would be helping me, with a trial LogMeIn account&#160; <img src='http://www.geospecialling.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> &#160; I wonder if they noticed that my Windows Vista had now all of a sudden become Windows XP?&#160; hmmm doesn’t look like it.<a href="http://www.geospecialling.com/wp-content/uploads/2011/05/anewscam1.png"><img style="border-right-width: 0px; margin: 0px 0px 0px 10px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="a new scam 1" border="0" alt="a new scam 1" align="right" src="http://www.geospecialling.com/wp-content/uploads/2011/05/anewscam1_thumb.png" width="244" height="193" /></a></p>
<p>This is where it got a little scary.&#160; Well not scary for you or I, but for your grandmother or other computer illiterate person.&#160;&#160; They started digging trough Windows for negative looking things.&#160; First they started the Windows certificate store and they highlight a number of revoked by Microsoft.&#160; They were even so kind as to highlight these problems!</p>
<p>&#160;</p>
<p><a href="http://www.geospecialling.com/wp-content/uploads/2011/05/anewscam21.png"><img style="border-right-width: 0px; margin: 0px 20px 0px 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="a new scam 2" border="0" alt="a new scam 2" align="left" src="http://www.geospecialling.com/wp-content/uploads/2011/05/anewscam2_thumb1.png" width="244" height="176" /></a>At this point they brought me to the Quick Resolve website (quickresolve.net) where they were ready to help me enter all my information to pay the fee.&#160; At this point, I asked to get four years of coverage.&#160; Karesh became quite excited!&#160; First I needed to see the “Junk Files” on my PC.&#160; Mr. Kevin Andersen started the “Junk Files Viewer” (which you may know as the event viewer).&#160; He applied some tricky filters and then BAM.&#160; Errors and warnings.&#160; Now your grandmother is probably scrambling to find her credit card…</p>
<p>I let Karesh talk for a bit more, ready to stop my VM – finally I had another “Blue Screen” and hung up.&#160; Oops ,look I restored a snapshot…&#160; Unfortunately the joke is on me..they’ve been calling back over and over and over.&#160; &lt;sigh&gt;</p>
<p>At first, I went along for the ride because I figured it might be fun.&#160; Soon I started to realize that this will be very&#160; convincing to a lot of people, and I started to think that maybe I should write this up in hopes of letting the geeky masses know.&#160; So please let the people in your lives who could benefit by knowing about this type of scam know that no one will ever call you at home out of the blue to help you remove junk files…</p>
<p>Here is the video of the LogMeIn session:</p>
<div style="padding-bottom: 0px; margin: 0px auto; padding-left: 0px; width: 425px; padding-right: 0px; display: block; float: none; padding-top: 0px" id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:b4e9ee91-d0a9-4194-be31-6b63eb13b6a7" class="wlWriterSmartContent">
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px" id="48a6dd4d-e2de-4418-a655-26b84bc026f5">
<div><a href="http://www.youtube.com/watch?v=9-h9aGqopxo&amp;feature=youtube_gdata_player" target="_new"><img style="border-bottom-style: none; border-left-style: none; border-top-style: none; border-right-style: none" onload="var downlevelDiv = document.getElementById(&#39;48a6dd4d-e2de-4418-a655-26b84bc026f5&#39;); downlevelDiv.innerHTML = &quot;&lt;div&gt;&lt;object width=\&quot;425\&quot; height=\&quot;355\&quot;&gt;&lt;param name=\&quot;movie\&quot; value=\&quot;http://www.youtube.com/v/9-h9aGqopxo&amp;hl=en\&quot;&gt;&lt;\/param&gt;&lt;embed src=\&quot;http://www.youtube.com/v/9-h9aGqopxo&amp;hl=en\&quot; type=\&quot;application/x-shockwave-flash\&quot; width=\&quot;425\&quot; height=\&quot;355\&quot;&gt;&lt;\/embed&gt;&lt;\/object&gt;&lt;\/div&gt;&quot;;" alt="" src="http://www.geospecialling.com/wp-content/uploads/2011/05/video17118d0673572.jpg" galleryimg="no" /></a></div>
</p></div>
<div style="clear: both; font-size: 0.8em">A new breed of scam?</div>
</p></div>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:9038da52-cfc5-47b3-91fe-f499907a6114" class="wlWriterEditableSmartContent">Technorati Tags: <a href="http://technorati.com/tags/Scam" rel="tag">Scam</a>,<a href="http://technorati.com/tags/QuickResolve.Net" rel="tag">QuickResolve.Net</a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.geospecialling.com/index.php/2011/05/a-new-breed-of-scam-quickresolve-net/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Debugging COM DLL files in AutoCAD x64 and Visual Studio</title>
		<link>http://www.geospecialling.com/index.php/2011/03/debugging-com-dll-files-in-autocad-x64-and-visual-studio/</link>
		<comments>http://www.geospecialling.com/index.php/2011/03/debugging-com-dll-files-in-autocad-x64-and-visual-studio/#comments</comments>
		<pubDate>Tue, 22 Mar 2011 18:19:46 +0000</pubDate>
		<dc:creator>Darrin Maidlow</dc:creator>
				<category><![CDATA[AutoCAD]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Visual Lisp]]></category>
		<category><![CDATA[x64]]></category>

		<guid isPermaLink="false">http://www.geospecialling.com/index.php/2011/03/debugging-com-dll-files-in-autocad-x64-and-visual-studio/</guid>
		<description><![CDATA[While attempting to work out some x64 specific kinks in some of the DraftLogic COM code that is being migrated to .NET I hit a pretty annoying wall.&#160; Well, it was actually a series of small walls (probably around knee high)&#160; that kept tripping me… In this post, I’m working on a problem that is [...]]]></description>
			<content:encoded><![CDATA[<p>While attempting to work out some x64 specific kinks in some of the <a title="DraftLogic" href="http://www.draftlogic.com" rel="tag" target="_blank">DraftLogic</a> COM code that is being migrated to .NET I hit a pretty annoying wall.&#160; Well, it was actually a series of small walls (probably around knee high)&#160; that kept tripping me…</p>
<p>In this post, I’m working on a problem that is pertaining to a 64 bit version of AutoCAD loading a COM enabled .NET assembly – however this information should apply to any x64 executable calling any x64 COM assembly.&#160;&#160; Replace AutoCAD with &lt;YourApp.exe&gt; and you should be good to go =)</p>
<p>The first thing I did was to ensure each of the projects had been set to build for&#160; “ANY CPU”.&#160;&#160; This got the ball of fun rolling.&#160;&#160; We have a VLX which instantiates the COM class using vlax-get-or-create-object.&#160; When called this would constantly return nil.&#160;&#160; Of course this all works just peachy when running an x86 build of AutoCAD.&#160;&#160; At this point my breakpoints would appear in Visual Studio as disabled and would happily inform me that “The breakpoint will not currently be hit”. </p>
<p>This usually results when the incorrect DLL is being loaded, or when the PDB file is missing.&#160;&#160; Once Visual Studio is running in debug mode you can bring up the Modules window from the Debug/Windows/Modules menu.&#160; This should show you all the assemblies involved in the current session as well a bunch of other information including their paths.&#160; The assembly in question was not listed here – so at this point I’m assuming that Windows cannot find the dll.</p>
<h2>Junk in the Registry</h2>
<p>I am now thinking that I have orphaned and duplicated types and CLSIDs in the registry, likely pointing to other builds of the dlls.&#160;&#160; If the GUIDs for the classes or types changed you end up with a lot of junk in the registry.&#160;&#160; I don’t trust those registry “cleaner” apps and in the interest of keeping my OS working – I chose to manually search out and nuke all the registry references manually.&#160; This can be done by searching both for your assembly’s type name, and COM exposed class names in regedit.&#160; A lot of this was done in the HKEY_CLASSES_ROOT root.&#160; After all of that the problem still exists..</p>
<h2>Wow6432Node Registry Keys</h2>
<p>Registry keys were a two part problem. After dealing with the junk in the registry, I found I also had to deal with the x86 <a title="x86 registry redirection" href="http://msdn.microsoft.com/en-us/library/aa384232(v=vs.85).aspx" rel="tag" target="_blank">registry redirection</a>.&#160;&#160; DraftLogic has been until this point limited to x86 architecture as a result of&#160; the VB6 code not being x64 friendly.&#160;&#160; As a result of this, all of the needed keys had been placed in the WOW6432Node of the appropriate software registry sections.&#160;&#160; This was the easiest wall to find and hop over.&#160; Unfortunately, this also didn’t solve the problem.</p>
<h2>Improperly Registered Assemblies-thanks for nothingVisual Studio</h2>
<p>So the next and fortunately final problem turns out that Visual Studio 2005/2008 (unsure about 2010) <a title="KB956933 COM assemblies in x64" href="http://support.microsoft.com/kb/956933" rel="tag" target="_blank">does not properly register assemblies.</a>&#160; Turns out the last piece of the solution is pretty simple – couple changes to the project.&#160; What’s happening is that Visual Studio is running the x86 build of regasm.exe to register the assemblies on run, probably because Visual Studio is an x86 app itself.&#160; This results in all kinds of x64 hating… To solve this we have to change two things in the COM enabled projects. </p>
<p>First though, I created a new build configuration called x64 so these changes would not affect in my ANY CPU configuration – which will be used to build my shipping assemblies.&#160; It is also important to note that this problem is MOSTLY only a problem when running code from the IDE.&#160; Assemblies installed and registered using an installer should not have this problem if the installer takes into consideration the “bitness” of AutoCAD (or any application calling your COM enabled dll).&#160; ie.&#160; Installshield asks the user on install what “bitness” of AutoCAD they are using, and the assemblies are registered as needed.&#160; It may also be possible to register an assembly using both the 32 and 64 bit versions of regasm – but I have not tried this.</p>
<p>So with the new x64 configuration created I edited the properties of each COM enabled project&#160; I unchecked “Register for COM interop” and added a post-build event command line of:</p>
<p>%Windir%\Microsoft.NET\Framework64\v2.0.50727\regasm $(TargetPath) /register /codebase /tlb</p>
<p>This would ensure that my COM enabled assemblies were properly registered for use by 64 bit&#160; applications.</p>
<p>After all that, my breakpoints were finally hit, and I could actually start working out the x64 specific bugs. Too bad we couldn’t have moved this to ObjectARX.NET instead – then this would have been a non-issue =)&#160; In retrospect, each of these problems were a contributing factor and each needed to be resolved.&#160; </p>
<p>Hopefully if you are facing a similar issue this post helps you get over at least a couple of the walls!</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:5798ded2-acee-42cc-a8d5-8b32f9864e3b" class="wlWriterEditableSmartContent">Technorati Tags: <a href="http://technorati.com/tags/Visual+Lisp" rel="tag">Visual Lisp</a>,<a href="http://technorati.com/tags/AutoCAD" rel="tag">AutoCAD</a>,<a href="http://technorati.com/tags/COM" rel="tag">COM</a>,<a href="http://technorati.com/tags/x64" rel="tag">x64</a>,<a href="http://technorati.com/tags/Visual+Studio" rel="tag">Visual Studio</a>,<a href="http://technorati.com/tags/COM%2b" rel="tag">COM+</a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.geospecialling.com/index.php/2011/03/debugging-com-dll-files-in-autocad-x64-and-visual-studio/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>ReSharper 6 is going to be rad!</title>
		<link>http://www.geospecialling.com/index.php/2011/03/resharper-6-is-going-to-be-rad/</link>
		<comments>http://www.geospecialling.com/index.php/2011/03/resharper-6-is-going-to-be-rad/#comments</comments>
		<pubDate>Wed, 09 Mar 2011 20:38:38 +0000</pubDate>
		<dc:creator>Darrin Maidlow</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[ReSharper]]></category>

		<guid isPermaLink="false">http://www.geospecialling.com/index.php/2011/03/resharper-6-is-going-to-be-rad/</guid>
		<description><![CDATA[Finally had a little time to catch up on the internets today and came across this post on ReSharper 6 bundling a decompiler!&#160;&#160; My curiosity had been piqued by a little tease posted by JetBrains shortlt after the&#160; announcement by Red Gate about reflector and the subsequent firestorm in the .NET community that ensued that [...]]]></description>
			<content:encoded><![CDATA[<p>Finally had a little time to catch up on the internets today and came across this <a title="ReSharper 6 with built in decompiler!" href="http://blogs.jetbrains.com/dotnet/2011/02/resharper-6-bundles-decompiler-free-standalone-tool-to-follow/" rel="tag" target="_blank">post on ReSharper 6</a> bundling a decompiler!&#160;&#160; My curiosity had been piqued by a <a title="ReSharper Tease" href="http://blogs.jetbrains.com/dotnet/2011/02/reflections-on-recent-news/" rel="tag" target="_blank">little tease</a> posted by JetBrains shortlt after the&#160; <a title="red gate makes an oops" href="http://www.red-gate.com/products/dotnet-development/reflector/announcement" rel="tag" target="_blank">announcement by Red Gate</a> about reflector and the subsequent firestorm in the .NET community that ensued that announcement.</p>
<p>The timing is perfect.&#160; We’ve got a growing need to better understand how some of our code is interacting with some vendor provided 3rd party libraries and this is making a huge difference.&#160;&#160; In true ReSharper form – this new functionality looks solid, and easy to use.&#160; The ReSharper navigation tools we’ve all grown love (well maybe not just love, but also&#160; to depend on) are available.&#160;&#160; I’m not going to miss trying to navigate code only to be greeted with an Object Browser window. ..</p>
<p>Looks like a standalone decompiler/browser is also coming too…</p>
<blockquote><p>And by saying “free”, we actually mean “free”.</p>
</blockquote>
<p>Love it!&#160; Keep up the great works JetBrains – looking forward to the release!</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:2b7b90f0-bed3-424f-bd1d-a0936ab34258" class="wlWriterEditableSmartContent">Technorati Tags: <a href="http://technorati.com/tags/ReSharper" rel="tag">ReSharper</a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.geospecialling.com/index.php/2011/03/resharper-6-is-going-to-be-rad/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AutoCAD VBA/VB6 to .NET Similar Function Comparison</title>
		<link>http://www.geospecialling.com/index.php/2011/02/autocad-vbavb6-to-net-similar-function-comparison/</link>
		<comments>http://www.geospecialling.com/index.php/2011/02/autocad-vbavb6-to-net-similar-function-comparison/#comments</comments>
		<pubDate>Thu, 24 Feb 2011 17:53:58 +0000</pubDate>
		<dc:creator>Darrin Maidlow</dc:creator>
				<category><![CDATA[AutoCAD]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[ObjectARX.NET]]></category>
		<category><![CDATA[VBA]]></category>

		<guid isPermaLink="false">http://www.geospecialling.com/index.php/2011/02/autocad-vbavb6-to-net-similar-function-comparison/</guid>
		<description><![CDATA[I’ve been working on supporting the team doing the DraftLogic VB6 code migration to .NET the past few weeks.&#160;&#160; This code is many years worth of COM based AutoCAD development.&#160;&#160; Came across this excellent link that will give you a good head start in the right direction on which functions are the new equivalents in [...]]]></description>
			<content:encoded><![CDATA[<p>I’ve been working on supporting the team doing the <a title="draftlogic" href="http://www.draftlogic.com" rel="tag" target="_blank">DraftLogic</a> VB6 code migration to .NET the past few weeks.&#160;&#160; This code is many years worth of COM based AutoCAD development.&#160;&#160; Came across this <a title="VBA to VB.NET and C# Comparison" href="http://tinyurl.com/5wddgh4" rel="tag" target="_blank">excellent link</a> that will give you a good head start in the right direction on which functions are the new equivalents in .NET of the old VBA/COM&#160; calls.</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:21a45279-1e73-45e1-8445-3eb093f7127e" class="wlWriterEditableSmartContent">Technorati Tags: <a href="http://technorati.com/tags/AutoCAD.+ObjectARX" rel="tag">AutoCAD. ObjectARX</a>,<a href="http://technorati.com/tags/VBA" rel="tag">VBA</a>,<a href="http://technorati.com/tags/COM%2b" rel="tag">COM+</a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.geospecialling.com/index.php/2011/02/autocad-vbavb6-to-net-similar-function-comparison/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>1337 System Idle Process</title>
		<link>http://www.geospecialling.com/index.php/2011/02/1337-system-idle-process/</link>
		<comments>http://www.geospecialling.com/index.php/2011/02/1337-system-idle-process/#comments</comments>
		<pubDate>Mon, 21 Feb 2011 20:14:36 +0000</pubDate>
		<dc:creator>Darrin Maidlow</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[1337]]></category>

		<guid isPermaLink="false">http://www.geospecialling.com/index.php/2011/02/1337-system-idle-process/</guid>
		<description><![CDATA[Came across this by chance today on one of our servers =)]]></description>
			<content:encoded><![CDATA[<p>Came across this by chance today on one of our servers =)</p>
<p><a href="http://www.geospecialling.com/wp-content/uploads/2011/02/1337uptime.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="1337 uptime" border="0" alt="1337 uptime" src="http://www.geospecialling.com/wp-content/uploads/2011/02/1337uptime_thumb.png" width="583" height="484" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.geospecialling.com/index.php/2011/02/1337-system-idle-process/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Usage based billing vs. Text Messaging</title>
		<link>http://www.geospecialling.com/index.php/2011/02/usage-based-billing-vs-text-messaging/</link>
		<comments>http://www.geospecialling.com/index.php/2011/02/usage-based-billing-vs-text-messaging/#comments</comments>
		<pubDate>Mon, 21 Feb 2011 18:48:37 +0000</pubDate>
		<dc:creator>Darrin Maidlow</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[UBB]]></category>

		<guid isPermaLink="false">http://www.geospecialling.com/index.php/2011/02/usage-based-billing-vs-text-messaging/</guid>
		<description><![CDATA[Text messaging pricing has always annoyed me.&#160; Given the recent craziness around the CRTC and usage based billing I wondered how the proposed rates of UBB stacked up against what we’re charged for text messages.&#160; Here is some figuring based on some maths I pilfered and simplified from skootles on reddit. 1 text message is [...]]]></description>
			<content:encoded><![CDATA[<p>Text messaging pricing has always annoyed me.&#160; Given the recent craziness around the <a title="Stop The Meter" href="http://www.stopthemeter.ca" rel="tag" target="_blank">CRTC and usage based billing</a> I wondered how the proposed rates of UBB stacked up against what we’re charged for text messages.&#160; Here is some figuring based on some maths I pilfered and simplified from <a title="skootles on reddit" href="http://www.reddit.com/user/skootles" rel="tag" target="_blank">skootles</a> on <a title="Who owns what" href="http://www.reddit.com/r/canada/comments/foq3v/bellrogersshaw_whowhat_do_they_own_a_very_long/" rel="tag" target="_blank">reddit</a>. </p>
<p>1 text message is capped at 140 characters (140 Byte) – Cost per text ~0.25$</p>
<p>Cost per byte (in dollars) of text message: (0.25/140) == 0.0017857142857142857142857142857143</p>
<p>Now some math around internet usage and UBB -assuming one of the proposed usage based billing rates of 1$/GB</p>
<p>1GB = 1,073,741,824bytes</p>
<p>Cost per byte (in dollars) at 1$/GB&#160; = 0.000000000931322574615478515625</p>
<p>UBB cost for the equivalent of one text message= 140 x (1/1,073,741,824) = 0.0000001303851604461669921875</p>
<p>So I guess we should be thankful that the proposed UBB rates were lower than text message rates, 13695 times lower &#8211; (thanks for the maths there <a title="Arne Joris" href="http://ca.linkedin.com/in/arnejoris" rel="tag" target="_blank">Arne</a>])</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:e1f04f34-b2d0-4ae3-b764-7777786d0035" class="wlWriterEditableSmartContent">Technorati Tags: <a href="http://technorati.com/tags/UBB" rel="tag">UBB</a>,<a href="http://technorati.com/tags/CRTC" rel="tag">CRTC</a>,<a href="http://technorati.com/tags/scam" rel="tag">scam</a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.geospecialling.com/index.php/2011/02/usage-based-billing-vs-text-messaging/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creating a custom notepad for use with FullCircle SmartInk</title>
		<link>http://www.geospecialling.com/index.php/2011/02/creating-a-custom-notepad-for-use-with-fullcircle-smartink/</link>
		<comments>http://www.geospecialling.com/index.php/2011/02/creating-a-custom-notepad-for-use-with-fullcircle-smartink/#comments</comments>
		<pubDate>Wed, 16 Feb 2011 22:41:18 +0000</pubDate>
		<dc:creator>Darrin Maidlow</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[SmartInk]]></category>

		<guid isPermaLink="false">http://www.geospecialling.com/index.php/2011/02/creating-a-custom-notepad-for-use-with-fullcircle-smartink/</guid>
		<description><![CDATA[I’m in love with SmartInk…&#160; I’m using it for just about everything I write on paper.&#160;&#160; Initially I started laying down ink purely as a testing exercise for SmartInk – but now I’m finding more and more uses for the pages that are getting saved up into the cloud. One thing that I decided would [...]]]></description>
			<content:encoded><![CDATA[<p>I’m in love with <a title="FullCircle SmartInk" href="http://www.chasmtech.com/solutions/fullcircle-smartink" rel="tag" target="_blank">SmartInk</a>…&#160; I’m using it for just about everything I write on paper.&#160;&#160; Initially I started laying down ink purely as a testing exercise for SmartInk – but now I’m finding more and more uses for the pages that are getting saved up into the cloud. </p>
<p>One thing that I decided would help me would be to create a pre-printed notepad so I was not having to constantly print out new pages to write on.&#160; I decided to build out a nice little Microsoft Word “template” that could be printed off en-mass in using SmartInk.&#160; And well, sharing is caring.&#160; So here it is!</p>
<p>Creating this template was pretty simple.&#160; I fired up word and started a new blank.&#160; I added a stock header and footer.&#160; Slapped in the SmartInk logo and typed in a title.&#160; Added a footer and that was it.&#160; All you SmartInk users may to download this template and modify it to have your own corporate logo or company name – feel free to do so.&#160; You could even go so far as to hire a designer or work with your corporate marketing department to build you out a custom design.&#160;&#160; If your organization has an existing corporate letterhead template you can simply load this up in word and print off a blank page using the SmartInk print driver.</p>
<p>Last step is to bind the pages.&#160; You can go as simply or as crazy as you like!&#160; The easiest option here would be to use a 3 ring binder and simply use the standard hole punch.&#160; Optionally you could also invest in a <a title="Coil Binding Machine" href="http://www.binding.com/catalog.aspx?catid=plasticcoilpunching" rel="tag" target="_blank">coil binding machine</a> or some binding glue (rubber cement).&#160; More details on <a title="Do it yourself notepad binding" href="http://www.ehow.com/how_5860613_bind-pad.html" rel="tag" target="_blank">DIY notepads</a> here.&#160; One last thing to look into, though this might be the most expensive would be to have a printing company bind the pages for you.&#160; You could get some seriously cool notepads done with this method – hard cover, embossed corporate logos, etc.&#160; Just remember though that the printing needs to be done on using the SmartInk printing driver.</p>
<p>I’ve attached a zip file to this post that contains a Microsoft Word docx file that can simply be printed out using the SmartInk printer driver. </p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:fb3a1972-4489-4e52-abe7-25a00bb07fdf:812ea477-ce71-48db-b4aa-785c35a1af37" class="wlWriterSmartContent">
<p><a href="http://www.geospecialling.com/wp-content/uploads/2011/02/SmartInkNotepadTemplate2.zip" target="_blank">Download SmartInk notepad template</a></p>
</p></div>
<p>If you have any suggestions on how to make this template better I’d love to hear from you.&#160; Please comment here, or head over to the <a title="ChasmTech support forum" href="http://www.chasmtech.com/forum/" rel="tag" target="_blank">ChasmTech support forum</a> and post a topic there&#160; It’s funny – I’ve been using Microsoft word forever – at least since <a title="Microsoft Office 95" href="http://en.wikipedia.org/wiki/Microsoft_Office_95" rel="tag" target="_blank">Office 95</a> – but I’ve barely scratched the surface of its functionality =)</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:86cb839a-4b86-457e-84ac-f63fd39e6bca" class="wlWriterEditableSmartContent">Technorati Tags: <a href="http://technorati.com/tags/SmartInk" rel="tag">SmartInk</a>,<a href="http://technorati.com/tags/Digital+Pen" rel="tag">Digital Pen</a>,<a href="http://technorati.com/tags/ChasmTech" rel="tag">ChasmTech</a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.geospecialling.com/index.php/2011/02/creating-a-custom-notepad-for-use-with-fullcircle-smartink/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Debugging Visual Lisp and ObjectARX.NET Together</title>
		<link>http://www.geospecialling.com/index.php/2011/02/debugging-visual-lisp-and-objectarx-net-together/</link>
		<comments>http://www.geospecialling.com/index.php/2011/02/debugging-visual-lisp-and-objectarx-net-together/#comments</comments>
		<pubDate>Mon, 14 Feb 2011 18:22:40 +0000</pubDate>
		<dc:creator>Darrin Maidlow</dc:creator>
				<category><![CDATA[AutoCAD]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[LoaderLock]]></category>
		<category><![CDATA[ObjectARX.NET]]></category>
		<category><![CDATA[Visual Lisp]]></category>

		<guid isPermaLink="false">http://www.geospecialling.com/index.php/2011/02/debugging-visual-lisp-and-objectarx-net-together/</guid>
		<description><![CDATA[I encountered the following error when trying to debug a new ObjectARX .NET assembly using Visual Lisp. Attempting managed execution inside OS Loader lock. Do not attempt to run managed code inside a DllMain or image initialization function since doing so can cause the application to hang. This error would occur 95% of the time [...]]]></description>
			<content:encoded><![CDATA[<p>I encountered the following error when trying to debug a new ObjectARX .NET assembly using <a title="Visual Lisp" href="http://usa.autodesk.com/adsk/servlet/index?siteID=123112&amp;id=770237" rel="tag" target="_blank">Visual Lisp.</a><a href="http://www.geospecialling.com/wp-content/uploads/2011/02/loaderlockwasdetected.png"><img style="border-right-width: 0px; margin: 20px 0px 0px 20px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="loaderlockwasdetected" border="0" alt="loaderlockwasdetected" align="right" src="http://www.geospecialling.com/wp-content/uploads/2011/02/loaderlockwasdetected_thumb.png" width="244" height="153" /></a></p>
<blockquote><p>Attempting managed execution inside OS Loader lock. Do not attempt to run managed code inside a DllMain or image initialization function since doing so can cause the application to hang.</p>
</blockquote>
<p>This error would occur 95% of the time and pretty much took out AutoCAD each time it happened.&#160; Fortunately this can be disabled <a href="http://www.geospecialling.com/wp-content/uploads/2011/02/manageddebuggingeceptions.png"><img style="border-right-width: 0px; margin: 25px 0px 0px 20px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="manageddebuggingeceptions" border="0" alt="manageddebuggingeceptions" align="right" src="http://www.geospecialling.com/wp-content/uploads/2011/02/manageddebuggingeceptions_thumb.png" width="244" height="125" /></a>pretty easily within Visual Studio (I’ve tried both VS 2008 and VS 2010).&#160;&#160; In Visual Studio bring up the exceptions dialog from the Debug / Exceptions menu (or via the keyboard shortcut Cntrl D+E).&#160; </p>
<p>Expand the “Managed Debugging Exceptions” section and uncheck “LoaderLock” in the “Thrown” column.&#160; Next time you start AutoCAD from Visual Studio and load Visual Lisp you should no longer get this exception and you should be merrily debugging away.</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:9d64e73b-d68e-40ee-a1ff-dcba31da40f1" class="wlWriterEditableSmartContent">Technorati Tags: <a href="http://technorati.com/tags/ObjectARX.Net" rel="tag">ObjectARX.Net</a>,<a href="http://technorati.com/tags/Visual+Lisp" rel="tag">Visual Lisp</a>,<a href="http://technorati.com/tags/Visual+Studio" rel="tag">Visual Studio</a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.geospecialling.com/index.php/2011/02/debugging-visual-lisp-and-objectarx-net-together/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>InfoCenter hanging AutoCAD when debugging ObjectARX .NET code</title>
		<link>http://www.geospecialling.com/index.php/2011/02/infocenter-hanging-autocad-when-debugging-objectarx-net-code/</link>
		<comments>http://www.geospecialling.com/index.php/2011/02/infocenter-hanging-autocad-when-debugging-objectarx-net-code/#comments</comments>
		<pubDate>Fri, 04 Feb 2011 13:05:00 +0000</pubDate>
		<dc:creator>Darrin Maidlow</dc:creator>
				<category><![CDATA[AutoCAD]]></category>
		<category><![CDATA[Infocenter]]></category>

		<guid isPermaLink="false">http://www.geospecialling.com/index.php/2011/02/infocenter-hanging-autocad-when-debugging-objectarx-net-code/</guid>
		<description><![CDATA[I’ve been having an annoying problem this week when starting AutoCAD Map 3D 2011 from C# to debug.&#160; Each time AutoCAD starts it hangs on the communication center.&#160; Until I kill the WSCommCtr2.exe task AutoCAD will not finish loading.&#160; Disabling the communication center involves a quick registry change the following key value to 0: 1: [...]]]></description>
			<content:encoded><![CDATA[<p>I’ve been having an annoying problem this week when starting AutoCAD Map 3D 2011 from C# to debug.&#160; Each time AutoCAD starts it hangs on the communication center.&#160; Until I kill the WSCommCtr2.exe task AutoCAD will not finish loading.&#160; Disabling the communication center involves a quick registry change the following key value to 0:</p>
<div>
<div style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">   1:</span> HKEY_CURRENT_USER\Software\Autodesk\AutoCAD\R18.1\ACAD-9002-409\InfoCenter\InfoCenterOn </pre>
</p></div>
</div>
<p>You may see a different version (R18.1) or product id (ACAD-9002-409)&#160; depending on which AutoCAD flavor you have installed.&#160; Tweak that key and you should be good to go!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.geospecialling.com/index.php/2011/02/infocenter-hanging-autocad-when-debugging-objectarx-net-code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hey Canada &#8211; Speak up against usage based billing (UBB)</title>
		<link>http://www.geospecialling.com/index.php/2011/02/hey-canada-speak-up-against-usage-based-billing-ubb/</link>
		<comments>http://www.geospecialling.com/index.php/2011/02/hey-canada-speak-up-against-usage-based-billing-ubb/#comments</comments>
		<pubDate>Fri, 04 Feb 2011 02:00:06 +0000</pubDate>
		<dc:creator>Darrin Maidlow</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[CRTC]]></category>
		<category><![CDATA[UBB]]></category>

		<guid isPermaLink="false">http://www.geospecialling.com/index.php/2011/02/hey-canada-speak-up-against-usage-based-billing-ubb/</guid>
		<description><![CDATA[I’ve been following this CRTC decision for quite some time.&#160; Recently the petition against UBB hit 400K signatures – and turned the head of even the Canadian ruler.&#160;&#160; Now don’t get me wrong – I’m not against companies making a profit -&#160; but come on.&#160; Lowering bandwidth caps and charging between 1 and 15 dollars [...]]]></description>
			<content:encoded><![CDATA[<p>I’ve been following this <a title="useless government organization" href="http://en.wikipedia.org/wiki/CRTC" rel="tag" target="_blank">CRTC</a> decision for quite some time.&#160; Recently the petition against <a title="Usage Based Billing" href="http://en.wikipedia.org/wiki/Usage-based_billing#Usage-based_billing" rel="tag" target="_blank">UBB</a> hit <a title="CRTC before the industry comittee" href="http://openmedia.ca/blog/crtc-industry-committee" rel="tag" target="_blank">400K signatures</a> – and turned the head of even the Canadian ruler.&#160;&#160; Now don’t get me wrong – I’m not against companies making a profit -&#160; but come on.&#160; Lowering bandwidth caps and charging between 1 and 15 dollars per gigabyte is gouging.</p>
<blockquote><p>Keep pushing the CRTC to stop the meter on Internet use. If 400,000 could turn their heads, then 1,000,000 ought to bowl them over.</p>
</blockquote>
<p>So please spread the word and sign <a title="stop usage based billing" href="http://www.stopthemeter.ca" rel="tag" target="_blank">the petition.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.geospecialling.com/index.php/2011/02/hey-canada-speak-up-against-usage-based-billing-ubb/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Too many languages &#8211; they&#8217;re melding together into one..</title>
		<link>http://www.geospecialling.com/index.php/2011/02/too-many-languages-theyre-melding-together-into-one/</link>
		<comments>http://www.geospecialling.com/index.php/2011/02/too-many-languages-theyre-melding-together-into-one/#comments</comments>
		<pubDate>Wed, 02 Feb 2011 06:40:17 +0000</pubDate>
		<dc:creator>Darrin Maidlow</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[AutoLisp]]></category>
		<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://www.geospecialling.com/index.php/2011/02/too-many-languages-theyre-melding-together-into-one/</guid>
		<description><![CDATA[1: (if (== (db_checktrouble) 1) 2: (princ &#34;db_Checktrouble returned correct value&#34;) 3: (alert &#34;db_checktrouble returned wrong value&#34;) 4: ) Writing lisp based unit tests for ObjectARX code written in C# and its all melting together into one….Could this be a new Super Language…..nah…..]]></description>
			<content:encoded><![CDATA[<div>
<div style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">   1:</span> (<span style="color: #0000ff">if</span> (== (db_checktrouble) 1)</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">   2:</span>     (princ <span style="color: #006080">&quot;db_Checktrouble returned correct value&quot;</span>)</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">   3:</span>     (alert <span style="color: #006080">&quot;db_checktrouble returned wrong value&quot;</span>)</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">   4:</span> )</pre>
</p></div>
</div>
<p>Writing lisp based unit tests for ObjectARX code written in C# and its all melting together into one….Could this be a new Super Language…..nah…..</p>
]]></content:encoded>
			<wfw:commentRss>http://www.geospecialling.com/index.php/2011/02/too-many-languages-theyre-melding-together-into-one/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My House is For Sale &#8211; Edmonton Area</title>
		<link>http://www.geospecialling.com/index.php/2011/02/my-house-is-for-sale-edmonton-area/</link>
		<comments>http://www.geospecialling.com/index.php/2011/02/my-house-is-for-sale-edmonton-area/#comments</comments>
		<pubDate>Tue, 01 Feb 2011 19:43:21 +0000</pubDate>
		<dc:creator>Darrin Maidlow</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.geospecialling.com/index.php/2011/02/my-house-is-for-sale-edmonton-area/</guid>
		<description><![CDATA[Hey everybody – Just a quick note we’ve just put our place up for sale.&#160; If you or someone you know is looking for a place in the Edmonton area – check out this listing on the MLS =) Contact me with any questions you may have!]]></description>
			<content:encoded><![CDATA[<p>Hey everybody – Just a quick note we’ve just put our place up for sale.&#160; If you or someone you know is looking for a place in the Edmonton area – check out <a title="my house is for sale!" href="http://www.realtor.ca/PropertyDetails.aspx?PropertyID=10298599&amp;PidKey=-1118951880" rel="tag" target="_blank">this listing</a> on the MLS =)</p>
<p>Contact me with any questions you may have!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.geospecialling.com/index.php/2011/02/my-house-is-for-sale-edmonton-area/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing AutoCAD Map 3D 2011 x86 on Vista x64</title>
		<link>http://www.geospecialling.com/index.php/2011/01/installing-autocad-map-3d-2011-x86-on-vista-x64/</link>
		<comments>http://www.geospecialling.com/index.php/2011/01/installing-autocad-map-3d-2011-x86-on-vista-x64/#comments</comments>
		<pubDate>Tue, 01 Feb 2011 05:02:00 +0000</pubDate>
		<dc:creator>Darrin Maidlow</dc:creator>
				<category><![CDATA[AutoCAD]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[x64]]></category>

		<guid isPermaLink="false">http://www.geospecialling.com/index.php/2011/01/installing-autocad-map-3d-2011-x86-on-vista-x64/</guid>
		<description><![CDATA[Long ago I gave up trying to get both the 64 and 32 bit Oracle clients working on Vista x64.&#160; I have for now adopted the approach that if it talks to Oracle – it needs to be 32 bit.&#160; Even my development projects are set to x86 only to ensure only the 32 bit [...]]]></description>
			<content:encoded><![CDATA[<p>Long ago I gave up trying to get both the <a title="Oracle x86 x64 hell" href="http://www.geospecialling.com/index.php/2009/05/finally-an-oracle-x64-client-that-works-on-vista-aka-getting-map-2010-x64-running-with-oracle/" rel="tag" target="_blank">64 and 32 bit Oracle clients working on Vista x64</a>.&#160; I have for now adopted the approach that if it talks to Oracle – it needs to be 32 bit.&#160; Even my development projects are set to x86 only to ensure only the 32 bit Oracle client is loaded on my development machine.&#160; </p>
<p>I needed to install <a title="AutoCAD Map 3D 2011" href="http://www.google.com/url?sa=t&amp;source=web&amp;cd=1&amp;ved=0CBYQFjAA&amp;url=http%3A%2F%2Fusa.autodesk.com%2Fadsk%2Fservlet%2Fpc%2Findex%3Fid%3D13818317%26siteID%3D123112&amp;rct=j&amp;q=autocad%20map%202011&amp;ei=DDJHTYufDMzegQfLrJTNAQ&amp;usg=AFQjCNGL_t2Qy5bPlwRpNPkSKmQ7-NgFwA&amp;cad=rja" rel="tag" target="_blank">AutoCAD Map 3D 2011</a>&#160; to debug some <a title="ObjectARX" href="http://www.google.com/url?sa=t&amp;source=web&amp;cd=1&amp;ved=0CBsQFjAA&amp;url=http%3A%2F%2Fusa.autodesk.com%2Fadsk%2Fservlet%2Findex%3Fid%3D773204%26siteID%3D123112&amp;rct=j&amp;q=objectARX&amp;ei=5TFHTdCIHcXOgAep_NzIAQ&amp;usg=AFQjCNGH82-jEJQxFtDrtrkZvck4kPXd8g&amp;cad=rja" rel="tag" target="_blank">ObjectARX</a> code I’ve been working on so I downloaded the 32 bit installer and fired it up only to be informed that my platform was unsupported and I would need to install the 64 bit version.&#160; grrrr.</p>
<p>Google had very little to say on the topic.&#160; More junk about hacking MSI files with Orca.&#160; I took a look at setup.ini and there were far too many references to x64 – I don’t have time for this…Finally I came across the <a title="Longbow Software Converter" href="http://www.longbowsoftware.com/" rel="tag" target="_blank">Longbow Software Converter</a>.&#160; The product claims to modify your setups to allow the 32 bit installers to work on x64 operating systems, 40$.&#160; I couldn’t find any reviews or testimonials so I figured I’d give it a shot…</p>
<p>So here is your first testimonial Longbow Software =)</p>
<p>This actually worked great.&#160; Bought the convert, installed it to a virtual machine.&#160;&#160; The interface is dead simple – paste or browse to the location of the AutoCAD installation files and press Convert.&#160; Keep in mind if you’re running from a DVD you’ll need to copy the contents of the DVD to your PC or a network share so the files can be edited.&#160; I pointed the converter to an install on a network share.&#160; It chugged away for about a minute (keeping in mind this was on an underpowered VM).&#160; Within a matter of minutes I had AutoCAD Map 3D 2011 installing on my Vista x64 box with no problems.&#160; Ran AutoCAD and it seems to fire up no problem.&#160; </p>
<p>Bear in mind – for AutoCAD to work with anything Oracle – you need to have the 32 bit Oracle client running on your machine.</p>
<p>40$ well spent IMO.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.geospecialling.com/index.php/2011/01/installing-autocad-map-3d-2011-x86-on-vista-x64/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Netflix in Canada&#8230;</title>
		<link>http://www.geospecialling.com/index.php/2010/12/netflix-in-canada/</link>
		<comments>http://www.geospecialling.com/index.php/2010/12/netflix-in-canada/#comments</comments>
		<pubDate>Tue, 14 Dec 2010 17:33:59 +0000</pubDate>
		<dc:creator>Darrin Maidlow</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[NetFlix]]></category>

		<guid isPermaLink="false">http://www.geospecialling.com/index.php/2010/12/netflix-in-canada/</guid>
		<description><![CDATA[This about sums up my experience with Netflix Canada…Too bad too, if we had the same selection as what is available in the US I would have been all over it…]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.geospecialling.com/wp-content/uploads/2010/12/NetFlixCanada.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="NetFlixCanada" border="0" alt="NetFlixCanada" src="http://www.geospecialling.com/wp-content/uploads/2010/12/NetFlixCanada_thumb.png" width="484" height="324" /></a></p>
<p>This about sums up my experience with Netflix Canada…Too bad too, if we had the same selection as what is available in the US I would have been all over it…</p>
]]></content:encoded>
			<wfw:commentRss>http://www.geospecialling.com/index.php/2010/12/netflix-in-canada/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ERROR: Unable to update the dependencies of the project</title>
		<link>http://www.geospecialling.com/index.php/2010/11/error-unable-to-update-the-dependencies-of-the-project/</link>
		<comments>http://www.geospecialling.com/index.php/2010/11/error-unable-to-update-the-dependencies-of-the-project/#comments</comments>
		<pubDate>Sun, 07 Nov 2010 05:22:08 +0000</pubDate>
		<dc:creator>Darrin Maidlow</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[Installer]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://www.geospecialling.com/index.php/2010/11/error-unable-to-update-the-dependencies-of-the-project/</guid>
		<description><![CDATA[Working on the automated build process for FullCircle SmartForms tonight and I came across an irritating problem tonight: &#34;ERROR: Unable to update the dependencies of the project. The dependencies for the object &#8216;NHibernate.Validator.DLL&#8217; cannot be determined.&#34; One of my three Visual Studio 2010 installer projects started failing during the automated build process with this error [...]]]></description>
			<content:encoded><![CDATA[<p>Working on the automated build process for FullCircle SmartForms tonight and I came across an irritating problem tonight:</p>
<blockquote><p><b>&quot;ERROR: Unable to update the dependencies of the project. The dependencies for the object &#8216;NHibernate.Validator.DLL&#8217; cannot be determined.&quot;</b></p>
</blockquote>
<p>One of my three Visual Studio 2010 installer projects started failing during the automated build process with this error on a dozen included assemblies.&#160; When the project was built using the Visual Studio IDE the installer would build just fine.&#160; With a little bit of digging and a great deal of screwing around, I found a <a title="Microsoft Knowledge Base" href="http://support.microsoft.com/kb/2286556" rel="tag" target="_blank">Microsoft KB article</a> and <a title="el hotfixo for &quot;Unable to update the dependancies of the project" href="https://connect.microsoft.com/VisualStudio/Downloads/DownloadDetails.aspx?DownloadID=30681" rel="tag" target="_blank">hotfix</a> for this problem.</p>
<p>After installing the patch – my automated build system is happily compiling the installation project.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.geospecialling.com/index.php/2010/11/error-unable-to-update-the-dependencies-of-the-project/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Elite Autodesk Certifications!</title>
		<link>http://www.geospecialling.com/index.php/2010/10/elite-autodesk-certifications/</link>
		<comments>http://www.geospecialling.com/index.php/2010/10/elite-autodesk-certifications/#comments</comments>
		<pubDate>Sat, 30 Oct 2010 01:24:00 +0000</pubDate>
		<dc:creator>Darrin Maidlow</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Autodesk]]></category>
		<category><![CDATA[Certifications]]></category>

		<guid isPermaLink="false">http://www.geospecialling.com/index.php/2010/10/elite-autodesk-certifications/</guid>
		<description><![CDATA[Did you know, one of my very first jobs at Kanotech back the late 90s was doing phone support and training on the Autodesk products that Kanotech sold?&#160; I was digging around under orders from my wife to clean out my office and I came across a box of stuff from my desk back at [...]]]></description>
			<content:encoded><![CDATA[<p>Did you know, one of my very first jobs at <a title="Kanotech" href="http://www.kanotech.com" rel="tag" target="_blank">Kanotech</a> back the late 90s was doing phone support and training on the Autodesk products that Kanotech sold?&#160; I was digging around under orders from my wife to clean out my office and I came across a box of stuff from my desk back at Kanotech (circa 2003!).&#160; Check out a couple of the awesome certifications I had back in the day!&#160; Signed by Carol Bartz too!!&#160; Too bad these seem to be the only two that survived…</p>
<p><a href="http://www.geospecialling.com/wp-content/uploads/2010/11/cert2.jpg" target="_blank"><img style="border-right-width: 0px; margin: 0px 40px 0px 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Architectural Desktop R2 Certification" border="0" alt="Architectural Desktop R2 Certification" src="http://www.geospecialling.com/wp-content/uploads/2010/11/cert2_thumb.jpg" width="244" height="179" /></a> <a href="http://www.geospecialling.com/wp-content/uploads/2010/11/cert1.jpg" target="_blank"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="AutoCAD Map 2000 Certification" border="0" alt="AutoCAD Map 2000 Certification" src="http://www.geospecialling.com/wp-content/uploads/2010/11/cert1_thumb.jpg" width="244" height="179" /></a> </p>
<p>I worked on QA projects for Autodesk on AutoCAD Map 2, 2000 and 2000i yet they still made me take the silly tests to get&#160; “certified” =).&#160; Do you have some old tyme Autodesk certs?&#160; Feel free to share a link in the comments.&#160; Were you in one of the AutoCAD Map or <a title="Autodesk Mapguide" href="http://www.mapguide.com" target="_blank">Mapguide</a> courses I taught way back in the day?&#160; If so leave a comment to say hi =)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.geospecialling.com/index.php/2010/10/elite-autodesk-certifications/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mapguide Enterprise 2011 &#8211; Fusion and Selection XML</title>
		<link>http://www.geospecialling.com/index.php/2010/09/mapguide-enterprise-2011-fusion-and-selection-xml/</link>
		<comments>http://www.geospecialling.com/index.php/2010/09/mapguide-enterprise-2011-fusion-and-selection-xml/#comments</comments>
		<pubDate>Wed, 15 Sep 2010 21:00:14 +0000</pubDate>
		<dc:creator>Darrin Maidlow</dc:creator>
				<category><![CDATA[Mapguide]]></category>
		<category><![CDATA[RADE]]></category>
		<category><![CDATA[Fusion]]></category>
		<category><![CDATA[Mapguide Enterprise]]></category>

		<guid isPermaLink="false">http://www.geospecialling.com/index.php/2010/09/mapguide-enterprise-2011-fusion-and-selection-xml/</guid>
		<description><![CDATA[I’ve been working to migrate the RADE&#160;Mapguide 2010 code to work with 2011.&#160; In 2010, I only implemented support for the DWF and Ajax viewer.&#160; With the release of 2011, the new&#160; ability to include mapping data from Google, Yahoo and Microsoft in Fusion are huge so I opted to migrate everything over.&#160; The DWF [...]]]></description>
			<content:encoded><![CDATA[<p>I’ve been working to migrate the <a title="RADE" href="http://www.geospecialling.com/index.php/2008/06/rade-build-custom-web-applications-without-writing-custom-code/" rel="tag" target="_blank">RADE</a>&#160;<a title="Autodesk Mapguide" href="http://www.mapguide.com" target="_blank">Mapguide</a> 2010 code to work with 2011.&#160; In 2010, I only implemented support for the DWF and Ajax viewer.&#160; With the release of 2011, the new&#160; ability to include mapping data from Google, Yahoo and Microsoft in Fusion are huge so I opted to migrate everything over.&#160; The DWF viewer is already deprecated and I suspect the Ajax viewer will likely go next. </p>
<p>With 2010 and the Ajax viewer we had to get the selection from the MapFrame using the GetSelectionXML() method.&#160; Then we had to encode, and send this value up to the web tier for processing.&#160; I had all kinds of business logic that I was hoping to re-use with a minimal amount of modifications so I was trying to find how to recreate this functionality with Fusion.&#160; I figured out how the selections worked on the client side using the new callback system and was getting the selection object – but I could not find anything definitively saying “There is no selection XML on the client side anymore”.&#160;&#160;&#160; So…</p>
<blockquote><p><strong>There is no selection XML on the client side any more when using Fusion.</strong></p>
</blockquote>
<p>There I said it.&#160; It makes sense too – first getting this large XML string and sending it up was a pain in the ass.&#160; Encoding it, creating a form to submit it, etc.&#160;&#160; I should have clued into this sooner – Fusion is updating the selection on the server side as needed.&#160; </p>
<p>So in order to minimally impact the existing code – I added an additional check to some of the calls that looks a little something like this:</p>
<div>
<div style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">   1:</span> <span style="color: #0000ff">if</span> (String.IsNullOrEmpty(selectionXml))</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">   2:</span> {</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">   3:</span>     MgResourceService resSvc = (MgResourceService)siteConn.CreateService(MgServiceType.ResourceService);</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">   4:</span>     sel.Open(resSvc, map.GetName());</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">   5:</span>     selectionXml = sel.ToXml();</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">   6:</span> }</pre>
</p></div>
</div>
<p>Those four lines of code are a lot easier than all the screwing around needed in 2010 to get the selection XML.&#160;&#160; With that small modification my existing code is working perfectly!</p>
<p>hope this helps someone =)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.geospecialling.com/index.php/2010/09/mapguide-enterprise-2011-fusion-and-selection-xml/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Creating .NET objects for Mapguide Enterprise 2011</title>
		<link>http://www.geospecialling.com/index.php/2010/07/creating-net-objects-for-mapguide-enterprise-2011/</link>
		<comments>http://www.geospecialling.com/index.php/2010/07/creating-net-objects-for-mapguide-enterprise-2011/#comments</comments>
		<pubDate>Sun, 25 Jul 2010 05:15:41 +0000</pubDate>
		<dc:creator>Darrin Maidlow</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Mapguide]]></category>
		<category><![CDATA[RADE]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[Mapguide Enterprise]]></category>

		<guid isPermaLink="false">http://www.geospecialling.com/index.php/2010/07/creating-net-objects-for-mapguide-enterprise-2011/</guid>
		<description><![CDATA[Better late than never…&#160; I’ve updated my Mapguide Enterprise .NET objects to work with 2011.&#160; The steps in my previous post for creating .NET objects for Mapguide Enterprise 2009&#160; have been modernized and simplified significantly.&#160;&#160; This post will show you how to create (or re-create) these objects for the 2011 release of Mapguide.&#160; Sorry for [...]]]></description>
			<content:encoded><![CDATA[<p>Better late than never…&#160; I’ve updated my <a title="Autodesk Mapguide" href="http://www.mapguide.com" target="_blank"></a><a title="Autodesk Mapguide Enterprise" href="http://www.mapguide.com" target="_blank">Mapguide Enterprise</a> .NET</a> objects to work with 2011.&#160; The steps in my <a title="Creating .NET objects for Mapguide XML schema definitions" href="http://www.webrade.com/blogs/darrin/2008/05/16/CreatingNETObjectsForMapguideXMLSchemaDefinitionsXSDUsingLINQ.aspx" target="_blank" rel="tag">previous post for creating .NET objects for Mapguide Enterprise 2009</a>&#160; have been modernized and simplified significantly.&#160;&#160; This post will show you how to create (or re-create) these objects for the 2011 release of Mapguide.&#160; Sorry for skipping 2010 =)</p>
<p>First, download the actual non-aplha release of <a title="LINQ to XSD" href="http://linqtoxsd.codeplex.com/releases/view/41258" target="_blank" rel="tag">LINQ to XSD</a> and extract it.&#160; You will need to have <a href="http://www.webrade.com/blogs/darrin/ct.ashx?id=f6d81338-14fd-4465-a8bd-8eeee747cdd4&amp;url=http%3a%2f%2fwww.microsoft.com%2fdownloads%2fdetails.aspx%3fFamilyID%3da45f58cd-fcfc-439e-b735-8182775560af%26displaylang%3den">.NET 3.5</a> installed to run LINQ to XSD.&#160; The project itself is a Visual Studio 2010, .NET 4.0 project.&#160; You should be able to change it to .NET 3.5 with no problems.&#160; I’m not sure about using .NET 2.0.&#160;&#160; I still assume these steps should work with <a title="Mapguide Open Source" href="http://mapguide.osgeo.org" target="_blank">Mapguide Open Source</a> 2.2 given its pretty much the same thing as MGE 2011.&#160; Please let me know if you try it and that is not the case.</p>
<h3>Building the classes</h3>
<p>Last time around we had to mess around with Visual Studio projects, building temporary code, finding and extracting that code from temporary files.&#160; This time around, we’re given a nice little executable that can be run in a batch file.&#160;&#160; I’ve posted a copy of my batch file below but it was simply made using a dir /b &gt; CreateMapguideNetObjects.cmd in the <a title="Autodesk Mapguide" href="http://www.mapguide.com" target="_blank">Mapguide</a> server schema folder (which by default is to c:\Program Files\Autodesk\MapGuideEnterprise2011\Server\Schema) .&#160; I then edited that file with a text editor that support macros and removed the following schema files:</p>
<ul>
<li>FdoProviderCapabilities-1.0.0.xsd </li>
<li>LoadProcedure-1.0.0.xsd </li>
<li>LoadProcedure-1.1.0.xsd </li>
<li>LayerDefinition-1.0.0.xsd </li>
<li>LayerDefinition-1.1.0.xsd </li>
<li>LayerDefinition-1.2.0.xsd </li>
<li>SiteInformation-1.0.0.xsd </li>
<li>SiteVersion-1.0.0.xsd </li>
<li>SymbolDefinition-1.0.0.xsd </li>
<li>WebLayout-1.0.0.xsd </li>
</ul>
<p>These files are deprecated object definitions from previous Mapguide releases.&#160; In the end each line in the batch file looks a little like this:</p>
<blockquote><p>LinqToXsd ApplicationDefinition-1.0.0.xsd /filename:ApplicationDefinition.cs</p>
</blockquote>
<p>Executing the batch file will create a number of C# files containing appropriately named classes.</p>
<h3>Setting up your project</h3>
<p>At this point you should be able to fire up Visual Studio and create a new C# project.&#160;&#160; If you have an existing project from a previous version of Mapguide its good to start fresh.&#160; Also, don’t try this in an existing solution that is dependant on the project that contains the Mapguide objects.&#160; This will just result in a bunch of extra screwing around to avoid compiler errors from missing code during the process.&#160;&#160;&#160; This time around its a lot easier.&#160; Create a new DLL project.&#160; Add a reference to the Xml.Schema.Linq.dll file that was included with LinqToXsd.exe.&#160;&#160; Add a reference to the following Mapguide dlls:</p>
<ul>
<li>OSGeo.Mapguide.Foundation</li>
<li>OSGeo.Mapguide.Geometry</li>
<li>OSGeo.Mapguide.MapguideCommon</li>
<li>OSGeo.Mapguide.PlatformBase</li>
<li>OSGeo.Mapguide.Web</li>
</ul>
<p>You’ll also need to ensure that the appropriate unmanaged assemblies are available in the calling applications bin folder when you go to run this stuff.&#160; </p>
<p>Next place all of the generated C# files in the new project.&#160; Once you build you’re going to see a ton of errors.&#160; We’ll clean those up.</p>
<p>To resolve a lot of these errors I did a global search and replace on “global::” and replaced it with nothing.&#160; Also, I wrapped each class in a unique wrapper classes to prevent duplicate type errors.&#160; Finally, the case issue with DataType was still an issue – and I resolved it by changing the case on DataType to be Datatype:</p>
<div>
<div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   1:</span> <span style="color: #0000ff">public</span> <span style="color: #0000ff">string</span> DataType {</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   2:</span> <span style="color: #0000ff">public</span> <span style="color: #0000ff">string</span> Datatype {</pre>
</p></div>
</div>
<p>For a complete view of the changes I made do a file compare between the code in the attached zip file and your newly generated code.</p>
<p>&lt;insert 3 week gap here, wherein I had <a title="Mapguide Enterprise 2011 installation and licensing fun" href="http://www.geospecialling.com/index.php/2010/07/mapguide-2011-javascript-error-openlayers-lang-is-null-or-not-an-object/" target="_blank" rel="tag">a hell of a time getting MGE 2011 installed and properly licensed</a> so that I could actually test this newly created code, oh and I also went on vacation for a few days too =)/&gt;</p>
<p>And back.&#160; The best part about this is that it seems ALL my old <a title="RADE" href="http://www.geospecialling.com/index.php/2008/06/rade-build-custom-web-applications-without-writing-custom-code/" target="_blank" rel="tag">RADE</a> code just worked with upgraded basic layouts after changing it to look for the object definitions within the new wrapper classes.&#160;&#160; Now I just need to add support for flexible layouts and we’ll be laughing.</p>
<h3>The Code</h3>
<p>Please note – I didn’t rebase the code.&#160; It’s all in the RADE.MGE namespace.&#160; If you would like to use it, feel free to re-base it – or just leave it as is.&#160; Also, if you create any unit tests or enhancements and would like to share them – please feel free!&#160;&#160; </p>
<p>As I update the project myself, or receive updates I will update this file.</p>
<div class="wlWriterEditableSmartContent" id="scid:fb3a1972-4489-4e52-abe7-25a00bb07fdf:5b76b660-1647-415a-861e-ec611af03c8f" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px">
<p>Download the <a href="http://www.geospecialling.com/wp-content/uploads/2010/07/RADE.MGE_.2011.zip" target="_blank">Mapguide .NET Objects Visual Studio 2010 solution</a></p>
</div>
<p>.&#160;
<p>Finally, the <a title="Examples of using the Mapguide .NET objects" href="http://www.webrade.com/blogs/darrin/2008/05/21/DynamicAuthoringInMapguideEnterpriseBeforeTheViewerHasLoaded.aspx" target="_blank" rel="tag">example code I posted long ago</a> will still work with this new project.&#160; Perhaps one day, I’ll post some fancy new code in C# =) </p>
<p>Hope this comes in handy, I welcome your comments.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.geospecialling.com/index.php/2010/07/creating-net-objects-for-mapguide-enterprise-2011/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mapguide 2011 Javascript error &#8216;OpenLayers.Lang&#8217; is null or not an object</title>
		<link>http://www.geospecialling.com/index.php/2010/07/mapguide-2011-javascript-error-openlayers-lang-is-null-or-not-an-object/</link>
		<comments>http://www.geospecialling.com/index.php/2010/07/mapguide-2011-javascript-error-openlayers-lang-is-null-or-not-an-object/#comments</comments>
		<pubDate>Wed, 21 Jul 2010 04:33:47 +0000</pubDate>
		<dc:creator>Darrin Maidlow</dc:creator>
				<category><![CDATA[Mapguide]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Mapguide Enterprise]]></category>

		<guid isPermaLink="false">http://www.geospecialling.com/index.php/2010/07/mapguide-2011-javascript-error-openlayers-lang-is-null-or-not-an-object/</guid>
		<description><![CDATA[We’ve finally moved Mapguide Enterprise support back up the list of priorities for RADE =)&#160; The ability to add Google, Yahoo, and Bing data into the map with OpenLayers is very compelling.&#160; So I’ve spent a little time (actually kind of a lot of time)&#160; in the past little bit trying to get my Mapguide [...]]]></description>
			<content:encoded><![CDATA[<p>We’ve finally moved <a title="Autodesk Mapguide" href="http://www.mapguide.com" target="_blank"><a title="Autodesk Mapguide Enterprise" href="http://www.mapguide.com" target="_blank">Mapguide Enterprise</a> support</a> back up the list of priorities for <a title="RADE" href="http://www.geospecialling.com/index.php/2008/06/rade-build-custom-web-applications-without-writing-custom-code/" target="_blank" rel="tag">RADE</a> =)&#160; The ability to add Google, Yahoo, and Bing data into the map with OpenLayers is very compelling.&#160; So I’ve spent a little time (actually kind of a lot of time)&#160; in the past little bit trying to get my <a title="Autodesk Mapguide" href="http://www.mapguide.com" target="_blank">Mapguide</a> development environment setup.&#160;&#160; To avoid cross site scripting (xss) errors when developing on my workstation I needed to install the web tier locally.&#160;&#160; After muchos problems with license servers and the likes I came across an annoying javascript error whenever I would load a <a title="flexible web layout" href="http://docs.autodesk.com/TOPOBSADM/2011/ENU/Autodesk%20Topobase%202011%20Help/filesAdministrator/WS73099cc142f487557bfaa8da122ec01152fbe5-procedure1.htm" target="_blank" rel="tag">Flexible Web Layout</a> using&#160; the local web tier:</p>
<div>
<div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   1:</span> Line: 2</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   2:</span> Char: 2498</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   3:</span> Error: <span style="color: #006080">'OpenLayers.Lang'</span> <span style="color: #0000ff">is</span> <span style="color: #0000ff">null</span> or not an <span style="color: #0000ff">object</span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   4:</span> Code: 0</pre>
</p></div>
</div>
<p>Loading the web tier on the Mapguide server worked fine.&#160; Very odd.&#160; I ended up doing a file comparison between the two web tiers and noticed the only significant difference was this in the web.config:</p>
<div>
<div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   1:</span> <span style="color: #0000ff">&lt;</span><span style="color: #800000">staticContent</span><span style="color: #0000ff">&gt;</span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   2:</span>     <span style="color: #0000ff">&lt;</span><span style="color: #800000">mimeMap</span> <span style="color: #ff0000">fileExtension</span><span style="color: #0000ff">=&quot;.json&quot;</span> <span style="color: #ff0000">mimeType</span><span style="color: #0000ff">=&quot;application/json&quot;</span> <span style="color: #0000ff">/&gt;</span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   3:</span> <span style="color: #0000ff">&lt;/</span><span style="color: #800000">staticContent</span><span style="color: #0000ff">&gt;</span></pre>
</p></div>
</div>
<p>Adding this tag to IIS 7 on Vista resulted in an error, the tag must be something new in IIS 7.5.&#160; However, after manually adding the mime type mapping to the server – my flexible layout now loads perfectly on the local Vista web tier.<a href="http://www.geospecialling.com/wp-content/uploads/2010/07/SNAGHTML15f08bbe.png"><img title="SNAGHTML15f08bbe" style="border-right: 0px; border-top: 0px; display: inline; margin-left: 0px; border-left: 0px; margin-right: 0px; border-bottom: 0px" height="179" alt="SNAGHTML15f08bbe" src="http://www.geospecialling.com/wp-content/uploads/2010/07/SNAGHTML15f08bbe_thumb.png" width="244" align="right" border="0" /></a></p>
<p>This mime type mapping can be added on either the virtual directory, or the server level.&#160; I chos to add it to the server.&#160; Either way, to add it select the appropriate level in IIS manager.&#160; In the right hand window double click “Mime Types”.&#160; Click Add and you can enter the .json extension and the mime type.&#160; Once this is added, Vista/IIS7 was now properly serving out flexible layers</p>
<p><a href="http://www.geospecialling.com/wp-content/uploads/2010/07/SNAGHTML15eec92b.png">&#160;</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.geospecialling.com/index.php/2010/07/mapguide-2011-javascript-error-openlayers-lang-is-null-or-not-an-object/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>A breakthrough in the war on phone spam</title>
		<link>http://www.geospecialling.com/index.php/2010/07/a-breakthrough-in-the-war-on-phone-spam/</link>
		<comments>http://www.geospecialling.com/index.php/2010/07/a-breakthrough-in-the-war-on-phone-spam/#comments</comments>
		<pubDate>Fri, 09 Jul 2010 20:22:54 +0000</pubDate>
		<dc:creator>Darrin Maidlow</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Spam]]></category>

		<guid isPermaLink="false">http://www.geospecialling.com/index.php/2010/07/a-breakthrough-in-the-war-on-phone-spam/</guid>
		<description><![CDATA[One of the things that absolutely drives me insane is phone spam.&#160; Nothing like being deep in concentration inside some algorithm and have the damn phone ring with a phone spammer on the line.&#160; A lot of days, I’ll just turn off all the phones in an effort to get shit done&#8230; I’m on both [...]]]></description>
			<content:encoded><![CDATA[<p>One of the things that absolutely drives me insane is phone spam.&#160; Nothing like being deep in concentration inside some algorithm and have the damn phone ring with a phone spammer on the line.&#160; A lot of days, I’ll just turn off all the phones in an effort to get shit done&#8230; I’m on both the US and Canadian “Do Not Call” lists.&#160; I report every single unsolicited call, yet they keep on coming&#8230; </p>
<p>Came across this blog post today detailing an <a title="stick it to the phone spammers" href="http://revk.www.me.uk/2010/07/what-moron.html" target="_blank" rel="tag">awesome honey pot project by a UK ISP</a>.&#160; They’re turning the tides on phone spammers.&#160;&#160; There are some hilarious mp3’s on the site where you can hear the “conversation” between the honey pot and one of the “moron” phone spammers.&#160; They’re keeping some of these calls on the line for 4+ minutes.&#160; Totally awesome.</p>
<p>I hope someone can take initiative and setup something similar in North America.&#160; If I had the resources I would take this on in a heartbeat…</p>
<p>Hats off to you guys.. =)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.geospecialling.com/index.php/2010/07/a-breakthrough-in-the-war-on-phone-spam/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Effortlessly map domain and DTO entities</title>
		<link>http://www.geospecialling.com/index.php/2010/06/effortlessly-map-domain-and-dto-entities/</link>
		<comments>http://www.geospecialling.com/index.php/2010/06/effortlessly-map-domain-and-dto-entities/#comments</comments>
		<pubDate>Tue, 08 Jun 2010 04:19:19 +0000</pubDate>
		<dc:creator>Darrin Maidlow</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[DTO]]></category>

		<guid isPermaLink="false">http://www.geospecialling.com/index.php/2010/06/effortlessly-map-domain-and-dto-entities/</guid>
		<description><![CDATA[I recently created a set of DTO objects to complement the domain entities we use for our data access layer for a new project we’re working on.&#160; I immediately set out to write a mapping utility.&#160; After a bit of thought pondering the complexity of the problem I decided to look around on the magical [...]]]></description>
			<content:encoded><![CDATA[<p>I recently created a set of <a title="data transfer object" href="http://en.wikipedia.org/wiki/Data_Transfer_Object" target="_blank" rel="tag">DTO</a> objects to complement the domain entities we use for our data access layer for a new project we’re working on.&#160; I immediately set out to write a mapping utility.&#160; After a bit of thought pondering the complexity of the problem I decided to look around on the magical internets to see what options were available.</p>
<p>Came across <a title="Automappper - convention-based object-object mapper" href="http://automapper.codeplex.com/" target="_blank" rel="tag">Automapper</a>.&#160;&#160; This is a perfect match for my needs:</p>
<blockquote><p>AutoMapper uses a fluent configuration API to define an object-object mapping strategy.&#160;&#160; AutoMapper uses a convention-based matching algorithm to match up source to destination values. Currently, AutoMapper is geared towards model projection scenarios to flatten complex object models to DTOs and other simple objects, whose design is better suited for serialization, communication, messaging, or simply an anti-corruption layer between the domain and application layer.</p>
</blockquote>
<p>It was quick to setup, and painless to use.&#160; First define your object to object mappings:</p>
<div>
<div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   1:</span> Mapper.CreateMap&lt;RADE.BO.Domain.Application, RADE.BO.Entity.Application&gt;();</pre>
</p></div>
</div>
<div>&#160;</div>
<div>Next, whip up a small conversion function:</div>
<div>
<div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   1:</span> <span style="color: #008000">/// &lt;summary&gt;</span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   2:</span> <span style="color: #008000">/// Convert a DTOApplication to abnd </span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   3:</span> <span style="color: #008000">/// &lt;/summary&gt;</span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   4:</span> <span style="color: #008000">/// &lt;param name=&quot;app&quot;&gt;&lt;/param&gt;</span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   5:</span> <span style="color: #008000">/// &lt;returns&gt;&lt;/returns&gt;</span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   6:</span> <span style="color: #0000ff">public</span> <span style="color: #0000ff">static</span> RADE.BO.Domain.Application Convert(Application app)</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   7:</span> {</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   8:</span>   <span style="color: #0000ff">if</span> (app == <span style="color: #0000ff">null</span>) <span style="color: #0000ff">return</span> <span style="color: #0000ff">null</span>;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   9:</span>   LoadDtoMappings();</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  10:</span>   <span style="color: #0000ff">return</span> AutoMapper.Mapper.Map&lt;Application, RADE.BO.Domain.Application&gt;(app);</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  11:</span> }</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  12:</span>&#160; </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  13:</span> <span style="color: #008000">/// &lt;summary&gt;</span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  14:</span> <span style="color: #008000">/// Convert a list of domain Application objects to DTO Application objects</span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  15:</span> <span style="color: #008000">/// &lt;/summary&gt;</span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  16:</span> <span style="color: #008000">/// &lt;param name=&quot;apps&quot;&gt;List of domain Application objects&lt;/param&gt;</span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  17:</span> <span style="color: #008000">/// &lt;returns&gt;List of DTO Application objects&lt;/returns&gt;</span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  18:</span> <span style="color: #0000ff">public</span> <span style="color: #0000ff">static</span> List&lt;Application&gt; Convert(List&lt;RADE.BO.Domain.Application&gt; apps)</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  19:</span> {</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  20:</span>     LoadDtoMappings();</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  21:</span>     <span style="color: #0000ff">return</span> apps.Select(AutoMapper.Mapper.Map&lt;RADE.BO.Domain.Application, Application&gt;).ToList();</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  22:</span> }</pre>
</p></div>
</div>
<p>It’s important to note that if your source object contains nested objects – a mapping for each nested object must also be defined.&#160; This goes on recursively through nested objects.&#160; My domain Application object contains some numerous sub objects – Map, Layer etc.&#160; In this case rather than establish mappings for these child objects – I removed these objects from my DTO as the client consuming these objects would never need that data.&#160; This also keeps the size of any data possibly being serialized down.&#160;&#160; Automapper dealt with this automatically.</p>
<p>I’ve only scratched the surface of what Automapper can do.&#160; Next step is to define unit test coverage using the <a title="Automapper configuration validation" href="http://automapper.codeplex.com/wikipage?title=Configuration%20Validation&amp;referringTitle=Home" target="_blank" rel="tag">configuration validation</a>, but it’s sleep time now… =)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.geospecialling.com/index.php/2010/06/effortlessly-map-domain-and-dto-entities/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Please be specific when talking to your developers</title>
		<link>http://www.geospecialling.com/index.php/2010/04/please-be-specific-when-talking-to-your-developers/</link>
		<comments>http://www.geospecialling.com/index.php/2010/04/please-be-specific-when-talking-to-your-developers/#comments</comments>
		<pubDate>Wed, 28 Apr 2010 22:46:00 +0000</pubDate>
		<dc:creator>Darrin Maidlow</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Developers]]></category>

		<guid isPermaLink="false">http://www.geospecialling.com/index.php/2010/04/please-be-specific-when-talking-to-your-developers/</guid>
		<description><![CDATA[In the RADE tabular reports we have the ability to format the output of a column using a standard String.Format syntax.&#160;&#160; This is used often in the reports to convert string data containing URLs to clickable links when the page is rendered: 1: &#34;&#60;a href=”{0}” target=”_blank”&#62;{0}&#60;/a&#62;&#34; This format string of course when applied to the [...]]]></description>
			<content:encoded><![CDATA[<p>In the <a title="RADE" href="http://www.geospecialling.com/index.php/2008/06/rade-build-custom-web-applications-without-writing-custom-code/" target="_blank" rel="tag">RADE</a> tabular reports we have the ability to format the output of a column using a standard String.Format syntax.&#160;&#160; This is used often in the reports to convert string data containing URLs to clickable links when the page is rendered:</p>
<div>
<div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   1:</span> <span style="color: #006080">&quot;&lt;a href=”{0}” target=”_blank”&gt;{0}&lt;/a&gt;&quot;</span></pre>
</p></div>
</div>
<p>This format string of course when applied to the source data would result in a hyperlink being created with the URL in both the href property of the link as well as the&#160; visible link text.&#160; <a title="Lance Maidlow - ChasmJumper" href="http://www.chasmjumper.com" target="_blank" rel="tag">Lance</a> called and asked if it would be possible to change the report so that it showed simply the word “View” instead of the url.&#160; We already had a remote control session running so I opened up his RADE and changed the format string to:</p>
<div>
<div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   1:</span> <span style="color: #006080">&quot;&lt;a href=”{0}” target=”_blank”&gt;View&lt;/a&gt;&quot;</span></pre>
</p></div>
</div>
<p>He saw this small change and I heard him slap his forehead, and he asked “Why didn’t you tell me this sooner, I’ve wanted to do this forever!”.&#160; To this I responded “You never asked…”</p>
<p>So the moral of this story is directed to managers, sales types, or any other person who works with software developers.&#160;&#160; We’re incredibly smart, and there is far too much good stuff inside our heads for us to just “tell you everything”.&#160; If we were to try, you would either fall asleep or your head would pop.&#160;&#160; So please, rather than expect us to tell you what you want to know – just ask. =)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.geospecialling.com/index.php/2010/04/please-be-specific-when-talking-to-your-developers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>No catapults allowed in carry-on or checked luggage</title>
		<link>http://www.geospecialling.com/index.php/2010/04/no-catapults-allowed-in-carry-on-or-checked-luggage/</link>
		<comments>http://www.geospecialling.com/index.php/2010/04/no-catapults-allowed-in-carry-on-or-checked-luggage/#comments</comments>
		<pubDate>Mon, 26 Apr 2010 14:20:00 +0000</pubDate>
		<dc:creator>Darrin Maidlow</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Random]]></category>

		<guid isPermaLink="false">http://www.geospecialling.com/index.php/2010/04/no-catapults-allowed-in-carry-on-or-checked-luggage/</guid>
		<description><![CDATA[In preparation for our vacation to Costa Rica I was reviewing the Canadian government’s list of&#160; items that should/should not be packed in your carry-on or checked luggage.&#160; I was shocked to find out that catapults are not allowed in either your carry on or checked luggage!&#160; Catapults are so bad, they’ve made the list [...]]]></description>
			<content:encoded><![CDATA[<p>In preparation for our vacation to Costa Rica I was reviewing the Canadian government’s list of&#160; items that <a title="No Catapults allowed" href="http://www.catsa-acsta.gc.ca/Page.aspx?ID=58&amp;pname=CompleteItemList_ListeCompleteArticles&amp;lang=en" target="_blank" rel="tag">should/should not be packed</a> in your carry-on or checked luggage.&#160; I was shocked to find out that catapults are not allowed in either your carry on or checked luggage!&#160; Catapults are so bad, they’ve made the list twice!</p>
<p><a href="http://www.geospecialling.com/wp-content/uploads/2010/04/catapultsneednotapply.png"><img title="catapults need not apply" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="82" alt="catapults need not apply" src="http://www.geospecialling.com/wp-content/uploads/2010/04/catapultsneednotapply_thumb.png" width="739" border="0" /></a> </p>
<p><a href="http://www.geospecialling.com/wp-content/uploads/2010/04/slingshotsandcatapults.png"><img title="slingshots and catapults forbidden!" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="79" alt="slingshots and catapults forbidden!" src="http://www.geospecialling.com/wp-content/uploads/2010/04/slingshotsandcatapults_thumb.png" width="738" border="0" /></a> </p>
<p>Other honorable mentions include:</p>
<ul>
<li>Hand Grenades</li>
<li>Molotov Cocktails</li>
<li>Nitroglycerin (this is OK when in medication format)</li>
</ul>
<p>If you’re planning some air travel in the near future – leave your catapult at home!&#160; Maple Syrup and spread is completely OK though!</p>
<p><a href="http://www.geospecialling.com/wp-content/uploads/2010/04/mapleproducts.png"><img title="maple products" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="149" alt="maple products" src="http://www.geospecialling.com/wp-content/uploads/2010/04/mapleproducts_thumb.png" width="730" border="0" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.geospecialling.com/index.php/2010/04/no-catapults-allowed-in-carry-on-or-checked-luggage/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Who owns the most servers</title>
		<link>http://www.geospecialling.com/index.php/2010/04/who-owns-the-most-servers/</link>
		<comments>http://www.geospecialling.com/index.php/2010/04/who-owns-the-most-servers/#comments</comments>
		<pubDate>Fri, 23 Apr 2010 20:49:57 +0000</pubDate>
		<dc:creator>Darrin Maidlow</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Servers]]></category>

		<guid isPermaLink="false">http://www.geospecialling.com/index.php/2010/04/who-owns-the-most-servers/</guid>
		<description><![CDATA[Did you think you’d see Google on this?&#160; Scroll down…]]></description>
			<content:encoded><![CDATA[<p>Did you think you’d see Google on this?&#160; Scroll down…</p>
<p><a href="http://www.geospecialling.com/wp-content/uploads/2010/04/WhoOwnsTheMostServers.jpg"><img title="WhoOwnsTheMostServers" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="2656" alt="WhoOwnsTheMostServers" src="http://www.geospecialling.com/wp-content/uploads/2010/04/WhoOwnsTheMostServers_thumb.jpg" width="504" border="0" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.geospecialling.com/index.php/2010/04/who-owns-the-most-servers/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Visual Studio 2010 keyboard shortcut posters</title>
		<link>http://www.geospecialling.com/index.php/2010/04/visual-studio-2010-keyboard-shortcut-posters/</link>
		<comments>http://www.geospecialling.com/index.php/2010/04/visual-studio-2010-keyboard-shortcut-posters/#comments</comments>
		<pubDate>Thu, 22 Apr 2010 16:53:51 +0000</pubDate>
		<dc:creator>Darrin Maidlow</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://www.geospecialling.com/index.php/2010/04/visual-studio-2010-keyboard-shortcut-posters/</guid>
		<description><![CDATA[Using keyboard shortcuts will speed up your development big time once you get used to them.&#160; Microsoft released handy keyboard shortcut charts for VB, C#,&#160; F# and C++ 2010.&#160;&#160; They print OK on 8.5&#215;11 (not great).&#160; Sucks that Microsoft put scary stock imagery on the sheets though.&#160; These shortcuts are only partially accurate if you’re [...]]]></description>
			<content:encoded><![CDATA[<p>Using keyboard shortcuts will speed up your development big time once you get used to them.&#160; Microsoft released <a title="handy visual studio 2010 keyboard shortcuts" href="http://blogs.msdn.com/lisa/archive/2010/04/16/vs-2010-keyboard-shortcut-posters-now-available-for-vb-c-f-c.aspx" target="_blank" rel="tag">handy keyboard shortcut</a> charts for VB, C#,&#160; F# and C++ 2010.&#160;&#160; They print OK on 8.5&#215;11 (not great).&#160; Sucks that Microsoft put scary stock imagery on the sheets though.&#160; These shortcuts are only partially accurate if you’re using ReSharper, here is a <a title="Resharper 5 key map - more win" href="http://www.jetbrains.com/resharper/docs/ReSharper50DefaultKeymap_VS_scheme.pdf" target="_blank" rel="tag">key map for ReSharper 5</a> – and look, no scary stock imagery in this one.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.geospecialling.com/index.php/2010/04/visual-studio-2010-keyboard-shortcut-posters/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Windows Vista won&#8217;t let me browse my iPhone when I plug it in</title>
		<link>http://www.geospecialling.com/index.php/2010/04/windows-vista-wont-let-me-browse-my-iphone-when-i-plug-it-in/</link>
		<comments>http://www.geospecialling.com/index.php/2010/04/windows-vista-wont-let-me-browse-my-iphone-when-i-plug-it-in/#comments</comments>
		<pubDate>Fri, 16 Apr 2010 14:18:00 +0000</pubDate>
		<dc:creator>Darrin Maidlow</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://www.geospecialling.com/index.php/2010/04/windows-vista-wont-let-me-browse-my-iphone-when-i-plug-it-in/</guid>
		<description><![CDATA[I was trying to get some images off my iPhone this morning, but the thing wouldn’t show up in Windows explorer.&#160;&#160; ITunes was doing the backup and sync no problem – but the phone would not mount as a usb device.&#160; Usually the phone shows up in explorer under the Computer section as “Apple iPhone”.&#160; [...]]]></description>
			<content:encoded><![CDATA[<p>I was trying to get some images off my iPhone this morning, but the thing wouldn’t show up in Windows explorer.&#160;&#160; ITunes was doing the backup and sync no problem – but the phone would not mount as a usb device.&#160; Usually the phone shows up in explorer under the Computer section as “Apple iPhone”.&#160; Unplugging and reconnecting the thing would just cause a re-sync.</p>
<p>After much mucking around the best solution I could find was to disconnect the iPhone from the usb cable, start the windows Device Manager and un-install the Apple iPhone driver from the Portable Devices section of the devices.&#160; Make sure you check the delete driver checkbox.&#160; Finally, re-connect your iPhone and the driver should re-install allowing you to see your device in Windows Explorer again.</p>
<h3>No images on device</h3>
<p>So now I can see my phone in Vista – but when I browse to the device the internal storage folders are empty.&#160; There are tons of images in the “Camera Roll” when looking at the phone.&#160; After much more muckery – I found one image that was saved from the interwebs rather than taken with the phones’ camera.&#160; Once I deleted this image, and reconnected the phone all the images showed up no problem.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.geospecialling.com/index.php/2010/04/windows-vista-wont-let-me-browse-my-iphone-when-i-plug-it-in/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Deployment project crashes on execution with .NET version error</title>
		<link>http://www.geospecialling.com/index.php/2010/04/deployment-project-crashes-on-execution-with-net-version-error/</link>
		<comments>http://www.geospecialling.com/index.php/2010/04/deployment-project-crashes-on-execution-with-net-version-error/#comments</comments>
		<pubDate>Thu, 15 Apr 2010 20:47:58 +0000</pubDate>
		<dc:creator>Darrin Maidlow</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Installer]]></category>

		<guid isPermaLink="false">http://www.geospecialling.com/index.php/2010/04/deployment-project-crashes-on-execution-with-net-version-error/</guid>
		<description><![CDATA[This week I jumped on the .NET 4 bandwagon.&#160; I had a proof of concept project that I wanted to bring up to the “real product” level.&#160;&#160; This new product consists of a console application, a windows service, and some business logic and data access assemblies.&#160; During the development of my proof I created a [...]]]></description>
			<content:encoded><![CDATA[<p>This week I jumped on the <a title=".NET 4.0 bandwagon" href="http://www.microsoft.com/visualstudio/en-us/" target="_blank" rel="tag">.NET 4</a> bandwagon.&#160; I had a proof of concept project that I wanted to bring up to the “real product” level.&#160;&#160; This new product consists of a console application, a windows service, and some business logic and data access assemblies.&#160; During the development of my proof I created a small deployment project to build a quick and dirty installer.&#160;&#160; </p>
<p>I’ve upgraded the solution to 2010.&#160; I’ve done all the refactoring and finished my work.&#160; Everything tests out great in both unit tests and “developers computer” tests.&#160; Just need to get the installer updated and get the pesky “other peoples computers” thing out of the way.&#160; </p>
<p>I’ve updated the pre-requisites on my installer to include .NET 4.0 – rebuilt the installer and boom.&#160; </p>
<blockquote><p>Error 1001.&#160; Exception occurred while initializing the installation.&#160; System.BadImageFormatException: Could not load file or assembly ‘file:///C:\Program Files\Landor\ … \RADE.Connect.Service.exe’ or one of its dependencies.&#160; This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.</p>
</blockquote>
<p>After much mucking around I found the hidden property that I needed to change.&#160; I needed to change the .NET version of the .NET Launch Condition.&#160; To find this gem right click on the deployment project in the solution explorer and choose View\Launch Conditions.&#160; Next right click on the “.NET Framework” under “Launch Conditions” and choose “properties”.&#160; In the properties dialog change the Version to be “.NET Framework 4”.</p>
<h4>Update 4/20/2010</h4>
<p>Don’t forget to edit the .NET version for both Release and Debug configurations.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.geospecialling.com/index.php/2010/04/deployment-project-crashes-on-execution-with-net-version-error/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Visual Studio 2010 and .NET 4.0 Full available on MSDN!</title>
		<link>http://www.geospecialling.com/index.php/2010/04/visual-studio-2010-and-net-4-0-full-available-on-msdn/</link>
		<comments>http://www.geospecialling.com/index.php/2010/04/visual-studio-2010-and-net-4-0-full-available-on-msdn/#comments</comments>
		<pubDate>Mon, 12 Apr 2010 16:06:51 +0000</pubDate>
		<dc:creator>Darrin Maidlow</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://www.geospecialling.com/index.php/2010/04/visual-studio-2010-and-net-4-0-full-available-on-msdn/</guid>
		<description><![CDATA[MSDN has been updated with the full releases of VS 2010 and .NET 4.0.&#160; Getting some decent download speeds too.. http://msdn.microsoft.com wooo!]]></description>
			<content:encoded><![CDATA[<p>MSDN has been updated with the full releases of VS 2010 and .NET 4.0.&#160; Getting some decent download speeds too..</p>
<p><a href="http://msdn.microsoft.com">http://msdn.microsoft.com</a></p>
<p>wooo!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.geospecialling.com/index.php/2010/04/visual-studio-2010-and-net-4-0-full-available-on-msdn/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Visual Studio 2010, .NET 4.0, AND ReSharper 5.0 launch today!</title>
		<link>http://www.geospecialling.com/index.php/2010/04/visual-studio-2010-net-4-0-and-resharper-5-0-launch-today/</link>
		<comments>http://www.geospecialling.com/index.php/2010/04/visual-studio-2010-net-4-0-and-resharper-5-0-launch-today/#comments</comments>
		<pubDate>Mon, 12 Apr 2010 14:32:00 +0000</pubDate>
		<dc:creator>Darrin Maidlow</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[ReSharper]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://www.geospecialling.com/index.php/2010/04/visual-studio-2010-net-4-0-and-resharper-5-0-launch-today/</guid>
		<description><![CDATA[I may be weird, but I actually went to bed excited last night.&#160; VS 2010, .NET 4.0, AND Resharper 5.0 are supposed to be released today.&#160;&#160; For the first time in probably months I got out of bed at 7am -&#160; It’s now 7:30 Redmond time – but MSDN has not yet been updated!&#160; Apparently [...]]]></description>
			<content:encoded><![CDATA[<p>I may be weird, but I actually went to bed excited last night.&#160; VS 2010, .NET 4.0, AND <a title="Resharper 5.0" href="http://www.jetbrains.com/resharper/" target="_blank" rel="tag">Resharper 5.0</a> are supposed to be released today.&#160;&#160; For the first time in probably months I got out of bed at 7am -&#160; It’s now 7:30 Redmond time – but MSDN has not yet been updated!&#160; Apparently we have to wait until 8:30 Redmond time.&#160;&#160; Adobe is all over their release of CS5 today, and they didn’t make their users wait until 8:30 Redmond time! =) </p>
<p>In the meantime, The Register has a good write up on some of the <a title="Visual Studio 2010 goodies coming" href="http://www.theregister.co.uk/2010/04/12/visual_studio_2010_platform_challenge/" target="_blank" rel="tag">new goodies</a> coming in an hour or so.&#160; That will learn me for getting up early.&#160; Oh well, time for another <a title="mmmm mr. cappuccino how I love you..." href="http://www.healthycoder.com/index.php/2009/10/a-new-addiction-cappuccino/" target="_blank" rel="tag">cap</a>!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.geospecialling.com/index.php/2010/04/visual-studio-2010-net-4-0-and-resharper-5-0-launch-today/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>NHibernate 2.1 throws System.InvalidCastException on Oracle 10g R1 client</title>
		<link>http://www.geospecialling.com/index.php/2010/04/nhibernate-2-1-throws-system-invalidcastexception-on-oracle-10g-r1-client/</link>
		<comments>http://www.geospecialling.com/index.php/2010/04/nhibernate-2-1-throws-system-invalidcastexception-on-oracle-10g-r1-client/#comments</comments>
		<pubDate>Fri, 09 Apr 2010 21:52:00 +0000</pubDate>
		<dc:creator>Darrin Maidlow</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[nHibernate]]></category>
		<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://www.geospecialling.com/index.php/2010/04/nhibernate-2-1-throws-system-invalidcastexception-on-oracle-10g-r1-client/</guid>
		<description><![CDATA[When deploying an early build of an up and coming product on a customers machine I came across the following error: System.InvalidCastException: Unable to cast object of type &#8216;Oracle.DataAccess.Client.OracleConnection&#8217; to type &#8216;System.Data.Common.DbConnection&#8217; This was one of those awesome “doesn’t happen on any of my machine” errors.&#160; After some mucking around we determined that the client [...]]]></description>
			<content:encoded><![CDATA[<p>When deploying an early build of an up and coming product on a customers machine I came across the following error:</p>
<p><em>System.InvalidCastException: Unable to cast object of type &#8216;Oracle.DataAccess.Client.OracleConnection&#8217; to type &#8216;System.Data.Common.DbConnection&#8217; </em></p>
<p>This was one of those awesome “doesn’t happen on any of my machine” errors.&#160; After some mucking around we determined that the client machine was using the Oracle 10g&#160; R1 client.&#160; The machines and VMs here we used for testing were all running either 11g, or 10g R2.&#160; Doh!</p>
<p>The simple resolution to this was to modify the NHhibernate config and add the following property:</p>
<div>
<div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   1:</span> <span style="color: #0000ff">&lt;</span><span style="color: #800000">property</span> <span style="color: #ff0000">name</span><span style="color: #0000ff">=&quot;hbm2ddl.keywords&quot;</span><span style="color: #0000ff">&gt;</span>none<span style="color: #0000ff">&lt;/</span><span style="color: #800000">property</span><span style="color: #0000ff">&gt;</span></pre>
</p></div>
</div>
<p>Depending on your underlying databases and mappings this could cause problems with your code project.&#160; Hopefully you’re not using reserved words, or bad Oracle syntax =).</p>
<p>Under the hood, the problem seems to be that the Oracle10gDialect does not provide an implementation of IDataBaseSchema for 10gR1.&#160;&#160; Fabio Maulo has provided some sample code and the steps on <a title="Create missing IDataBaseSchema for submission to NHibernate" href="http://fabiomaulo.blogspot.com/2009/06/from-where-start-to-implements.html" rel="tag">how to create the appropriate metadata</a> for your database and submit it to the NHibernate project for inclusion. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.geospecialling.com/index.php/2010/04/nhibernate-2-1-throws-system-invalidcastexception-on-oracle-10g-r1-client/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A concerned resident called police&#8230;</title>
		<link>http://www.geospecialling.com/index.php/2010/04/a-concerned-resident-called-police/</link>
		<comments>http://www.geospecialling.com/index.php/2010/04/a-concerned-resident-called-police/#comments</comments>
		<pubDate>Fri, 09 Apr 2010 15:57:02 +0000</pubDate>
		<dc:creator>Darrin Maidlow</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Storm Troopers]]></category>

		<guid isPermaLink="false">http://www.geospecialling.com/index.php/2010/04/a-concerned-resident-called-police/</guid>
		<description><![CDATA[Stating there was a man walking around in a white suit carrying a machine gun.]]></description>
			<content:encoded><![CDATA[<p>Stating there was a man walking around in a <a title="man in white suit carrying machine gun" rel="tag" href="http://www.stalbertgazette.com/article/20100407/SAG0801/304079960" target="_blank">white suit carrying a machine gun</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.geospecialling.com/index.php/2010/04/a-concerned-resident-called-police/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Blending the iPad!</title>
		<link>http://www.geospecialling.com/index.php/2010/04/blending-the-ipad/</link>
		<comments>http://www.geospecialling.com/index.php/2010/04/blending-the-ipad/#comments</comments>
		<pubDate>Tue, 06 Apr 2010 17:13:46 +0000</pubDate>
		<dc:creator>Darrin Maidlow</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[iPad]]></category>

		<guid isPermaLink="false">http://www.geospecialling.com/index.php/2010/04/blending-the-ipad/</guid>
		<description><![CDATA[I love Blendtec.&#160; From the makers of Cochicken, here is blending the iPad!]]></description>
			<content:encoded><![CDATA[<p>I love <a title="Blendtec" href="http://www.blendtec.com/" rel="tag">Blendtec</a>.&#160; From the makers of <a title="CoChicken" href="http://www.youtube.com/watch?v=K0m4x0y3QNw" rel="tag">Cochicken</a>, here is blending the iPad!</p>
<div class="wlWriterEditableSmartContent" id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:b0b8d5ca-eb6d-4f62-9817-79e4399e4065" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px">
<div id="09f8aa22-6561-4096-81fc-b7322cadbc9a" style="margin: 0px; padding: 0px; display: inline;">
<div><a href="http://www.youtube.com/watch?v=lAl28d6tbko&amp;feature=youtu.be" target="_new"><img src="http://www.geospecialling.com/wp-content/uploads/2010/04/videofdec035bfee6.jpg" style="border-style: none" galleryimg="no" onload="var downlevelDiv = document.getElementById('09f8aa22-6561-4096-81fc-b7322cadbc9a'); downlevelDiv.innerHTML = &quot;&lt;div&gt;&lt;object width=\&quot;425\&quot; height=\&quot;355\&quot;&gt;&lt;param name=\&quot;movie\&quot; value=\&quot;http://www.youtube.com/v/lAl28d6tbko&amp;hl=en\&quot;&gt;&lt;\/param&gt;&lt;embed src=\&quot;http://www.youtube.com/v/lAl28d6tbko&amp;hl=en\&quot; type=\&quot;application/x-shockwave-flash\&quot; width=\&quot;425\&quot; height=\&quot;355\&quot;&gt;&lt;\/embed&gt;&lt;\/object&gt;&lt;\/div&gt;&quot;;" alt=""></a></div>
</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.geospecialling.com/index.php/2010/04/blending-the-ipad/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ReSharper 5.0 is coming!</title>
		<link>http://www.geospecialling.com/index.php/2010/04/resharper-5-0-is-coming/</link>
		<comments>http://www.geospecialling.com/index.php/2010/04/resharper-5-0-is-coming/#comments</comments>
		<pubDate>Fri, 02 Apr 2010 23:29:00 +0000</pubDate>
		<dc:creator>Darrin Maidlow</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[ReSharper]]></category>

		<guid isPermaLink="false">http://www.geospecialling.com/index.php/2010/04/resharper-5-0-is-coming/</guid>
		<description><![CDATA[Ok, I’ve mentioned ReSharper in the past – but I had to bring it up again..&#160; Version 5 has some great new functionality and its coming soon!&#160; I’m especially excited about the huge functionality added for ASP.NET web development.&#160; I’ve been using the 5 beta and RC for probably a month or two and its [...]]]></description>
			<content:encoded><![CDATA[<p>Ok, I’ve <a title="Re-Sharper - A class creating machine" href="http://www.geospecialling.com/index.php/2008/07/resharper-a-class-creating-machine/" rel="tag">mentioned ReSharper</a> in the past – but I had to bring it up again..&#160; Version 5 has some great new functionality and its <a title="ReSharper 5 goes RC" href="http://blogs.jetbrains.com/dotnet/2010/03/resharper-50-goes-rc/" rel="tag">coming soon!</a>&#160; I’m especially excited about the huge <a title="ReSharper ASP.NET functionality" href="http://www.jetbrains.com/resharper/beta/beta.html#web_development" rel="tag">functionality added for ASP.NET</a> web development.&#160; I’ve been using the 5 beta and RC for probably a month or two and its great – I’ve been doing a metric butt-ton of refactoring and its great to have my changes go all the way into the .aspx files.&#160; </p>
<p>The NUnit test engine is great.&#160;&#160; I didn’t realize this was a ReSharper tool at first.&#160; Now, I can’t live without it.</p>
<p>The localization plugin is going to save me days of effort on an upcoming action item.&#160; </p>
<p>The class/code generating tools are indispensible – especially if you create a lot of classes (e.g NHibernate POCO’s). </p>
<p>The refactorings have been helping me slowly increase the legibility of my code – and also helping me build better coding habits.&#160; Check out the comparison between <a title="ReSharper 4.5 - 5.0 comparison" href="http://www.jetbrains.com/resharper/documentation/resharper5_vs_resharper45.html" rel="tag">version 5.0 and 4.5.</a></p>
<p>If you’ve never tried ReSharper – <a title="Try ReSharper" href="http://www.jetbrains.com/resharper/" rel="tag">now is the time.</a>&#160; only I could make the time to properly learn all the different tools available…</p>
]]></content:encoded>
			<wfw:commentRss>http://www.geospecialling.com/index.php/2010/04/resharper-5-0-is-coming/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Upgrading to NHibernate 2.1 for new Validators!</title>
		<link>http://www.geospecialling.com/index.php/2010/03/upgrading-to-nhibernate-2-1-for-new-validators/</link>
		<comments>http://www.geospecialling.com/index.php/2010/03/upgrading-to-nhibernate-2-1-for-new-validators/#comments</comments>
		<pubDate>Fri, 26 Mar 2010 23:04:00 +0000</pubDate>
		<dc:creator>Darrin Maidlow</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[nHibernate]]></category>

		<guid isPermaLink="false">http://www.geospecialling.com/index.php/2010/03/upgrading-to-nhibernate-2-1-for-new-validators/</guid>
		<description><![CDATA[I wanted to implemented the new NHibernate Validators which meant upgrading to NH 2.1.&#160;&#160; Found a great post documenting the new “breaking change” between 2.0 and 2.1 pertaining to the new proxy factory functionality in NH.&#160; “The ProxyFactoryFactory was not configured.” jumped up and bit me in the ass.&#160;&#160; NH used to assume Castle – [...]]]></description>
			<content:encoded><![CDATA[<p>I wanted to implemented the new <a title="NHibernate Validators" href="http://nhforge.org/wikis/validator/nhibernate-validator-1-0-0-documentation.aspx" rel="tag">NHibernate Validators</a> which meant upgrading to NH 2.1.&#160;&#160; Found a great post documenting the new “breaking change” between 2.0 and 2.1 pertaining to the new proxy factory functionality in NH.&#160; “The ProxyFactoryFactory was not configured.” jumped up and bit me in the ass.&#160;&#160; </p>
<p>NH used to assume Castle – but now it needs to be configured.&#160; In addition to the Castly proxy, there is a new LinFu proxy available too.&#160;&#160; <a title="Upgrading to NHibernate 2.1 - The ProxyFactoryFactory was not configured." href="http://davybrion.com/blog/2009/03/upgrading-to-nhibernate-21/" rel="tag">Don’t bother with NHibernate the release notes!</a> , Davy Brion has it all for you here =).&#160; </p>
<p>I opted to go with the Castly Dynamic Proxy – I’m not in a position to do any performance tests between– Castle has been around a long time and has a pretty big user base.&#160; Good <a title="Castly Dynamic Proxy vs LinFu" href="http://stackoverflow.com/questions/1406762/what-are-the-differences-between-linfu-dynamicproxy-and-castle-dynamicproxy" rel="tag">post on stackoverflow</a> on this subject.&#160; However, LinFu would have won if I was basing my choice on name alone…</p>
<p>After a bit of fiddling, I’m back up and running with NH 2.1 and shiny new validation attributes.&#160;&#160;&#160; </p>
<p>mmmm validation…</p>
]]></content:encoded>
			<wfw:commentRss>http://www.geospecialling.com/index.php/2010/03/upgrading-to-nhibernate-2-1-for-new-validators/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Oracle.DataAccess version numbers in a .NET config file</title>
		<link>http://www.geospecialling.com/index.php/2010/03/oracle-dataaccess-version-numbers-in-a-net-config-file/</link>
		<comments>http://www.geospecialling.com/index.php/2010/03/oracle-dataaccess-version-numbers-in-a-net-config-file/#comments</comments>
		<pubDate>Fri, 05 Mar 2010 19:37:00 +0000</pubDate>
		<dc:creator>Darrin Maidlow</dc:creator>
				<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://www.geospecialling.com/index.php/2010/03/oracle-dataaccess-version-numbers-in-a-net-config-file/</guid>
		<description><![CDATA[For my future reference! RADE and FullCircle and builds usually have the ODP.NET version in the web.confg set by the installer, but development builds usually come from my machine and are configured for use with the Oracle 11 ODP.NET.&#160;&#160; If this is set incorrectly, you will get an error that looks a little something like [...]]]></description>
			<content:encoded><![CDATA[<p>For my future reference!</p>
<p>RADE and FullCircle and builds usually have the ODP.NET version in the web.confg set by the installer, but development builds usually come from my machine and are configured for use with the Oracle 11 ODP.NET.&#160;&#160; If this is set incorrectly, you will get an error that looks a little something like this:</p>
<p><i>The IDbCommand and IDbConnection implementation in the assembly Oracle.DataAccess could not be found. Ensure that the assembly Oracle.DataAccess is located in the application directory or in the Global Assembly Cache. If the assembly is in the GAC, use &lt;qualifyAssembly/&gt; element in the application configuration file to specify the full name of the assembly.</i></p>
<p>To use an different version of the Oracle client, the web.config must be edited and the QualifyAssembly section must have its version property set appropriately.&#160; This will also apply for an app.config too.</p>
<div>
<div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   1:</span> <span style="color: #0000ff">&lt;</span><span style="color: #800000">runtime</span><span style="color: #0000ff">&gt;</span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   2:</span>     <span style="color: #0000ff">&lt;</span><span style="color: #800000">assemblyBinding</span> <span style="color: #ff0000">xmlns</span><span style="color: #0000ff">=&quot;urn:schemas-microsoft-com:asm.v1&quot;</span><span style="color: #0000ff">&gt;</span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   3:</span>         <span style="color: #0000ff">&lt;</span><span style="color: #800000">qualifyAssembly</span> <span style="color: #ff0000">partialName</span><span style="color: #0000ff">=&quot;Oracle.DataAccess&quot;</span> <span style="color: #ff0000">fullName</span><span style="color: #0000ff">=&quot;Oracle.DataAccess, Version=2.102.2.20, Culture=neutral, PublicKeyToken=89b483f429c47342&quot;</span><span style="color: #0000ff">/&gt;</span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   4:</span>     <span style="color: #0000ff">&lt;/</span><span style="color: #800000">assemblyBinding</span><span style="color: #0000ff">&gt;</span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   5:</span> <span style="color: #0000ff">&lt;/</span><span style="color: #800000">runtime</span><span style="color: #0000ff">&gt;</span></pre>
</p></div>
</div>
<p>Possible values for this are:</p>
<ul>
<li>11g: Version=2.102.2.20</li>
<li>10g R2: Version=1.102.3.0</li>
<li>10g: Version=10.2.0.100</li>
</ul>
<p>Set your config appropriately and you’re good to go.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.geospecialling.com/index.php/2010/03/oracle-dataaccess-version-numbers-in-a-net-config-file/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Google Mail Prevents Embarrassing &#8220;Oops here is the file i meant to send&#8221;</title>
		<link>http://www.geospecialling.com/index.php/2010/02/google-mail-prevents-embarrassing-oops-here-is-the-file-i-meant-to-send/</link>
		<comments>http://www.geospecialling.com/index.php/2010/02/google-mail-prevents-embarrassing-oops-here-is-the-file-i-meant-to-send/#comments</comments>
		<pubDate>Sat, 27 Feb 2010 21:42:55 +0000</pubDate>
		<dc:creator>Darrin Maidlow</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.geospecialling.com/index.php/2010/02/google-mail-prevents-embarrassing-oops-here-is-the-file-i-meant-to-send/</guid>
		<description><![CDATA[We’ve ALL done it.  Having to send out that follow up “Oh yah, here is the file I meant to attach.  I’m dumb” e-mails.  I just about sent one today – but Google mail saved the day with a new feature! Thank you Google…]]></description>
			<content:encoded><![CDATA[<p>We’ve ALL done it.  Having to send out that follow up “Oh yah, here is the file I meant to attach.  I’m dumb” e-mails.  I just about sent one today – but Google mail saved the day with a new feature!</p>
<p><a href="http://www.geospecialling.com/wp-content/uploads/2010/02/image.png"><img style="display: inline; border-width: 0px;" title="image" src="http://www.geospecialling.com/wp-content/uploads/2010/02/image_thumb.png" border="0" alt="image" width="244" height="114" /></a></p>
<p>Thank you Google…</p>
]]></content:encoded>
			<wfw:commentRss>http://www.geospecialling.com/index.php/2010/02/google-mail-prevents-embarrassing-oops-here-is-the-file-i-meant-to-send/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Configuring Mapguide Enterprise 2009 and 2010 on the same machine</title>
		<link>http://www.geospecialling.com/index.php/2009/08/configuring-mapguide-enterprise-2009-and-2010-on-the-same-machine/</link>
		<comments>http://www.geospecialling.com/index.php/2009/08/configuring-mapguide-enterprise-2009-and-2010-on-the-same-machine/#comments</comments>
		<pubDate>Thu, 06 Aug 2009 19:57:27 +0000</pubDate>
		<dc:creator>Darrin Maidlow</dc:creator>
				<category><![CDATA[Mapguide]]></category>
		<category><![CDATA[Mapguide Enterprise]]></category>

		<guid isPermaLink="false">http://www.landoris.com/blogs/darrin/index.php/2009/08/configuring-mapguide-enterprise-2009-and-2010-on-the-same-machine/</guid>
		<description><![CDATA[So I’m a little behind on the times.&#160; Yes I’ve finally started making the switch from Mapguide Enterprise 2009 to MGE 2010.&#160;&#160; However, I need to keep 2009 around a little bit longer.&#160; This resulted in wanting to configure both 2009 and 2010 on the same server.&#160; Configuring Mapguide enterprise 2009 and 2010 on the [...]]]></description>
			<content:encoded><![CDATA[<p>So I’m a little behind on the times.&#160; Yes I’ve finally started making the switch from Mapguide Enterprise 2009 to MGE 2010.&#160;&#160; However, I need to keep 2009 around a little bit longer.&#160; This resulted in wanting to configure both 2009 and 2010 on the same server.&#160; Configuring <a title="Autodesk Mapguide Enterprise" href="http://www.mapguide.com" target="_blank">Mapguide enterprise</a> 2009 and 2010 on the same machine is possible, and even beneficial in a development environment.&#160; Less VMs or servers can be a good thing in these days of crazy <a title="Virtual Machines - Too much of a good thing" href="http://www.enterprisestorageforum.com/management/article.php/3772841" target="_blank" rel="tag">virtual machine sprawl</a>.&#160; Autodesk however, recommends against doing this in a production environment.&#160;&#160; You should probably heed this advice if this Mapguide installation is important – even from a workgroup development point of view.&#160;&#160; Note, these steps should be relevant for the <a title="Mapguide Open Source" href="http://mapguide.osgeo.org" target="_blank">Mapguide Open Source</a> equivalents – though I have not tried it.</p>
<p>After installing <a title="Autodesk Mapguide" href="http://www.mapguide.com" target="_blank">Mapguide</a> 2010 (both server and web tier) on a server running 2009 and updating the license manager appropriately, you’ll notice that the service is not running.&#160; Attempts to start the service will result in an error message logged in the Windows Application Log that looks a little bit like this:</p>
<blockquote><p>The description for Event ID ( 0 ) in Source ( MapGuide Enterprise 2010 Server ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. You may be able to use the /AUXSOURCE= flag to retrieve this description; see Help and Support for details. The following information is part of the event: Port 2801 is not available, please try using a different port.</p>
</blockquote>
<p>So we need to setup one of the Mapguide installations to use a different set of ports.&#160; I’ve chosen to modify the behavior of Mapguide 2010, though these changes could be made for Mapguide 2009 instead.&#160;&#160; For this process we’ll need three free ports.&#160; For simplicity its nice to keep these ports sequential.&#160; You will need to ensure that the ports you choose are available on your system.</p>
<p>First we need to edit the serverconfig.ini in the C:\Program Files\Autodesk\MapGuideEnterprise2010\Server\Bin folder.&#160;&#160; First lets change the Port in the AdministrativeConnectionProperties section from 2800 to lets say 3800.&#160;&#160; Next in the ClientConnectionProperties section change the port to 3801.&#160; Finally change the port in SiteConnectionProperties to 3802.</p>
<p>Next we need to edit the webconfig.ini in the C:\Program Files\Autodesk\MapGuideEnterprise2010\WebServerExtensions folder.&#160; We need to update the port numbers in this config to match the numbers in the server config.&#160; Remember the web config is the client that will usually be consuming the server service.&#160; Finally, as the configuration settings for the web tier may be cached you should restart IIS using iisreset.exe.&#160; This will clear the cached port configurations and Mapguide Studio / Mapguide Administration will now work properly.</p>
<p>Once that is done, the 2009 repository can be migrated to 2010 by following the steps included in the Help/MGE2010UpgradingWindows.htm file on your installation disc/folder.</p>
<h2>PHP Problems</h2>
<p>Once MGE 2010 has been installed I had a problem with PHP.&#160; Multiple PHPs can be bad news.&#160; I’ve found that running both MGE 2009 and 2010 using the PHP provided with 2010 seems to do the trick.&#160; First you will need to edit the Windows system path.&#160; Update the path variable there to point to the 2010 PHP installation.&#160; If a 2010 path variable exists already – remove the 2009 path.&#160; Next open the IIS manager and ensure that both the MGE 2009 and MGE 2010 virtual directory trees are pointing to the MGE 2010 php extension in the Application Extension Mappings.</p>
<p>Once these changes have been made, do a quick IISreset and you should now be able to login to both the Mapguide admins, as well as have Mapguide Studio connect to the appropriate servers.&#160; Again – this setup could have issues – so consider your environment and needs before configuring a server with both releases of Mapguide.</p>
<h2>Remote Web Tiers</h2>
<p>If you need to run a shared Mapguide server with web tiers installed on individual development machines don’t forget to set the ports on each development machine.&#160;&#160; The Mapguide installer will prompt for the Mapguide server IP address – but the webconfig.ini will need to be updated with the appropriate ports manually.&#160; Not doing do will result in your web tier talking to the 2009 server – and much confusion =)</p>
<p>Finally one note on IP addressees and remote web tiers.&#160; If you plan to use a remote web tier – make sure your Mapguide server is setup using the actual IP address of the server and not 127.0.0.1.&#160; If your Mapguide server is configured with 127.0.0.1, you will get a “Cannot establish connection.” error on the remote web tiers when attempting to create and use a session.&#160; Using real IP addresses (either internal or external) will prevent this error from occurring.</p>
<div class="wlWriterEditableSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:4fe137b7-0f5b-42d7-bf1b-6a7879d3713f" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px">Technorati Tags: <a href="http://technorati.com/tags/Mapguide+Enterprise" rel="tag">Mapguide Enterprise</a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.geospecialling.com/index.php/2009/08/configuring-mapguide-enterprise-2009-and-2010-on-the-same-machine/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rackspace support really is fanatical..</title>
		<link>http://www.geospecialling.com/index.php/2009/06/rackspace-support-really-is-fanatical/</link>
		<comments>http://www.geospecialling.com/index.php/2009/06/rackspace-support-really-is-fanatical/#comments</comments>
		<pubDate>Tue, 16 Jun 2009 05:21:00 +0000</pubDate>
		<dc:creator>Darrin Maidlow</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Rackspace]]></category>

		<guid isPermaLink="false">http://www.geospecialling.com/index.php/2009/06/rackspace-support-really-is-fanatical/</guid>
		<description><![CDATA[Friday night I was working on a customers server configuring FloorView.&#160; I’m pretty happy now that I recommended they go with Rackspace.&#160; The server had some issues.&#160; I had installed and configured Mapguide Open Source, SQL Server, Image Web Server, FloorView was up and running and all the data was loaded in.&#160; I was getting [...]]]></description>
			<content:encoded><![CDATA[<p>Friday night I was working on a customers server configuring <a title="FloorView" href="http://www.floorview.com" target="_blank" rel="tag">FloorView</a>.&#160; I’m pretty happy now that I recommended they go with Rackspace.&#160; The server had some issues.&#160; I had installed and configured <a title="Mapguide Open Source" href="http://mapguide.osgeo.org" target="_blank">Mapguide Open Source</a>, SQL Server, Image Web Server, FloorView was up and running and all the data was loaded in.&#160; </p>
<p>I was getting some strange IO errors in SQL Server.&#160;&#160; dbcc checkdb was telling me “OMG this is bad”, Checkdsk on the drive was saying things like “Windows cannot complete the scan”.&#160; I wandered off to get some more coffee thinking this was going to be a fun night.&#160; When I got back I saw a console message sent from a Rackspace support technician asking me if there was anything he could do to help.&#160; I sent him back my phone number and asked him to give me a call.</p>
<p>After a bit of conversation on the server we agreed they would strip out the guts of the server and replace all the drives, controllers, and motherboard.&#160; I went to bed, and the server was back up and ready for me the next morning.&#160; So, 10:30pm Friday night, Rackspace support is proactively finding my problems and tracking me down.&#160;&#160; I now understand what they mean when they call their support <a title="Rackspace really does have fanatical support..." href="http://www.rackspace.com/whyrackspace/support/index.php" target="_blank" rel="tag">“fanatical”</a>… </p>
<p>&lt;3 Rackspace.</p>
<p>And I’m sure you’re sitting there thinking “can’t he find something better to do on a Friday night?”, well you now know the answer to that question…</p>
]]></content:encoded>
			<wfw:commentRss>http://www.geospecialling.com/index.php/2009/06/rackspace-support-really-is-fanatical/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Finally an Oracle x64 client that works on Vista &#8211; AKA Getting Map 2010 x64 running with Oracle&#8230;</title>
		<link>http://www.geospecialling.com/index.php/2009/05/finally-an-oracle-x64-client-that-works-on-vista-aka-getting-map-2010-x64-running-with-oracle/</link>
		<comments>http://www.geospecialling.com/index.php/2009/05/finally-an-oracle-x64-client-that-works-on-vista-aka-getting-map-2010-x64-running-with-oracle/#comments</comments>
		<pubDate>Fri, 22 May 2009 22:01:39 +0000</pubDate>
		<dc:creator>Darrin Maidlow</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Vista]]></category>
		<category><![CDATA[x64]]></category>

		<guid isPermaLink="false">http://www.landoris.com/blogs/darrin/index.php/2009/05/finally-an-oracle-x64-client-that-works-on-vista-aka-getting-map-2010-x64-running-with-oracle/</guid>
		<description><![CDATA[As my legion of dedicated readers know, I’m an 64 Bit zealot.&#160; I would love to see a Windows task manager free of *32.&#160; It keeps me up at night…well not really but, whatever. =) Autodesk recently released AutoCAD Map 2010 – the first native x64 release.&#160; How could I resist installing that?&#160; I had [...]]]></description>
			<content:encoded><![CDATA[<p>As my legion of dedicated readers know, I’m an 64 Bit zealot.&#160; I would love to see a Windows task manager free of *32.&#160; It keeps me up at night…well not really but, whatever. =) Autodesk recently released <a title="AutoCAD Map 2010" href="http://usa.autodesk.com/adsk/servlet/index?id=3081357&amp;siteID=123112" target="_blank" rel="tag">AutoCAD Map 2010</a> – the first native x64 release.&#160; How could I resist installing that?&#160; I had this funny feeling I would regret this decision.&#160; Somehow, somewhere I just knew I would end up in <a title="Vista Oracle Driver Hell" href="http://www.webrade.com/blogs/darrin/2008/10/23/OracleClientODACOnVistaX64MostlyWorkingFinally.aspx" target="_blank" rel="tag">Vista Oracle Driver Hell</a> once again.&#160; So I installed Map 2010, started it up and tried to connect to my Oracle server.&#160; You guessed it.&#160; Connection Failed.</p>
<p>The problem is this.&#160;&#160; x64 Applications cannot use the x86 driver.&#160; In my previous attempts to get basic Oracle/ODP connectivity on my x64 Vista machine I ended up running the 11g x86 Oracle client.&#160; Today I was back to the Oracle download site – and lookie lookie.&#160; They’ve released an <a title="Oracle x64 Vista/Windows 2008 Client" href="http://www.oracle.com/technology/software/products/database/oracle11g/111070_win64_2008soft.html" target="_blank" rel="tag">Oracle Server 2008 x64 client</a>!&#160; 2008 is basically Vista so, maybe, just maybe – I thought Oracle will give us some x64 love.&#160; Here are some steps that will help you get running:</p>
<p>First thing is first.&#160; Backup your TNSnames.ora.&#160; Its found in the network\admin folder.&#160; </p>
<p>Next I un-installed the x86 11.1.0.6 client.&#160;&#160; Delete the leftovers with windows explorer.</p>
<p>Next download both the 11.1.0.7 client for both x86 and x64 (yes, we need to run with both…)</p>
<p>First I installed the x64 client.&#160; I like to do full runtime installations.&#160; </p>
<p>Next, I copy my backed up tnsnames.ora into the network\admin folder.</p>
<p>Now fire up Map 2010 x64 – connect to Oracle server – Success!&#160; Happy Happy Days.&#160; Unfortunately, fire up <a title="Toad for Oracle" href="http://www.quest.com/toad-for-oracle/" target="_blank" rel="tag">Toad for Oracle</a> (which is still 32 bit) and it fails with an error of “Cannot find OCI.DLL”.&#160; Doh.</p>
<p>So, I go ahead and install the Oracle 11.1.0.7&#160; x86 client.&#160; I install it to the client_2 folder.&#160; Then copy my tnsnames backup into the network\admin folder in the client_2 folder.&#160; Restart Toad, and success! </p>
<p>Now I want to check one last thing.&#160; Last time I was dealing with this fun issue – I had to set my development projects to only run in x86 mode.&#160; So, I fire up my <a title="FullCircle - Excel to Database / Database to Excel" href="http://www.landoris.com/Solutions/FullCircle/" target="_blank" rel="tag">FullCircle</a> development project and try it out.&#160; Running IIS in x86 mode works.&#160;&#160; Running IIS in x64 mode failed..</p>
<p>The &#8216;MSDAORA&#8217; provider is not registered on the local machine</p>
<p>It seems the Microsoft MSDAORA provider doesn’t exist in x64 – so change your connection to use the Oracle OraOLEDB.Oracle instead and x64 projects run no problem.&#160; It would be perfect to one day get one install that does both x86 and x64 – but for now, I’m content with this setup.</p>
<div class="wlWriterEditableSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:11f220e3-6c4c-4deb-b192-94e77f7b166c" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px">Technorati Tags: <a href="http://technorati.com/tags/Oracle" rel="tag">Oracle</a>,<a href="http://technorati.com/tags/Vista" rel="tag">Vista</a>,<a href="http://technorati.com/tags/x64" rel="tag">x64</a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.geospecialling.com/index.php/2009/05/finally-an-oracle-x64-client-that-works-on-vista-aka-getting-map-2010-x64-running-with-oracle/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>ReSharper 4.5 Released!</title>
		<link>http://www.geospecialling.com/index.php/2009/04/resharper-45-released/</link>
		<comments>http://www.geospecialling.com/index.php/2009/04/resharper-45-released/#comments</comments>
		<pubDate>Thu, 09 Apr 2009 01:09:00 +0000</pubDate>
		<dc:creator>Darrin Maidlow</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[ReSharper]]></category>

		<guid isPermaLink="false">http://www.landoris.com/blogs/darrin/index.php/2009/04/resharper-45-released/</guid>
		<description><![CDATA[JetBrains has just released ReSharper 4.5!&#160;&#160; Some of the key features of this upgrade are: 1. performance and memory usage improvements 2. Solution-wide code inspections (tons of cool tools to find unused params, privates, etc) 3. VB9 support (too bad I’ve been busy moving to C# =]) 4. Native MSTest Support (I much prefer NUnit [...]]]></description>
			<content:encoded><![CDATA[<p>JetBrains has just released <a title="ReSharper 4.5 Released!" href="http://www.jetbrains.com/resharper/" target="_blank" rel="tag">ReSharper 4.5</a>!&#160;&#160; Some of the key features of this upgrade are:</p>
<ol>
<li>1. performance and memory usage improvements </li>
<li>2. Solution-wide code inspections (tons of cool tools to find unused params, privates, etc) </li>
<li>3. VB9 support (too bad I’ve been busy moving to C# =]) </li>
<li>4. Native MSTest Support (I much prefer <a title="NUnit - .NET Unit Testing" href="http://www.nunit.org/index.php" target="_blank" rel="tag">NUnit</a> though) </li>
</ol>
<p>&#160;</p>
<p>Check it out.&#160; ReSharper is one of the tools I use every day and couldn’t live without…One more day and I’ll be done in Visual Lisp and can actually try out the new release a little more =)</p>
<div class="wlWriterEditableSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:c19e754d-f489-4b40-b8e0-d62f44054fff" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px">Technorati Tags: <a href="http://technorati.com/tags/ReSharper" rel="tag">ReSharper</a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.geospecialling.com/index.php/2009/04/resharper-45-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Relative URLs in CSS with ASP.NET</title>
		<link>http://www.geospecialling.com/index.php/2009/04/using-relative-urls-in-css-with-aspnet/</link>
		<comments>http://www.geospecialling.com/index.php/2009/04/using-relative-urls-in-css-with-aspnet/#comments</comments>
		<pubDate>Tue, 07 Apr 2009 00:42:23 +0000</pubDate>
		<dc:creator>Darrin Maidlow</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://www.landoris.com/blogs/darrin/index.php/2009/04/using-relative-urls-in-css-with-aspnet/</guid>
		<description><![CDATA[When we started redoing the company website I decided that this new site would be all CSS based.&#160; No more nasty tables.&#160;&#160; Once the initial xhtml/css template was made I moved it into and ASP.NET master page.&#160; As the site was fleshed out I ran into a problem where some of the images were not [...]]]></description>
			<content:encoded><![CDATA[<p>When we started redoing the <a title="Landor Information Systems" href="http://www.landorIS.com" target="_blank" rel="tag">company website</a> I decided that this new site would be all CSS based.&#160; No more nasty tables.&#160;&#160; Once the initial xhtml/css template was made I moved it into and ASP.NET master page.&#160; As the site was fleshed out I ran into a problem where some of the images were not loading as the master page was used deeper within the sites structure.&#160;&#160; A little inspection of the underlying CSS and I noticed this:</p>
<div>
<div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   1:</span> #header {<span style="color: #0000ff">width</span>:<span style="color: #006080">100%;</span> <span style="color: #0000ff">height</span>:<span style="color: #006080">50px;</span>    <span style="color: #0000ff">background</span>: #7D7D7D url(images/header<span style="color: #cc6633">.gif</span>) <span style="color: #0000ff">left</span> <span style="color: #0000ff">top</span> no<span style="color: #006080">-repeat;</span>}</pre>
</p></div>
</div>
<p>&#160;</p>
<p>When the master page is used from a page deeper than the site root, the paths in the CSS become invalid.&#160; To work around this I made my CSS dynamic!&#160; I added a new page to my project in the CSS folder.&#160; I called this page allcss.aspx.css.&#160;&#160; Open up this new aspx file and remove all the html.&#160; Leave only the page header definition:</p>
<div>
<div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   1:</span> <span style="background-color: #ffff00">&lt;%@ Page Language=&quot;C#&quot; AutoEventWireup=&quot;true&quot; CodeBehind=&quot;all.css.aspx.cs&quot; Inherits=&quot;landorIS.com.css.allcss&quot; ContentType=&quot;text/css&quot; %&gt;</span></pre>
</p></div>
</div>
<p><a href="http://www.landoris.com/blogs/darrin/wp-content/uploads/2009/04/image10.png"></a></p>
<p><a href="http://www.landoris.com/blogs/darrin/wp-content/uploads/2009/04/image10.png"><img title="image" style="border-right: 0px; border-top: 0px; display: inline; margin-left: 0px; border-left: 0px; margin-right: 0px; border-bottom: 0px" height="149" alt="image" src="http://www.landoris.com/blogs/darrin/wp-content/uploads/2009/04/image10-thumb.png" width="244" align="right" border="0" /></a></p>
<p>Note that you may need to update your classnames and stuff depending on how you name the file.&#160; I wanted my file name to reflect the fact that it was a CSS file – but it’s still needed to end with .aspx to ensure the file would be properly parsed by the ASP.NET engine without having to mess with the extension mapping on the web server.&#160; This resulted in Visual Studio making some illegal class names. </p>
<p>Also be sure that you add the ContentType attribute to the @Page definition, and set it to “text/css”, or you will get an error in some browsers stating that the Mime Type “text/html” is not “text/css”.&#160; Nice of Firefox to do a little validation on the content.</p>
<p>At this point you can add your CSS to the file and use &lt;%%&gt; tags or codebehind to manipulate the values.&#160; Now the CSS that was causing problems with the images looks like this:</p>
<div>
<div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   1:</span> <span style="color: #0000ff">background</span>:url('<span style="color: #006080">&lt;</span>%=ResolveUrl(&quot;~/<span style="color: #0000ff">img</span>/header-bg<span style="color: #cc6633">.png</span>&quot;)%<span style="color: #006080">&gt;</span>') no<span style="color: #006080">-repeat 0 0;</span></pre>
</p></div>
</div>
<p>&#160;</p>
<p>Now when the CSS is requested by the browser and rendered out, the URL to the image file will be properly displayed as /RootFoolder/img/header-bg.png.&#160; This is a very simple modification, but one could go a little more crazy and do something like&#160; detect browser make/model and send out browser specific css in pre-defined literals, or possibly add authentication checks.&#160; </p>
<p>&#160;</p>
<p>&#160;</p>
</p>
</p>
</p>
<div class="wlWriterEditableSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:d4c81f90-214f-4750-a10f-101a629a419d" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px">Technorati Tags: <a href="http://technorati.com/tags/ASP.NET" rel="tag">ASP.NET</a>,<a href="http://technorati.com/tags/CSS" rel="tag">CSS</a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.geospecialling.com/index.php/2009/04/using-relative-urls-in-css-with-aspnet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Automated Build Studio to automate offsite backups</title>
		<link>http://www.geospecialling.com/index.php/2009/03/using-automated-build-studio-to-automate-offsite-backups/</link>
		<comments>http://www.geospecialling.com/index.php/2009/03/using-automated-build-studio-to-automate-offsite-backups/#comments</comments>
		<pubDate>Wed, 11 Mar 2009 04:33:39 +0000</pubDate>
		<dc:creator>Darrin Maidlow</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Automated Build Studio]]></category>

		<guid isPermaLink="false">http://www.landoris.com/blogs/darrin/index.php/2009/03/using-automated-build-studio-to-automate-offsite-backups/</guid>
		<description><![CDATA[The importance of an offsite backup of your data is well known.&#160; There are companies out there that do simply that – offsite data storage.&#160; Take for example Iron Mountain’s LiveVault service.&#160; Depending on the amount of data you have to protect, LiveVault can be&#160; great service. I’ve been using Automated Build Studio (ABS) for [...]]]></description>
			<content:encoded><![CDATA[<p>The importance of an offsite backup of your data is well known.&#160; There are companies out there that do simply that – offsite data storage.&#160; Take for example Iron Mountain’s <a title="Iron Mountain&#39;s LiveVaul" href="http://www.ironmountain.com/digital/server/" target="_blank" rel="tag">LiveVault</a> service.&#160; Depending on the amount of data you have to protect, LiveVault can be&#160; great service.</p>
<p>I’ve been using <a title="Automated Build Studio" href="http://www.automatedqa.com/products/abs/index.asp" target="_blank" rel="tag">Automated Build Studio</a> (ABS) for some time now to ensure consistent, and fast builds of our products.&#160; I’m incredibly pleased with it.&#160;&#160; One of the key benefits to ABS is its versatility.&#160; Yes, the primary goals of this product is to automate the software build process – and a lot of specific tools are provided in the product to accomplish this (e.g. working with source control, easy tools to automate compiling etc).&#160; Build systems are really just a collection of tasks, usually very small tasks – but often there are dozens, hundreds or even thousands of these tasks.&#160; Task as small as running a dos command line statement, copying files, making a zip file.&#160; When I noticed that ABS gives you the ability to automate FTP operations, it got me thinking – this “build” tool could be used to automate so many of those little tasks I’ve always meant to ‘just write a small batch file’ for – but never got around to doing…</p>
<p>One of our most critical pieces of data is our <a title="Sourcegear Vault - The best version control..." href="http://www.sourcegear.com/vault/" target="_blank" rel="tag">Sourcegear Vault</a> database for our source code version control.&#160;&#160; No source code, no software company – don’t think I need to say much more.&#160;&#160; Vault uses SQL server to store its bits.&#160; Well would you look at that.&#160; ABS has a “backup database” component.&#160; The workflow of what I want to accomplish is quite simple:</p>
<ol>
<li>1. Backup and verify SQL server databases </li>
<li>2. Zip up said backup files </li>
<li>3. Upload the zip file to an FTP server that cannot burn down or blow up at the same time as our database server. </li>
</ol>
<p>&#160;</p>
<p>Pretty simple – and ABS will do everything we need – and then some.&#160; So let’s get started.&#160; First, I have to assume you have an SQL server running with databases in it.&#160; I also assume you have an FTP server setup and running.&#160; If you really wanna get fancy – get an FTP server that supports SSL running.&#160; I recommend <a title="FileZilla Server" href="http://filezilla-project.org/download.php?type=server" target="_blank" rel="tag">FileZilla server</a>.</p>
<h3>ABS Installed on same machine as SQL Server<a href="http://www.landoris.com/blogs/darrin/wp-content/uploads/2009/03/absdbbackup.png" target="_blank"><img title="Automated Build Studio SQL Server Backup Operation" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; margin-left: 0px; margin-right: 0px; border-right-width: 0px" height="228" alt="Automated Build Studio SQL Server Backup Operation" src="http://www.landoris.com/blogs/darrin/wp-content/uploads/2009/03/absdbbackup-thumb.png" width="244" align="right" border="0" /></a></h3>
<p>If ABS is installed on the same machine as SQL server we can make use of the built in macro operations to backup SQL server.&#160; Start up ABS and create a new macro.&#160; We’re going to start off simple – and maybe we’ll add some cool later.&#160; First we’ll add a database backup operation.&#160; From the left hand Operations “toolbox” click on SQL to expand the operations available there.&#160; Double click on “Back Up Database”.&#160; This will add a database backup action to our macro.&#160; On the right hand side of the screen in the “macro” section, double click on the new macro operation and fill in the needed information to connect to your SQL server.&#160; Be sure to specify the database, destination path and that the type of output is File.&#160; If you have more than one database you want to backup – add another backup operation and repeat the process.&#160; To backup Vault – we need to backup the sgvault and the sgmaster databases. </p>
<p>If you run your macro at this point you will be prompted with a message that “The executable file of the “SQLMaint” tool is not specified.&#160;&#160; The SQLMaint executable is installed with your SQL server instance and can be found in the Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Binn folder.&#160; Setup your tools to point to this file.&#160; Note, MSSQL.1 will change depending on the <a title="Explanation of SQL Server instances" href="http://www.informit.com/guides/content.aspx?g=sqlserver&amp;seqNum=29" target="_blank" rel="tag">instance of SQL server</a> you are running. </p>
<h3>But, SQL Server is installed on another machine and that’s the way I like it!</h3>
<p>Yup, me too.&#160; The built in SQL Server backup operations depend on the SQLMaint executable to run backup process.&#160; Again, this file is installed with SQL server and I could not get this file to run on machine that did not have SQL Server installed.</p>
<p>Instead what I did was created a batch file/SQL script combo on the machine running SQL server and scheduled a task to execute this batch file. The SQL script looks like this:</p>
<div>
<div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   1:</span> <span style="color: #0000ff">BACKUP</span> <span style="color: #0000ff">DATABASE</span> [sgmaster] <span style="color: #0000ff">TO</span>  <span style="color: #0000ff">DISK</span> = N<span style="color: #006080">'C:\MSSQLData\backups\sgmaster.bak'</span> <span style="color: #0000ff">WITH</span> FORMAT, INIT,  NAME = N<span style="color: #006080">'Full Database Backup'</span>, SKIP, NOREWIND, NOUNLOAD,  STATS = 10</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   2:</span> <span style="color: #0000ff">GO</span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   3:</span> <span style="color: #0000ff">BACKUP</span> <span style="color: #0000ff">DATABASE</span> [sgvault] <span style="color: #0000ff">TO</span>  <span style="color: #0000ff">DISK</span> = N<span style="color: #006080">'C:\MSSQLData\backups\sgvault.bak'</span> <span style="color: #0000ff">WITH</span> FORMAT, INIT,  NAME = N<span style="color: #006080">'Full Database Backup'</span>, SKIP, NOREWIND, NOUNLOAD,  STATS = 10</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   4:</span> GO</pre>
</p></div>
</div>
<p>&#160;</p>
<p>A batch file that executes this script is scheduled to run at a fixed interval and simply consists of this:</p>
<div>
<div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   1:</span> <span style="color: #006080">&quot;C:\Program Files\Microsoft SQL Server\90\Tools\Binn\SQLCMD.EXE&quot;</span> -S localhost -i <span style="color: #006080">&quot;C:\AdminScripts\SQL Server\backup.sql&quot;</span></pre>
</p></div>
</div>
<p>&#160;</p>
<p>This batch file on execution creates two files in c:\MSSQLData\backups.&#160; These files will be processed by the next step in the macro.&#160; Note that because no username or password information is being specified here, the user set to run this task must have the appropriate rights in SQL server.&#160; This batch file is executed by adding a windows scheduler task.</p>
<p>Whichever path you chose for creating your backup file.&#160; Go ahead and run the macro item for an SQL backup, or from the SQL server execute your batch file to get a backup made of the database(s).<a href="http://www.landoris.com/blogs/darrin/wp-content/uploads/2009/03/abszip.png"><img title="Automated Build Studio Create Zip operation" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; margin-left: 0px; margin-right: 0px; border-right-width: 0px" height="244" alt="Automated Build Studio Create Zip operation" src="http://www.landoris.com/blogs/darrin/wp-content/uploads/2009/03/abszip-thumb.png" width="239" align="right" border="0" /></a></p>
<h3>Building the zip file</h3>
<p>The next operation we need can be found in the “Archivers” section on the left.&#160; I’m using Zip for this example.&#160;&#160; Add a “Pack Files With zip” operation to the macro and setup the properties.&#160; Define the archive name locally.&#160; Next we’ll need to set the path to the files to zip.&#160; We’ll use UNC paths to access a share on our SQL server.&#160; Depending on the rights of the user executing the macro, the administrative shares on the SQL server can be used or a new share can be created with the appropriate permissions assigned. </p>
<p>I set the zip to use the “Best” compression for the “Pack Level” and told it to “Move to archive” which results in the files being zipped getting deleted.&#160; I also set a password on the zip – but make sure you write that down somewhere =).</p>
<p>Select the new archive item and click the “Run the selected operation” button.&#160; This should create a new zip file for you in the appropriate location.</p>
<h3>Uploading the zip</h3>
<p>In the toolbox expand FTP and we’re going to add a “Connect to FTP” operation.&#160; Double click this operation in the macro section and setup the properties.&#160; Add your hostname, user name, password.&#160; Set the port if necessary.&#160; If your FTP server is using SSL setup the SSL information.&#160; You can now click the “Run the selected operation” button to test the FTP connection.&#160; If needed add some “Create FTP Directory” and “Set Current FTP Directory” items as needed.&#160; Finally we’ll upload the newly created zip.</p>
<p>Add a new “Upload File(s) to FTP” operation to your macro.&#160;&#160; Browse to and select the newly create zip file.</p>
<p>Click the big Green Go button – and your backup should be created (for a local SQL server), a zip files made, and that zip file should be uploaded to your SSL enabled FTP server.</p>
<h3>Scheduling the macro run<a href="http://www.landoris.com/blogs/darrin/wp-content/uploads/2009/03/absschedule.png"><img title="Automated Build Studio Scheduled Execution" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; margin-left: 0px; margin-right: 0px; border-right-width: 0px" height="192" alt="Automated Build Studio Scheduled Execution" src="http://www.landoris.com/blogs/darrin/wp-content/uploads/2009/03/absschedule-thumb.png" width="244" align="right" border="0" /></a></h3>
<p>ABS comes with a nice little interface to add scheduled executions.&#160; From the “Tasks” menu choose “Windows Scheduler”.&#160; This will bring up the task scheduler window.&#160; Click Add to add a new task.&#160; Up will come a helpful wizard that will help you setup the task.&#160; Set the various options like name, macro file, execution time and frequency and you’re done.&#160;&#160; If your SQL server is on another machine, and you have scheduled that backup to run, you will need to ensure that this task is scheduled to execute after the backup is complete – otherwise your backup could be incomplete.</p>
<h3>Summary</h3>
<p>Building this macro let us cancel our LiveVault account, saving the company a decent amount of cash per month.&#160; While making use of a tool we needed for our <a title="RADE and FullCircle One Click Build" href="http://www.landoris.com/blogs/darrin/index.php/2009/03/one-click-builds-are-a-beautiful-thing-automated-build-studio/" target="_blank" rel="tag">one click build system</a> for <a title="RADE - configurable web based database solutions" href="http://www.landorIS.com/solutions/RADE" target="_blank" rel="tag">RADE</a> and <a title="FullCircle - Excel to Database" href="http://www.landorIS.com/solutions/FullCircle" target="_blank" rel="tag">FullCircle</a>, and our dedicated <a title="Rackspace - Amazing hosting provider" href="http://www.rackspace.com" target="_blank" rel="tag">Rackspace</a> server, we were able to ensure we critical offsite backups being automatically taken care of. </p>
<p>This basic macro should help you get started with ABS to implement your own offsite backup solution – possibly making use of resources you already have in place.&#160; Obviously this macro can be enhance significantly – other resources can be zipped up and backed up.&#160; The ABS scripting and variables can be implemented to append a unique number or a date to the file name which would allow for a range of backups to be stored.&#160; </p>
<p>Enjoy!</p>
<div class="wlWriterEditableSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:8f0c7b7b-acc8-44f9-9f7d-09f8ab0fd6f0" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px">Technorati Tags: <a href="http://technorati.com/tags/Automated+Build+Studio" rel="tag">Automated Build Studio</a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.geospecialling.com/index.php/2009/03/using-automated-build-studio-to-automate-offsite-backups/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>One Click Builds Are A Beautiful Thing &#8211; Automated Build Studio</title>
		<link>http://www.geospecialling.com/index.php/2009/03/one-click-builds-are-a-beautiful-thing-automated-build-studio/</link>
		<comments>http://www.geospecialling.com/index.php/2009/03/one-click-builds-are-a-beautiful-thing-automated-build-studio/#comments</comments>
		<pubDate>Mon, 02 Mar 2009 13:00:00 +0000</pubDate>
		<dc:creator>Darrin Maidlow</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Automated Build Studio]]></category>
		<category><![CDATA[One Click Build]]></category>

		<guid isPermaLink="false">http://www.landoris.com/blogs/darrin/index.php/2009/03/one-click-builds-are-a-beautiful-thing-automated-build-studio/</guid>
		<description><![CDATA[I’ve known for a long time that an automated build system is valuable, hey it’s number two on the Joel test.&#160; Recently the complexity of some of our products made an automated build system a requirement.&#160; It was getting to the point where creating a build of RADE was a four plus hour ordeal.&#160; It [...]]]></description>
			<content:encoded><![CDATA[<p>I’ve known for a long time that an automated build system is valuable, hey it’s number two on <a title="The Joel Test" href="http://www.joelonsoftware.com/articles/fog0000000043.html" target="_blank" rel="tag">the Joel test</a>.&#160; Recently the complexity of some of our products made an automated build system a requirement.&#160; It was getting to the point where creating a build of <a title="RADE - Configurable Web based Solutions" href="http://www.landorIS.com/solutions/RADE" target="_blank" rel="tag">RADE</a> was a four plus hour ordeal.&#160; It had dozens of little steps, and missing even one would result in a defect.&#160;&#160; This defect would be a vicious cycle.&#160; We would have to debug to find the problem and fix it.&#160; This would cause ANOTHER four hour rebuilt, and the “cycle of bug” would continue.</p>
<p>This complexity resulted in infrequent builds and as a result the code was not tested as well as it should have been.&#160; Not to mention, I’d get really frustrated and even pissed off on build days.&#160;&#160; It took me a while to find a system that really made me happy.&#160; On a whim one night I downloaded <a title="Automated Build Studio - One Click Build Goodness!" href="http://www.automatedqa.com/products/abs/index.asp" target="_blank" rel="tag">Automated Build Studio</a> (ABS) and gave it a shot.&#160; After installing ABS on a new virtual machine that would become our dedicated build system I fired it up.&#160; I was pretty impressed with the wide range of actions and&#160; tools it supported.&#160; In our environment we had several must have items:</p>
<ul>
<li>1. SourceGear Vault </li>
<li>2. Visual Studio 2008 </li>
<li>3. Oracle/SQL Server </li>
<li>4. Installshield 2009 </li>
</ul>
<p>&#160;</p>
<p>ABS worked with all of them.&#160; In addition to the key requirements I had &#8211; it supported a <a title="Automated Build Studio operations" href="http://www.automatedqa.com/products/abs/operations.asp" target="_blank">plethora of other operations</a>.</p>
<p>First thing I did was sketch out a rough outline of what was involved in creating a build.&#160; Get latest source code, compile, delete temporary files, etc etc etc.&#160; I started selecting various options from the ABS and fleshing out my macro.&#160; Within a couple of hours, I had a sweet macro in place.&#160; My macro started to look like this:</p>
<ul>
<li>Getting the latest code from Vault </li>
<li>Compile all assemblies </li>
<li>Delete the temporary files </li>
<li>Build the needed release folder structure </li>
<li>Move the new files into the needed structure </li>
<li>Execute <a title="Remotesoft Protector" href="http://www.remotesoft.com/salamander/protector.html" target="_blank" rel="tag">Remotesoft Protector</a> on all assemblies </li>
<li>Increment the build version, and set the version on all assemblies </li>
<li>Create a label of the build in Vault </li>
<li>Build a zip of the release </li>
<li>Build the Installshield installer </li>
<li>Connect to the build FTP and upload the new build </li>
</ul>
<p>&#160;</p>
<p>The best part – all of this was occurring in a 100% reliable fashion, oh and it took minutes for a full build to occur.&#160; Over time, this project was tweaked, and copied.&#160; It evolved as I learned more about ABS – or thought up new requirements.&#160; Take <a title="FullCircle - Excel to Database" href="http://www.landorIS.com/solutions/fullcircle" target="_blank" rel="tag">FullCircle</a> for example, it has evolved into three editions, sharing a similar yet different set of source files.&#160; ABS lets me rebuild all three editions with the click of a button – in minutes.&#160;&#160; Long long ago, in the before times something like this would have taken days, and years off my life.</p>
<p>I’ve only scratched the surface of what I’ve been able to do with ABS – some other cool features worth mentioning is that builds can be scheduled to run, there is a web application for viewing build history as well as kicking off builds.&#160; It has a scripting language, and the support I’ve received is fantastic.&#160; The price of the product makes the decision to buy ABS a non issue.</p>
<p>Man, now I’m starting to sound like a sales guy. =)&#160; Seriously though, check out <a title="Automated Build Studio" href="http://www.automatedqa.com/products/abs/index.asp" target="_blank" rel="tag">Automated Build Studio</a> if you develop boxed, or even custom software.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.geospecialling.com/index.php/2009/03/one-click-builds-are-a-beautiful-thing-automated-build-studio/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Country / State / Province Lookup Tables for SQL server</title>
		<link>http://www.geospecialling.com/index.php/2009/02/country-state-province-lookup-tables-for-sql-server/</link>
		<comments>http://www.geospecialling.com/index.php/2009/02/country-state-province-lookup-tables-for-sql-server/#comments</comments>
		<pubDate>Fri, 20 Feb 2009 23:50:54 +0000</pubDate>
		<dc:creator>Darrin Maidlow</dc:creator>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Lookup]]></category>
		<category><![CDATA[Province]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[State]]></category>

		<guid isPermaLink="false">http://www.landoris.com/blogs/darrin/index.php/2009/02/country-state-province-lookup-tables-for-sql-server/</guid>
		<description><![CDATA[**Update 2011.12.09 – I’ve posted an Oracle specific version of the Country/State/Province lookup SQL.&#160; Every time I build a contact form/database I hit this problem.&#160; I need a set of tables for Country, State/Province lookup.&#160; “But, that’s like 60 records and I don’t wanna type out every state and province!”. Every time, I hit the [...]]]></description>
			<content:encoded><![CDATA[<p>**Update 2011.12.09 – I’ve posted an <a title="Oracle Country / State / Province Lookup" href="http://www.geospecialling.com/index.php/2011/12/country-state-lookup-tables-for-oracle/" rel="tag" target="_blank">Oracle specific version of the Country/State/Province lookup SQL</a>.&#160; </p>
<p>Every time I build a contact form/database I hit this problem.&#160; I need a set of tables for Country, State/Province lookup.&#160; “But, that’s like 60 records and I don’t wanna type out every state and province!”.</p>
<p>Every time, I hit the Google looking for SQL scripts – and I can’t seem to find anything, or I find that one script for mySQL.&#160; The last time I did this, I created a set of SQL scripts and I saved them.&#160; I forgot that I saved them – and made another SQL script.&#160; Doh.&#160; </p>
<p>This time when I was working on the new contact form for this site, I decided to write this blog post in hopes that the next time I need to do this – when I search Google my blog might come up and remind me not to re-invent the wheel.&#160; So I’ve included a zip with the SQL script here.&#160; This script is for SQL server 2005 – but will translate over to Oracle very easily.</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:fb3a1972-4489-4e52-abe7-25a00bb07fdf:414242fc-09d7-4be2-9053-aafa68512645" class="wlWriterEditableSmartContent">
<p> <a href="http://www.geospecialling.com/wp-content/uploads/2011/12/StateProvList.zip" target="_blank">SQL Server 2005 Country / State / Province lookup tables</a></p>
</div>
<p>If you find any problems with the script, or feel like adding more countries, feel free to pass those changes along to me!</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:6c599aad-2efa-4e10-bc42-fbf5178ce26b" class="wlWriterEditableSmartContent">Technorati Tags: <a href="http://technorati.com/tags/SQL+Server" rel="tag">SQL Server</a>,<a href="http://technorati.com/tags/State+Province+Lookup+Table" rel="tag">State Province Lookup Table</a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.geospecialling.com/index.php/2009/02/country-state-province-lookup-tables-for-sql-server/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Geospecialling v2.0 and an introduction to FullCircle</title>
		<link>http://www.geospecialling.com/index.php/2009/02/geospecialling-v20-and-a-an-introduction-to-fullcircle/</link>
		<comments>http://www.geospecialling.com/index.php/2009/02/geospecialling-v20-and-a-an-introduction-to-fullcircle/#comments</comments>
		<pubDate>Wed, 18 Feb 2009 19:11:16 +0000</pubDate>
		<dc:creator>Darrin Maidlow</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Capturx for Excel]]></category>
		<category><![CDATA[FullCircle]]></category>
		<category><![CDATA[RADE]]></category>

		<guid isPermaLink="false">http://www.landoris.com/blogs/darrin/index.php/2009/02/geospecialling-v20-and-a-an-introduction-to-fullcircle/</guid>
		<description><![CDATA[Hello!&#160; Welcome back to Geospecialling, and welcome to the new site!&#160; This new site has been my existence for the past several weeks– but more on that later.&#160; It’s been a crazy couple of months (since Autodesk University 2008), and we are getting closer to the end of the craziness.&#160; Let me sum things up, [...]]]></description>
			<content:encoded><![CDATA[<p>Hello!&#160; Welcome back to Geospecialling, and welcome to the new site!&#160; This new site has been my existence for the past several weeks– but more on that later.&#160; </p>
<p>It’s been a crazy couple of months (since <a title="Autodesk University" href="http://au.autodesk.com/?nd=blaug&amp;und=20" target="_blank" rel="tag">Autodesk University 2008</a>), and we are getting closer to the end of the craziness.&#160; Let me sum things up, and hopefully gain your forgiveness for the lack of posts for two months. =)&#160; At AU we unveiled <a title="FullCircle - Excel to database" href="http://www.landorIS.com/solutions/fullcircle" target="_blank" rel="tag">FullCircle</a>, and the reception has been phenomenal.&#160; FullCircle is our newest product built <a title="Made w/ RADE" href="http://www.landoris.com/solutions/rade" target="_blank" rel="tag">made with RADE</a>.&#160;&#160; So after returning from AU, and getting all that feedback from partners and customers we set to work finishin, testing, and polishing the first release of FullCircle – Standard Edition.</p>
<p>FullCircle has two main functions.&#160; First, it allows users to login and query data from their Oracle, SQL Server, and Access databases.&#160; The tabular information is then sent down as an Excel spreadsheet where users may edit or append data.&#160; This spreadsheet can then uploaded to FullCircle and processed.&#160; The updates/inserts are applied to the appropriate database table.</p>
<p>The second key function of FullCircle is for <a title="Adapx Capturx For Microsoft Office Excel" href="http://www.adapx.com/Capturx-for-Microsoft-Office-Excel/Capturx-for-Microsoft-Office-Excel.html" target="_blank" rel="tag">Adapx Capturx for Excel</a> users.&#160;&#160; FullCircle allows Excel forms to be defined and saved.&#160; Users can then download the form templates from the repository, print the forms with Capturx, and fill them out.&#160; When the digital pen is docked, and the hand writing is processed back into Excel – these Excel files can then be processed with FullCircle.&#160; The inserts (or updates if needed) are processed and put into the appropriate database table(s).&#160; No temporary tables are used that require processing after the fact (unless of course, this is what you want to do), no custom coding.</p>
<p>On top of that we’ve been hard at work building this new site, setting up the new blogs, doing all that good stuff.&#160; I can finally see the light at the end of the tunnel…</p>
<p>More soon!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.geospecialling.com/index.php/2009/02/geospecialling-v20-and-a-an-introduction-to-fullcircle/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Introduction to Topobase API</title>
		<link>http://www.geospecialling.com/index.php/2008/12/introduction-to-topobase-api/</link>
		<comments>http://www.geospecialling.com/index.php/2008/12/introduction-to-topobase-api/#comments</comments>
		<pubDate>Fri, 05 Dec 2008 03:34:00 +0000</pubDate>
		<dc:creator>Darrin Maidlow</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Autodesk University 2008]]></category>
		<category><![CDATA[Topobase]]></category>

		<guid isPermaLink="false">http://www.geospecialling.com/index.php/2008/12/introduction-to-topobase-api/</guid>
		<description><![CDATA[This morning I sat in on the Introduction to Topobase API class at Autodesk University presented by Dongjin Xing.&#160; I&#8217;ve made an effort to attend Dongjin&#8217;s classes every year for the past several years.&#160; He is a good presenter, and has a damn good handle on things.&#160; If you are a developer type, I recommend [...]]]></description>
			<content:encoded><![CDATA[<p>This morning I sat in on the <a href="http://au.autodesk.com/sessions/detail/2703/" target="_blank">Introduction to Topobase API</a> class at Autodesk University presented by <a href="http://au.autodesk.com/profile/114226/" target="_blank">Dongjin Xing</a>.&#160; I&#8217;ve made an effort to attend Dongjin&#8217;s classes every year for the past several years.&#160; He is a good presenter, and has a damn good handle on things.&#160; If you are a developer type, I recommend you consider his courses.&#160; This one was no exception.</p>
<p>I&#8217;ve heard people talking about Topobase for quite some time.&#160; I&#8217;ve heard good, and I&#8217;ve heard bad.&#160; Today I got my first look at the product.&#160; Topobase is a server product that works with Oracle spatial to facilitate the creation, editing and sharing of spatial data in Oracle.&#160; A client is provided with a full API and users can access data using AutoCAD Map or a web client based on Mapguide Enterprise.</p>
<p>The design of Topobase looks to be well tiered.&#160; Using ADO.NET and OraDirect.net it also supports connection pooling.&#160; They provide a neat VB.NET scripting interface that helps build simple workflows, and data validation rules.</p>
<p>All in all, everything they are putting forward looks quite cool.&#160; Visual studio templates to build Topobase plugins that can be loaded right into the Topobase UI.&#160; It could become a very cool starting point for developers/consultants to start building tools to work on data. But there are a few problems&#8230;</p>
<p>Topobase is by no means a new product.&#160; It&#8217;s several revisions in since Autodesk aquired it &#8211; but it still seems to have some performance problem.&#160; During the presentation this morning, Topobase took over a minute to load.&#160; Once loaded, it took over a minute to load and render a small dataset.&#160; Now, Oracle/Topobase and AutoCAD Map were running within a virtual machine, running on a notebook.&#160; Even still &#8211; that&#8217;s slow.</p>
<p>Now, I&#8217;m no Autodesk insider.&#160; I&#8217;m also not a business expert (but I have been learning a thing or two about it over the years).&#160; History does tend to repeat itself.&#160; I look back at GIS Design Server and Vision.&#160; Like Topobase, both of these products were acquired by Autodesk.&#160; Like Topobase, these products were &#8216;Enterprise Data Store&#8217; type things.&#160; Both these products are now &quot;not actively promoted&quot;, and customers are encouraged to migrate to Topobase.&#160; With the <a href="http://finance.google.com/finance?q=autodesk" target="_blank">Autodesk stock price</a> down &#8211; they are going to trim fat.&#160; The Autodesk reseller channel for the most part does not have the skills to use, support, or sell this tool &#8211; and it really is a developer/consultant tool.&#160;&#160; My fear about Topobase is that if I were to invest the time in learning and developing for Topobase, Autodesk will &quot;retire&quot; the product.&#160; Then that invested time is wasted, but more importantly the relationship with my customers is damaged by leaving them stranded up s**t creek with yet another dead &#8216;Enterprise Data Store&#8217; thing.</p>
<p>It&#8217;s a catch 22.&#160; So its not unreasonable to think that Autodesk needs developers like us to adopt, promote, and sell Topobase to help keep it alive.&#160; I&#8217;m interested in hearing your opinions on this subject&#8230;</p>
<div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:a917e919-ab92-477c-8708-806cacb2210d" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px">Technorati Tags: <a href="http://technorati.com/tags/Autodesk%20University" rel="tag">Autodesk University</a>,<a href="http://technorati.com/tags/Oracle%20Spatial" rel="tag">Oracle Spatial</a>,<a href="http://technorati.com/tags/Topobase" rel="tag">Topobase</a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.geospecialling.com/index.php/2008/12/introduction-to-topobase-api/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SQL Server 2008 Spatial</title>
		<link>http://www.geospecialling.com/index.php/2008/12/sql-server-2008-spatial/</link>
		<comments>http://www.geospecialling.com/index.php/2008/12/sql-server-2008-spatial/#comments</comments>
		<pubDate>Wed, 03 Dec 2008 15:49:00 +0000</pubDate>
		<dc:creator>Darrin Maidlow</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Autodesk University 2008]]></category>

		<guid isPermaLink="false">http://www.geospecialling.com/index.php/2008/12/sql-server-2008-spatial/</guid>
		<description><![CDATA[Well day 4 in Las Vegas for Autodesk University.&#160; Took my first weekend off in a long long time =).&#160; Monday was the ADN Developer Day, sadly its all NDA goodness and I really don&#8217;t wanna get a call from the Autodesk lawyers =). This morning I attended the SQL Server 2008 with AutoCAD Map [...]]]></description>
			<content:encoded><![CDATA[<p>Well day 4 in Las Vegas for <a href="http://au.autodesk.com/" target="_blank">Autodesk University</a>.&#160; Took my first weekend off in a long long time =).&#160; Monday was the <a href="http://au.autodesk.com/event/adn/" target="_blank">ADN Developer Day</a>, sadly its all NDA goodness and I really don&#8217;t wanna get a call from the Autodesk lawyers =).</p>
<p>This morning I attended the <a href="http://au.autodesk.com/sessions/detail/2888/" target="_blank">SQL Server 2008 with AutoCAD Map 3D and Autodesk MapGuide</a> (GS100-3) presented by <a href="http://au.autodesk.com/profile/102864/" target="_blank">Orest Halustchak</a> (Technical Architect at Autodesk) and <a href="http://blogs.msdn.com/isaac/" target="_blank">Isaac Kunen</a> (Senior Program Manager at Microsoft).&#160;&#160; First it was really nice to bring in the brains from Microsoft for a presentation on SQL server.</p>
<p>This class was especially interesting to me, as I have not yet made time to look at SQL server 2008 in great depths.&#160; It looks like Microsoft done a pretty good job at their first spatial offering.&#160; I&#8217;m always hesitant to jump in heads first to a first release.&#160; Hey I waited until Mapguide Enterprise 2009 before I even really considered writing any code for it.&#160; If you are new to spatial databases, or you have a more basic need (no need for more advanced <a href="http://en.wikipedia.org/wiki/Linear_Reference_System" target="_blank">Linear Referencing System</a> or network tracing functionality) SQL server might be right for you.&#160; If you already have SQL server experience, the learning curve going to SQL 2008 spatial is going to be a lot less nasty than starting with Oracle Spatial.</p>
<p>The spatial functionality is available all versions of SQL server, except for the compact edition.&#160; Yes, even the free Express version contains the spatial engine.&#160; This is good news.&#160; Often times when Oracle comes up (even the express edition), people get scared.&#160; Oracle has a scary, difficult stigma associated with.&#160; Spatial abilities with SQL server Express could be very helpful in getting a spatial engine into smaller shops.</p>
<p>Microsoft is pretty good with the small details.&#160; One of the cool features of SQL 2008 is the ability to view the spatial data right in SQL Management Studio.&#160; Note this doesn&#8217;t seem to be available in the Express edition of Management Studio.&#160; </p>
<p>AutoCAD Map and Mapguide seem to work pretty well with SQL 2008.&#160; I plan to load some larger data sets into SQL 2008 in the coming weeks to see how it performs in comparison to Oracle spatial.</p>
<p>Here is a tip for planning for AU.&#160; Consider budgeting to eat outside of the Autodesk provided buffets.&#160; =)</p>
<div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:2436ad29-4941-4871-97a7-0074cc4d425b" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px">Technorati Tags: <a href="http://technorati.com/tags/Autodesk%20University" rel="tag">Autodesk University</a>,<a href="http://technorati.com/tags/Mapguide%20Enterprise" rel="tag">Mapguide Enterprise</a>,<a href="http://technorati.com/tags/SQL%20Server%20Spatial" rel="tag">SQL Server Spatial</a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.geospecialling.com/index.php/2008/12/sql-server-2008-spatial/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Time for Autodesk University 2008</title>
		<link>http://www.geospecialling.com/index.php/2008/11/time-for-autodesk-university-2008/</link>
		<comments>http://www.geospecialling.com/index.php/2008/11/time-for-autodesk-university-2008/#comments</comments>
		<pubDate>Sat, 29 Nov 2008 14:45:00 +0000</pubDate>
		<dc:creator>Darrin Maidlow</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Autodesk University 2008]]></category>

		<guid isPermaLink="false">http://www.geospecialling.com/index.php/2008/11/time-for-autodesk-university-2008/</guid>
		<description><![CDATA[I’m on the plane heading to Las Vegas. The time has come for another Autodesk University. Yay for my annual “vacation”. This trip is going to be packed full of meetings, classes, and World of Warcraft =). To all my devoted readers, I must apologize for the one month delay in posts. I’ll be working [...]]]></description>
			<content:encoded><![CDATA[<p>I’m on the plane heading to Las Vegas. The time has come for another <a href="http://au.autodesk.com/" target="_blank">Autodesk University</a>. Yay for my annual “vacation”. This trip is going to be packed full of meetings, classes, and World of Warcraft =). To all my devoted readers, I must apologize for the one month delay in posts. I’ll be working on getting everyone up to speed on what has been going on in the past month here. I hope to post once per day on cool and awesome things at AU. Hopefully there is something cool and awesome at least once per day.</p>
<p>I also have to add that bringing small children on airplanes is cruel, the US Airways coffee sucks, but the orange juice is great =)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.geospecialling.com/index.php/2008/11/time-for-autodesk-university-2008/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>.NET 3.5 &#8220;Attempted to read or write protected memory&#8221; Caused by Remotesoft Protector</title>
		<link>http://www.geospecialling.com/index.php/2008/11/net-3-5-attempted-to-read-or-write-protected-memory-caused-by-remotesoft-protector/</link>
		<comments>http://www.geospecialling.com/index.php/2008/11/net-3-5-attempted-to-read-or-write-protected-memory-caused-by-remotesoft-protector/#comments</comments>
		<pubDate>Tue, 25 Nov 2008 05:25:00 +0000</pubDate>
		<dc:creator>Darrin Maidlow</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[Remotesoft Protector]]></category>

		<guid isPermaLink="false">http://www.geospecialling.com/index.php/2008/11/net-3-5-attempted-to-read-or-write-protected-memory-caused-by-remotesoft-protector/</guid>
		<description><![CDATA[Months ago, I started getting the “Attempted to read or write protected memory” error.&#160; In hindsight (as always) its all clear.&#160; In short, it seems .NET 3.5 SP1 and Remotesoft Protector v2.x do not play nicely resulting in this error.&#160; Either stop using Protector, or upgrade to the latest version. In long – for a [...]]]></description>
			<content:encoded><![CDATA[<p>Months ago, I started getting the “Attempted to read or write protected memory” error.&#160; In hindsight (as always) its all clear.&#160; In short, it seems .NET 3.5 SP1 and <a title="Remotesoft Protector" href="http://www.remotesoft.com/salamander/protector.html" target="_blank" rel="tag">Remotesoft Protector</a> v2.x do not play nicely resulting in this error.&#160; Either stop using Protector, or upgrade to the latest version.</p>
<p>In long – for a number of reasons there was not a strait line between upgrading my machine to SP1 and noticing the problem.&#160; This made diagnosing the problem significantly more complicated because I had no idea when it actually started.&#160; At the time, I was dealing with <a title="Vista x64 and Oracle Client" href="http://www.webrade.com/blogs/darrin/2008/10/23/OracleClientODACOnVistaX64MostlyWorkingFinally.aspx" target="_blank" rel="tag">x64 and Oracle clients</a>.&#160; This had prompted me to start doing all my dev in an XP virtual machine.&#160; Eventually, the slowless of developing in a VM drove me insane and I just had to get my machine working again.&#160; So I got Oracle dealt with – but that left this annoying error.</p>
<p>It was a complete fluke that I noticed this.&#160; The stars aligned, and I manually compiled some assemblies, instead of pushing the big green button on my build system.&#160; This resulted in my assemblies not being run through the Remotesoft Protector.&#160; All of a sudden the problem went away.&#160; At the time I had been using Protector 2.x which would not support .NET 3.5 SP1 fully. So, either stop using Protector, or upgrade to the latest version which resolves this problem =)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.geospecialling.com/index.php/2008/11/net-3-5-attempted-to-read-or-write-protected-memory-caused-by-remotesoft-protector/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Oracle Client/ODAC on Vista x64 Mostly Working&#8230; Finally</title>
		<link>http://www.geospecialling.com/index.php/2008/10/oracle-clientodac-on-vista-x64-mostly-working-finally/</link>
		<comments>http://www.geospecialling.com/index.php/2008/10/oracle-clientodac-on-vista-x64-mostly-working-finally/#comments</comments>
		<pubDate>Fri, 24 Oct 2008 05:25:00 +0000</pubDate>
		<dc:creator>Darrin Maidlow</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[ODP.NET]]></category>

		<guid isPermaLink="false">http://www.geospecialling.com/index.php/2008/10/oracle-clientodac-on-vista-x64-mostly-working-finally/</guid>
		<description><![CDATA[So, finally I got fed up with working from a 32 bit XP virtual machine and spent a little more time on this issue.&#160; I’ve managed to get my Vista Ultimate a la x64 mostly working.&#160; Where I went wrong the last time (aside from trying to figure this out in the middle of the [...]]]></description>
			<content:encoded><![CDATA[<p>So, finally I got fed up with working from a 32 bit XP virtual machine and spent a little more time on this issue.&#160; I’ve managed to get my Vista Ultimate a la x64 mostly working.&#160; Where I went wrong <a title="Vista Ultimate x64 and Oracle Client Fun" href="http://www.geospecialling.com/index.php/2008/07/odacodp-net-on-vista-x64/" target="_blank" rel="tag">the last time</a> (aside from trying to figure this out in the middle of the night in a shitty mood because I had spent so much time head banging with a wall) was using the 64 bit client.&#160; </p>
<p>The correct path to Oracle happiness in my case was the 11g client.&#160; It works great with my 10.2 server.&#160; The important bit in was to use the 32 bit install rather than the 64 bit install.&#160; One of my primary tools for accessing Oracle is <a title="Toad for Oracle" href="http://www.quest.com/toad-for-oracle/" target="_blank" rel="tag">Toad for Oracle</a> 9.x.&#160; Quest Software states that Toad for Oracle 9.6 is the first version to really support the 11g client.&#160; However, it does NOT support the x64 client.</p>
<p>So the last time I tried to solve this, after a long day, and a fun night of head banging with a wall – when I tried the 11g client, I used x64 cbuild – and saw that Toad wouldn’t work, I threw a little hissyfit and went to bed.&#160; Long story short, installing both the 32bit <a title="Oracle 11g client" href="http://www.oracle.com/technology/software/products/database/oracle11g/111060_win32soft.html" target="_blank" rel="tag">11g client</a> and <a title="Oracle 11g ODAC/ODP" href="http://www.oracle.com/technology/software/tech/windows/odpnet/index.html" target="_blank" rel="tag">11g ODAC/ODP</a> seems to have done the trick.&#160; Now – there is one important little piece o’ information that you will need to know.&#160; Though I have not confirmed this, I suspect that x64 applications will not be able to use the driver.&#160; </p>
<p>That said, from a development point of view you will need to set IIS to run at 32 bit.&#160; On IIS 5.x/6.x this is a server wide setting from a dos window:</p>
<div>
<div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas,&#39;Courier New&#39;,courier,monospace; border-right-style: none; border-left-style: none; background-color: rgb(244,244,244); border-bottom-style: none">
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas,&#39;Courier New&#39;,courier,monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: rgb(96,96,96)">   1:</span> cscript %SYSTEMDRIVE%\inetpub\adminscripts\adsutil.vbs SET W3SVC/AppPools/Enable32bitAppOnWin64 1</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas,&#39;Courier New&#39;,courier,monospace; border-right-style: none; border-left-style: none; background-color: rgb(244,244,244); border-bottom-style: none"><span style="color: rgb(96,96,96)">   2:</span> %SYSTEMROOT%\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -i</pre>
</p></div>
</div>
<p>&#160;</p>
<p>If you’re running Vista or Server 2008 with IIS7, you have things a little better.&#160; You can configure each application pool to run as 32 or 64 bit.&#160; For winform development, change the compile properties of the project to set the target platform to be x86.</p>
<p>I’m really glad that’s over…but I still want a proper x64 ODAC.&#160; Come on Oracle .. =)</p>
<p><font color="#ff0000">Update February 2009</font> – I have made a happy ending post on <a title="Geospecialling" href="http://www.geospecialling.com" target="_blank" rel="tag">my new blog</a>.&#160; Got Oracle client working in both <a title="Oracle client working in both 32 and 64 bit" href="http://www.geospecialling.com/blogs/darrin/index.php/2009/05/finally-an-oracle-x64-client-that-works-on-vista-aka-getting-map-2010-x64-running-with-oracle/" target="_blank" rel="tag">32 and 64 bit mode</a>.&#160; Check it out. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.geospecialling.com/index.php/2008/10/oracle-clientodac-on-vista-x64-mostly-working-finally/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mapguide Enterprise 2009 Update 1 (For Windows)</title>
		<link>http://www.geospecialling.com/index.php/2008/10/mapguide-enterprise-2009-update-1-for-windows/</link>
		<comments>http://www.geospecialling.com/index.php/2008/10/mapguide-enterprise-2009-update-1-for-windows/#comments</comments>
		<pubDate>Wed, 22 Oct 2008 18:09:00 +0000</pubDate>
		<dc:creator>Darrin Maidlow</dc:creator>
				<category><![CDATA[Mapguide]]></category>
		<category><![CDATA[Service Pack]]></category>

		<guid isPermaLink="false">http://www.geospecialling.com/index.php/2008/10/mapguide-enterprise-2009-update-1-for-windows/</guid>
		<description><![CDATA[Yay.&#160; Autodesk today released an update for both the Mapguide Enterprise Web Tier, Server and Studio.&#160; This release should catch Enterprise up a little more closely to the Open Source edition.&#160; A PDF with containing some of the changes can be found here.&#160; Check out the updates.&#160; Some of these updates are pretty critical (ie. [...]]]></description>
			<content:encoded><![CDATA[<p>Yay.&#160; Autodesk today released an update for both the <a title="Autodesk Mapguide Enterprise" href="http://www.mapguide.com" target="_blank">Mapguide Enterprise</a> Web Tier, Server and Studio.&#160; This release should catch Enterprise up a little more closely to the Open Source edition.&#160; A PDF with containing some of the changes can be found <a title="Mapguide Enterprise 2009 Update 1 Release Notes" href="http://images.autodesk.com/adsk/files/autodeskmapguideupdatereadme_enu.pdf" target="_blank" rel="tag">here</a>.&#160; <a title="Mapguide Enterprise 2009 Update 1" href="http://usa.autodesk.com/adsk/servlet/ps/dl/item?siteID=123112&amp;id=12004070&amp;linkID=9242179" target="_blank" rel="tag">Check out the updates.</a>&#160; Some of these updates are pretty critical (ie. the FireFox 3 takes out your Mapguide server).&#160; Looks like many performances updates have made it in also.</p>
<p>Thanks Autodesk! =)</p>
<div class="wlWriterEditableSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:1ea7ceb5-a8fa-41c3-9964-0fb928ec85e2" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px">Technorati Tags: <a href="http://technorati.com/tags/Mapguide+Enterprise" rel="tag">Mapguide Enterprise</a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.geospecialling.com/index.php/2008/10/mapguide-enterprise-2009-update-1-for-windows/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Announcing the RADE Spatial Indexer</title>
		<link>http://www.geospecialling.com/index.php/2008/10/announcing-the-rade-spatial-indexer/</link>
		<comments>http://www.geospecialling.com/index.php/2008/10/announcing-the-rade-spatial-indexer/#comments</comments>
		<pubDate>Sat, 11 Oct 2008 21:06:00 +0000</pubDate>
		<dc:creator>Darrin Maidlow</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Spatial Indexes]]></category>

		<guid isPermaLink="false">http://www.geospecialling.com/index.php/2008/10/announcing-the-rade-spatial-indexer/</guid>
		<description><![CDATA[ORA-13226: Interface not supported without a spatial index. I hate this error.&#160; Someone would give me a new Oracle dump file.&#160; I’d try to view the spatial data and boom &#8211; ORA-13226.&#160; If I was lucky, there was only a couple of tables in it.&#160; Chances are, there were hundreds of tables in it.&#160; Sometimes [...]]]></description>
			<content:encoded><![CDATA[<p><b>ORA-13226:</b> Interface not supported without a spatial index.</p>
<p>I hate this error.&#160; Someone would give me a new Oracle dump file.&#160; I’d try to view the spatial data and boom &#8211; ORA-13226.&#160; If I was lucky, there was only a couple of tables in it.&#160; Chances are, there were hundreds of tables in it.&#160; Sometimes I’d need to add the reference to the USER_SDO_GEOM_METADATA view, sometimes I wouldn’t.&#160;&#160; Sometimes the index would already exist and just need to be rebuilt.</p>
<p>Regardless of the scenario, it would often involve a lot of SQL – or messing around to try and remember the SQL.&#160; Every time this would pop up I would think to myself, “I really should write an app…”.&#160; Well I finally did.</p>
<p>So, here is my announcement.&#160; The RADE Spatial Indexer is just about ready for beta.&#160; Initially this app does three things.</p>
<ul>
<li>It will list tables and views with geometry columns that are not part of the USER_SDO_GEOM_META data view and help you add them. </li>
<li>It will list spatial tables without indexes and help you create them. </li>
<li>It will list spatial tables with indexes and help you re-index them. </li>
</ul>
<p>No more exporting queries to text files and using a macro to edit them to build your SQL for rebuilding those indexes.&#160; I’ve tried to add some nice friendly helpers, such as a button that will suggest the spatial metadata settings for a table based on the existing meta data records.&#160; The ability to mass create or rebuild indexes is also been a fantastic helper.</p>
<p>I’m recruiting brave individuals for a small closed beta program that will begin in about two weeks.&#160; If you are interested in being a tester please e-mail indexer (at) landorIS.com and let me know.&#160; Remember, this is a beta – so I really do not suggest you run this on a production, or important server.&#160; That said, I have been using it in various states on my own ‘production’ development Oracle server.</p>
<p>As an incentive for helping me out.&#160; If you submit feedback (be it a bug report or feature request) – I will set you up with a free license once we release 1.0.&#160; I know you’re hooked and want to sign up.&#160; I know it.&#160; Just in case you need a little more, here is a few screen caps..</p>
<p>Look at how easy it could be to define metadata.&#160; Click the suggest button and it will iterate through the metadata settings for other spatial tables in the schema.&#160; Once you have one row defined, use the sync button to set all rows to the same values.&#160; Click process and its done.</p>
<p><a href="http://www.geospecialling.com/wp-content/uploads/2010/02/image11.png"><img title="image" style="border-top-width: 0px; display: block; border-left-width: 0px; float: none; border-bottom-width: 0px; margin-left: auto; margin-right: auto; border-right-width: 0px" height="484" alt="image" src="http://www.geospecialling.com/wp-content/uploads/2010/02/image_thumb11.png" width="638" border="0" /></a> </p>
<p>Within seconds, have hundreds of spatial indexes being re-created…Creating new indexes is almost as easy.</p>
<p><a href="http://www.geospecialling.com/wp-content/uploads/2010/02/image12.png"><img title="image" style="border-top-width: 0px; display: block; border-left-width: 0px; float: none; border-bottom-width: 0px; margin-left: auto; margin-right: auto; border-right-width: 0px" height="483" alt="image" src="http://www.geospecialling.com/wp-content/uploads/2010/02/image_thumb12.png" width="644" border="0" /></a> </p>
</p>
</p>
<div class="wlWriterEditableSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:37ee5dc1-a464-469d-9b29-8924167e64c3" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px">Technorati Tags: <a href="http://technorati.com/tags/RADE" rel="tag">RADE</a>,<a href="http://technorati.com/tags/Oracle+Spatial" rel="tag">Oracle Spatial</a>,<a href="http://technorati.com/tags/Spatial+Indexer" rel="tag">Spatial Indexer</a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.geospecialling.com/index.php/2008/10/announcing-the-rade-spatial-indexer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Developing with Mapguide Enterprise / Open Source in a shared server environment</title>
		<link>http://www.geospecialling.com/index.php/2008/09/developing-with-mapguide-enterprise-open-source-in-a-shared-server-environment/</link>
		<comments>http://www.geospecialling.com/index.php/2008/09/developing-with-mapguide-enterprise-open-source-in-a-shared-server-environment/#comments</comments>
		<pubDate>Sat, 27 Sep 2008 01:41:00 +0000</pubDate>
		<dc:creator>Darrin Maidlow</dc:creator>
				<category><![CDATA[Mapguide]]></category>

		<guid isPermaLink="false">http://www.geospecialling.com/index.php/2008/09/developing-with-mapguide-enterprise-open-source-in-a-shared-server-environment/</guid>
		<description><![CDATA[I have enough junk running on my development machine.&#160; In an effort to try and keep my workstation speedy &#8211; I don&#8217;t install any unnecessary services (Oracle server, Mapguide Server etc) on this machine.&#160; In a larger development environment, running multiple servers on local development machines has a few other less than desirable results.&#160; For [...]]]></description>
			<content:encoded><![CDATA[<p>I have enough junk running on my development machine.&#160; In an effort to try and keep my workstation speedy &#8211; I don&#8217;t install any unnecessary services (Oracle server, Mapguide Server etc) on this machine.&#160; In a larger development environment, running multiple servers on local development machines has a few other less than desirable results.&#160; For example licensing issues and costs could increase, data management can become more complex, and just managing the extra services on N machines could cause a lot more work for your already overworked IT guy.</p>
<p>So instead I have centralized my server resources into a nice VM setup running on my beefy Dell server.&#160; Now, regardless of which machine I use to develop I can still access the same data sets.&#160; This is especially nice when traveling.&#160; Specifically Mapguide Server and web tier are installed on my development web server.&#160; When coding, I will either use my local IIS or the built in Visual Studio web server.&#160; This poses one problem when working with Mapguide.&#160; Referencing the web tier on the shared server from another web server will result in <a title="Cross Site Scripting Explained" href="http://en.wikipedia.org/wiki/Cross-site_scripting" target="_blank" rel="tag">cross site scripting</a> (XSS) errors.&#160; Basically, javascript on one web server cannot access javascript code on another web server, which under most circumstances is a good thing.&#160; When trying to develop using the Mapguide Web API on a central Mapguide server this poses a problem as the web tier API is wholly contained within the virtual directory on another server.&#160; Gotta love when &#8216;security&#8217; jumps up bites us in the behind.</p>
<p>The simple solution to this problem is to install the Mapguide web tier on every development machine.&#160; This will require that each development machine have a web server installed, but chances are that is already the case.&#160; When installing the web tier be sure to have the IP address of the Mapguide server handy as it will needed during the install.&#160; Once the web tier is running locally, reference the local web tier in your URLs and the cross site scripting vulnerabilities go away!&#160; If you&#8217;re running the 64 Bit version of Vista on your development machine, check out my post installing the <a title="Installing Mapguide Web Tier on Vista x64" href="http://www.geospecialling.com/index.php/2008/05/manually-configure-mapguide-2009-web-tier-on-vista-x64-iis7/" target="_blank" rel="tag">web tier on Vista x64</a></p>
<div class="wlWriterEditableSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:282fb14b-6c50-4bbe-8aeb-63d97f1c707d" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px">Technorati Tags: <a href="http://technorati.com/tags/Mapguide" rel="tag">Mapguide</a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.geospecialling.com/index.php/2008/09/developing-with-mapguide-enterprise-open-source-in-a-shared-server-environment/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mapguide 6.5 Server &#8211; Missing the Autodesk Spatial Data Provider for Oracle Spatial</title>
		<link>http://www.geospecialling.com/index.php/2008/09/mapguide-6-5-server-missing-the-autodesk-spatial-data-provider-for-oracle-spatial/</link>
		<comments>http://www.geospecialling.com/index.php/2008/09/mapguide-6-5-server-missing-the-autodesk-spatial-data-provider-for-oracle-spatial/#comments</comments>
		<pubDate>Thu, 25 Sep 2008 13:41:00 +0000</pubDate>
		<dc:creator>Darrin Maidlow</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[6.5]]></category>

		<guid isPermaLink="false">http://www.geospecialling.com/index.php/2008/09/mapguide-6-5-server-missing-the-autodesk-spatial-data-provider-for-oracle-spatial/</guid>
		<description><![CDATA[Over the years, this problem has sporadically appeared (probably once or twice a year).&#160; In the Mapguide 6.5 server admin when creating a new data source the Autodesk Spatial Data Provider for Oracle Spatial doesn&#8217;t appear as an option.&#160; Every time this comes up I end up wracking my brain to remember what the solution [...]]]></description>
			<content:encoded><![CDATA[<p>Over the years, this problem has sporadically appeared (probably once or twice a year).&#160; In the Mapguide 6.5 server admin when creating a new data source the Autodesk Spatial Data Provider for Oracle Spatial doesn&#8217;t appear as an option.&#160; Every time this comes up I end up wracking my brain to remember what the solution is.&#160; I know I&#8217;ve dealt with this many times &#8211; but I cannot remember the details.&#160; Usually it&#8217;s occurring on a customer&#8217;s production server which is not a place I like to mess around.&#160; This time, it was my development server &#8211; let the messing around begin!</p>
<p>In a nutshell this is a result of installing Mapguide server before the Oracle client is installed on the server.&#160; The solution is to do a repair install of Mapguide Server (or a re-install if you prefer) once the Oracle client is installed.&#160; Hopefully next year when this comes up again &#8211; writing this down will help me remember.&#160; Worst case Google might pick this up and I&#8217;ll find my own post when I search for it&#8230;</p>
<div class="wlWriterEditableSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:333f7d65-393c-4d15-a62f-8dcc21c0d51d" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px">Technorati Tags: <a href="http://technorati.com/tags/Mapguide" rel="tag">Mapguide</a>,<a href="http://technorati.com/tags/Oracle+Spatial" rel="tag">Oracle Spatial</a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.geospecialling.com/index.php/2008/09/mapguide-6-5-server-missing-the-autodesk-spatial-data-provider-for-oracle-spatial/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>System.Runtime.InteropServices.ComException Loading ASP.NET Web Application in Visual Studio 2008</title>
		<link>http://www.geospecialling.com/index.php/2008/09/system-runtime-interopservices-comexception-loading-asp-net-web-application-in-visual-studio-2008/</link>
		<comments>http://www.geospecialling.com/index.php/2008/09/system-runtime-interopservices-comexception-loading-asp-net-web-application-in-visual-studio-2008/#comments</comments>
		<pubDate>Thu, 04 Sep 2008 05:04:00 +0000</pubDate>
		<dc:creator>Darrin Maidlow</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://www.geospecialling.com/index.php/2008/09/system-runtime-interopservices-comexception-loading-asp-net-web-application-in-visual-studio-2008/</guid>
		<description><![CDATA[Another day, another fun error message.&#160; Thanks to all the fun I&#8217;ve been having with Oracle X64 on Vista &#8211; I&#8217;ve given up and created a new virtual machine with XP Pro to run Visual Studio in.&#160;&#160; So I grab the latest revision from source control and load the solution in Visual Studio.&#160; Boom.&#160; Sytem.Runtime.InteropServices.ComException.&#160; [...]]]></description>
			<content:encoded><![CDATA[<p>Another day, another fun error message.&#160; Thanks to all the fun I&#8217;ve been having with <a title="Fun with Oracle on Vista x64" href="http://www.geospecialling.com/index.php/2008/07/odacodp-net-on-vista-x64/" target="_blank" rel="tag">Oracle X64 on Vista</a> &#8211; I&#8217;ve given up and created a new virtual machine with XP Pro to run Visual Studio in.&#160;&#160; So I grab the latest revision from source control and load the solution in Visual Studio.&#160; Boom.&#160; Sytem.Runtime.InteropServices.ComException.&#160; That&#8217;s it. No more details.&#160; This is one of those errors where it could be just about anything.&#160; A <a title="search on System.Runtime.InteropServices.ComException" href="http://www.google.ca/search?hl=en&amp;q=system.runtime.interopservices.comexception+visual+studio+2008&amp;btnG=Search&amp;meta=" target="_blank" rel="tag">quick search on the topic</a> gives way too many results.</p>
<p>So I&#8217;m going to add one more search result on this error message.&#160; After much muckery &#8211; I&#8217;ve resolved my instance of the problem.&#160; The background is simple.&#160; I have an ASP.NET web application with a few DLL projects and a deployment project.&#160; As stated, I&#8217;ve created a new install of Windows XP.&#160; First ensure that you have the <a title="Visual Studio 2008 Web Deployment Project Addon" href="http://www.microsoft.com/downloads/details.aspx?familyid=0AA30AE8-C73B-4BDD-BB1B-FE697256C459&amp;displaylang=en" target="_blank" rel="tag">2008 Web Deployment Project</a> add-on installed.&#160; That can also cause this error (in some cases).</p>
<p>The key thing in this case was the lack of IIS on the machine.&#160; On my primary development machine (the one where Oracle is a massive pain) I do have IIS installed, and the last time I ran this project from that machine &#8211; Oracle was working OK with the data access hack.&#160; But apparently something has changed on that box and now I&#8217;m getting the evil &quot;<i>Oracle client and networking components were not found.</i>&quot; error.&#160; So I gave up.</p>
<p>First obvious work around is to install IIS.&#160; I&#8217;m sick of messing around today, and just want to work.&#160; So the quicker solution is to enable the built in development web server.&#160; This can be accomplished by right clicking the unloaded project in the Visual Studio solution explorer and choosing &quot;Edit &lt;projectname.whateverlanguateyouuseproj&gt;&quot;.&#160; This will bring up the XML view of the project.&#160; Find the ProjectExtensions section of the config and change UseIIS to be False.&#160; Setting this up could also prevent problems when you have a larger, or more dynamic team accessing the project.</p>
<div>
<div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   1:</span> <span style="color: #0000ff">&lt;</span><span style="color: #800000">ProjectExtensions</span><span style="color: #0000ff">&gt;</span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   2:</span>     <span style="color: #0000ff">&lt;</span><span style="color: #800000">VisualStudio</span><span style="color: #0000ff">&gt;</span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   3:</span>       <span style="color: #0000ff">&lt;</span><span style="color: #800000">FlavorProperties</span> <span style="color: #ff0000">GUID</span><span style="color: #0000ff">=&quot;{349c5851-65df-11da-9384-00065b846f21}&quot;</span><span style="color: #0000ff">&gt;</span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   4:</span>         <span style="color: #0000ff">&lt;</span><span style="color: #800000">WebProjectProperties</span><span style="color: #0000ff">&gt;</span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   5:</span>           <span style="color: #0000ff">&lt;</span><span style="color: #800000">UseIIS</span><span style="color: #0000ff">&gt;</span>False<span style="color: #0000ff">&lt;/</span><span style="color: #800000">UseIIS</span><span style="color: #0000ff">&gt;</span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   6:</span>           <span style="color: #0000ff">&lt;</span><span style="color: #800000">AutoAssignPort</span><span style="color: #0000ff">&gt;</span>False<span style="color: #0000ff">&lt;/</span><span style="color: #800000">AutoAssignPort</span><span style="color: #0000ff">&gt;</span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   7:</span>           <span style="color: #0000ff">&lt;</span><span style="color: #800000">DevelopmentServerPort</span><span style="color: #0000ff">&gt;</span>4088<span style="color: #0000ff">&lt;/</span><span style="color: #800000">DevelopmentServerPort</span><span style="color: #0000ff">&gt;</span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   8:</span>           <span style="color: #0000ff">&lt;</span><span style="color: #800000">DevelopmentServerVPath</span><span style="color: #0000ff">&gt;</span>/webrade<span style="color: #0000ff">&lt;/</span><span style="color: #800000">DevelopmentServerVPath</span><span style="color: #0000ff">&gt;</span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   9:</span>           <span style="color: #0000ff">&lt;</span><span style="color: #800000">IISUrl</span><span style="color: #0000ff">&gt;</span>http://localhost/WebRADE32<span style="color: #0000ff">&lt;/</span><span style="color: #800000">IISUrl</span><span style="color: #0000ff">&gt;</span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  10:</span>           <span style="color: #0000ff">&lt;</span><span style="color: #800000">NTLMAuthentication</span><span style="color: #0000ff">&gt;</span>False<span style="color: #0000ff">&lt;/</span><span style="color: #800000">NTLMAuthentication</span><span style="color: #0000ff">&gt;</span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  11:</span>           <span style="color: #0000ff">&lt;</span><span style="color: #800000">UseCustomServer</span><span style="color: #0000ff">&gt;</span>False<span style="color: #0000ff">&lt;/</span><span style="color: #800000">UseCustomServer</span><span style="color: #0000ff">&gt;</span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  12:</span>           <span style="color: #0000ff">&lt;</span><span style="color: #800000">CustomServerUrl</span><span style="color: #0000ff">&gt;</span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  13:</span>           <span style="color: #0000ff">&lt;/</span><span style="color: #800000">CustomServerUrl</span><span style="color: #0000ff">&gt;</span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  14:</span>           <span style="color: #0000ff">&lt;</span><span style="color: #800000">SaveServerSettingsInUserFile</span><span style="color: #0000ff">&gt;</span>False<span style="color: #0000ff">&lt;/</span><span style="color: #800000">SaveServerSettingsInUserFile</span><span style="color: #0000ff">&gt;</span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  15:</span>         <span style="color: #0000ff">&lt;/</span><span style="color: #800000">WebProjectProperties</span><span style="color: #0000ff">&gt;</span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  16:</span>       <span style="color: #0000ff">&lt;/</span><span style="color: #800000">FlavorProperties</span><span style="color: #0000ff">&gt;</span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  17:</span>     <span style="color: #0000ff">&lt;/</span><span style="color: #800000">VisualStudio</span><span style="color: #0000ff">&gt;</span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  18:</span>   <span style="color: #0000ff">&lt;/</span><span style="color: #800000">ProjectExtensions</span><span style="color: #0000ff">&gt;</span></pre>
</p></div>
</div>
<p>&#160;</p>
<p>Reload the project, and it should load now.</p>
<p>P.S. Oracle, please please please release something for Vista x64 and ODAC/ODP.&#160; Even an alpha.&#160; I promise I will test on an x86 machine before I release..</p>
<div class="wlWriterEditableSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:5124f172-77aa-4aa8-a12d-c1fe3a5e0c03" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px">Technorati Tags: <a href="http://technorati.com/tags/Visual+Studio" rel="tag">Visual Studio</a>,<a href="http://technorati.com/tags/ASP.NET" rel="tag">ASP.NET</a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.geospecialling.com/index.php/2008/09/system-runtime-interopservices-comexception-loading-asp-net-web-application-in-visual-studio-2008/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Increase Mapguide Enterprise/Open Performance with Javascript Compression using the YUI Compressor</title>
		<link>http://www.geospecialling.com/index.php/2008/08/increase-mapguide-enterpriseopen-performance-with-javascript-compression-using-the-yui-compressor/</link>
		<comments>http://www.geospecialling.com/index.php/2008/08/increase-mapguide-enterpriseopen-performance-with-javascript-compression-using-the-yui-compressor/#comments</comments>
		<pubDate>Sat, 30 Aug 2008 13:18:00 +0000</pubDate>
		<dc:creator>Darrin Maidlow</dc:creator>
				<category><![CDATA[Mapguide]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[YUI Compressor]]></category>

		<guid isPermaLink="false">http://www.geospecialling.com/index.php/2008/08/increase-mapguide-enterpriseopen-performance-with-javascript-compression-using-the-yui-compressor/</guid>
		<description><![CDATA[Javascript compression is something I had on my list for the next major release of RADE.&#160; RADE is not quite ready for this step yet, so I thought I would give it a shot on Mapguide Enterprise and see what kind of results it would yield.&#160; For a small site or an internal site this [...]]]></description>
			<content:encoded><![CDATA[<p>Javascript compression is something I had on my list for the next major release of RADE.&#160; RADE is not quite ready for this step yet, so I thought I would give it a shot on Mapguide Enterprise and see what kind of results it would yield.&#160; For a small site or an internal site this will probably not yield significant benefits.&#160; However if you run a large public site javascript compression could squeeze out some more performance as well as save you on bandwidth costs.&#160; Yahoo has a good article on <a title="empty cache performance" href="http://yuiblog.com/blog/2007/01/04/performance-research-part-2/" target="_blank" rel="tag">performance and the &quot;empty cache&quot;</a>.</p>
<p>I did some brief looking around and word on the internets is that the <a title="YUI Javascript compressor" href="http://developer.yahoo.com/yui/compressor/" target="_blank" rel="tag">YUI compressor</a> is one of the better compressors out there.&#160; The YUI compressor is an open source java applet.&#160;&#160; This *should* work with Mapguide Open, heck this might even be done already in MGOS &#8211; but I am only using Enterprise so I cannot confirm, deny, or test this.&#160;&#160; </p>
<p>Some of the key things the compressor will do:</p>
<ol>
<li>remove all comments </li>
<li>remove all white space and line breaks </li>
<li>rename all local variables and parameters to single characters </li>
</ol>
<p>The YUI compressor should not alter variable values or your logic in any way.</p>
<p>To use the YUI compressor you will need to <a title="Download Java" href="http://www.java.com/en/" target="_blank" rel="tag">have Java installed</a>.&#160; Note that if you have the Oracle client installed, you probably have Java already&#160; Once you have Java, you can download a copy of the <a title="download the YUI compress" href="http://www.julienlecomte.net/yuicompressor/" target="_blank" rel="tag">YUI compressor</a> (I&#8217;m going to start referring to it as the YC now&#8230;).&#160; If you don&#8217;t feel like downloading Java and the YC &#8211; I&#8217;ve attached the processed files at the bottom of this post.</p>
<p>Lets first look at the javascript shipped with Mapguide Enterprise.&#160; If you browse to your web server extension viewer files (the default location is C:\Program Files\Autodesk\MapGuideEnterprise2009\WebServerExtensions\www\viewerfiles I believe) you will see ten javascript files.&#160; If you choose to process these files on your own please back them up first.&#160; Don&#8217;t blame me if you don&#8217;t backup your files and something goes wrong =).</p>
<p>Before YC:</p>
<p><a href="http://www.geospecialling.com/wp-content/uploads/2010/02/image9.png" target="_blank"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="242" alt="Mapgude Enterprise Javascript before YUI Compression" src="http://www.geospecialling.com/wp-content/uploads/2010/02/image_thumb9.png" width="499" border="0" /></a></p>
<p>Using the YC is simple:</p>
<div>
<div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   1:</span> c:\oracle\product\10.2.0\client_1\jdk\bin\java.exe -jar f:\utils\YUICompress\yuicompressor-2.3.6\build\yuicompressor-2.3.6.jar -o comp\browserdetect.js browserdetect.js</pre>
</p></div>
</div>
<p>&#160;</p>
<p>Update the paths to Java and the YC as per your environment.&#160; Using the handy dir /B *.js &gt; go.bat I created a batch file of all the javascript files in the viewerfiles folder.&#160; Be sure to run this from a dos window in the viewerfiles folder, or update the paths.&#160; You will also need to create the comp folder in viewerfiles.&#160;&#160; Quick cut and pasting created the following batch file:</p>
<div>
<div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   1:</span> c:\oracle\product\10.2.0\client_1\jdk\bin\java.exe -jar f:\utils\YUICompress\yuicompressor-2.3.6\build\yuicompressor-2.3.6.jar -o comp\browserdetect.js browserdetect.js</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   2:</span> c:\oracle\product\10.2.0\client_1\jdk\bin\java.exe -jar f:\utils\YUICompress\yuicompressor-2.3.6\build\yuicompressor-2.3.6.jar -o comp\contextmenu.js contextmenu.js</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   3:</span> c:\oracle\product\10.2.0\client_1\jdk\bin\java.exe -jar f:\utils\YUICompress\yuicompressor-2.3.6\build\yuicompressor-2.3.6.jar -o comp\digitize.js digitize.js</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   4:</span> c:\oracle\product\10.2.0\client_1\jdk\bin\java.exe -jar f:\utils\YUICompress\yuicompressor-2.3.6\build\yuicompressor-2.3.6.jar -o comp\hashtable.js hashtable.js</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   5:</span> c:\oracle\product\10.2.0\client_1\jdk\bin\java.exe -jar f:\utils\YUICompress\yuicompressor-2.3.6\build\yuicompressor-2.3.6.jar -o comp\initdwfctrl.js initdwfctrl.js</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   6:</span> c:\oracle\product\10.2.0\client_1\jdk\bin\java.exe -jar f:\utils\YUICompress\yuicompressor-2.3.6\build\yuicompressor-2.3.6.jar -o comp\legend.js legend.js</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   7:</span> c:\oracle\product\10.2.0\client_1\jdk\bin\java.exe -jar f:\utils\YUICompress\yuicompressor-2.3.6\build\yuicompressor-2.3.6.jar -o comp\numfmt.js numfmt.js</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   8:</span> c:\oracle\product\10.2.0\client_1\jdk\bin\java.exe -jar f:\utils\YUICompress\yuicompressor-2.3.6\build\yuicompressor-2.3.6.jar -o comp\pngfix_map.js pngfix_map.js</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   9:</span> c:\oracle\product\10.2.0\client_1\jdk\bin\java.exe -jar f:\utils\YUICompress\yuicompressor-2.3.6\build\yuicompressor-2.3.6.jar -o comp\sarissa.js sarissa.js</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  10:</span> c:\oracle\product\10.2.0\client_1\jdk\bin\java.exe -jar f:\utils\YUICompress\yuicompressor-2.3.6\build\yuicompressor-2.3.6.jar -o comp\wz_jsgraphics.js wz_jsgraphics.js</pre>
</p></div>
</div>
<p>&#160;</p>
<p>(*Sorry about the overlap.&#160; I&#8217;m working on a new layout and am addressing that in there)</p>
<p>Running that output all of the compressed of the files down somewhat, to pretty significantly. </p>
<p align="left"><a href="http://www.geospecialling.com/wp-content/uploads/2010/02/image10.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="223" alt="Mapgude Enterprise Javascript After YUI Compression" src="http://www.geospecialling.com/wp-content/uploads/2010/02/image_thumb10.png" width="569" border="0" /></a></p>
<p>A quick comparison of one of the function calls:</p>
<div>
<div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   1:</span> <span style="color: #0000ff">function</span> MenuData(menuName, arrowHeight, scrollInc, scrollDelay, minSize, iconScrollUp, iconScrollUpDisabled, iconScrollDown, iconScrollDownDisabled, owner, withIFrame, bkColor)</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   2:</span> <span style="color: #0000ff">function</span> MenuData(F,H,I,K,E,G,D,J,A,C,B,L)</pre>
</p></div>
</div>
<p>&#160;</p>
<p>As you can see &#8211; the savings can be significant.</p>
<p>I&#8217;m not using the <a title="fusion viewer" href="http://www.jasonbirch.com/nodes/2007/12/19/155/mapguide-open-source-more-fusion-less-confusion/" target="_blank" rel="tag">Fusion viewer</a> yet so I did not process those files, but I did check some of the JS in there and each script file had a huge header comment.&#160; It looks like Fusion could also benefit from some compression action.&#160; Please note, I&#8217;ve been running my web tier using this script for a day or two.&#160; I&#8217;ve not run any serious testing on this code &#8211; so try this at your own risk.&#160; You did make that backup I suggested, right?&#160; That said, I have not personally experienced any problems yet.&#160; Also, should you compress your viewerfiles and have problems be sure to try your backups.&#160; Especially before calling your dealer or Autodesk for help. (sorry product support and ADN guys.&#160; Please don&#8217;t hate me =] ).</p>
</p>
<div class="wlWriterEditableSmartContent" id="scid:fb3a1972-4489-4e52-abe7-25a00bb07fdf:e709df33-b7eb-4787-9e2d-dd73ac7bc3b0" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px">
<p> <a href="http://www.geospecialling.com/wp-content/uploads/2010/02/compressedJS.zip" target="_blank">Download some pre-compressed javascript files</a></p>
</div>
<p>if you would rather not run the YC yourself. </p>
<p>Enjoy!</p>
<div class="wlWriterEditableSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:8cf6b803-e6e9-4c76-b59c-22402f72bde2" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px">Technorati Tags: <a href="http://technorati.com/tags/Javascript" rel="tag">Javascript</a>,<a href="http://technorati.com/tags/Mapguide+Enterprise" rel="tag">Mapguide Enterprise</a>,<a href="http://technorati.com/tags/Mapguide+Open+Source" rel="tag">Mapguide Open Source</a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.geospecialling.com/index.php/2008/08/increase-mapguide-enterpriseopen-performance-with-javascript-compression-using-the-yui-compressor/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>@MApp &#8211; a Developers take on an amazing RF Design and Drafting Application</title>
		<link>http://www.geospecialling.com/index.php/2008/08/mapp-a-developers-take-on-an-amazing-rf-design-and-drafting-application/</link>
		<comments>http://www.geospecialling.com/index.php/2008/08/mapp-a-developers-take-on-an-amazing-rf-design-and-drafting-application/#comments</comments>
		<pubDate>Mon, 04 Aug 2008 02:53:00 +0000</pubDate>
		<dc:creator>Darrin Maidlow</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[@MApp]]></category>

		<guid isPermaLink="false">http://www.geospecialling.com/index.php/2008/08/mapp-a-developers-take-on-an-amazing-rf-design-and-drafting-application/</guid>
		<description><![CDATA[My friend and colleague Evan Wager recently wrote an article on the history of @MApp (sometimes known as @MAppDR, ATMapp or ATT_MApp).&#160;&#160; A strange twist of events also resulted in me working very briefly with the most &#34;recent&#34; build of the product.&#160; It had been many years since I really saw the application running &#8211; [...]]]></description>
			<content:encoded><![CDATA[<p>My friend and colleague <a title="Evan Wagner - Technical Design and Drafting" href="http://techdd.com/" target="_blank" rel="tag">Evan Wager</a> recently wrote an article on the <a title="History of @MApp" href="http://techdd.com/TDD_Info/@MApp_History.htm" target="_blank" rel="tag">history of @MApp</a> (sometimes known as @MAppDR, ATMapp or ATT_MApp).&#160;&#160; A strange twist of events also resulted in me working very briefly with the most &quot;recent&quot; build of the product.&#160; It had been many years since I really saw the application running &#8211; so I had a bit of a fresh eye.&#160; This made me a little bit nostalgic, and also quite proud.&#160; We had really made some amazing software when you got right down to it.&#160; Unfortunately, in &quot;internet years&quot; it has sadly become a dinosaur.</p>
<p>Long ago (it seems like a lifetime) I worked for a company called Kanotech.&#160; One of my first real development projects of scale was on the <a title="@MApp web site" href="http://www.attmapp.net" target="_blank" rel="tag">@MAppDR product</a>.&#160; @MApp was a powerful <a title="AutoCAD Map" href="http://usa.autodesk.com/adsk/servlet/index?id=3081357&amp;siteID=123112" target="_blank" rel="tag">AutoCAD Map</a> extension built for AT&amp;T/Comcast cable.&#160; My first task was to head to Seattle and learn how field technicians would walk the existing RF Plant (fancy word for cabling and RF equipment) and map the existing assets, on paper.&#160; The first task was devise a way to run @MApp on one of the early rugged <a title="early Hammerhead Pen computer" href="http://www.pencomputing.com/old_pcm_website/PCM_8/P8_hammerhead_review.html" target="_blank" rel="tag">Hammerhead pen computers</a>.&#160; I walked the streets of the greater Seattle area with some of the field technicians and got my first introduction into the world of cable TV networks.&#160; At the end of this trip I had a collection of notes and enough information to design and implement the pen based version of @MApp.&#160; This was the beginning of my life with @MApp.</p>
<p>With the bigger picture in mind, there were many underlying goals for @MAppDR, one of the key needs was standards enforcement (and creation -&#160; Evan created the first solid standard which, though very much evolved is still in use today).&#160; Like many organizations back in the day (and likely even today) the mapping data being generated was garbage.&#160; Each division, each consultant, sometimes each drafter had their own set of &quot;Standards&quot;.&#160; As Evan put it, the mapping data was &quot;Only good for printing&quot; &#8211; and even that was a stretch in some of the sample data we saw.&#160; Our top priority was to create a set of tools which facilitated drafting standards compliant drawings &#8211; as well as a method to test each drawing to ensure the drawing was truly compliant.</p>
<p>Under the hood, @MAppDR was all database driven.&#160; Layers, cable types and properties, even symbols and block attributes could be configured in the database.&#160; Generic lisp calls were defined to allow simple wrapper functions to be created to add new entities to the application.&#160; The application had been created using an extensive amount of <a title="Lisp - I still have nightmares about parenthesis" href="http://en.wikipedia.org/wiki/AutoLISP" target="_blank" rel="tag">AutoLisp</a>, VB6, <a title="ObjectARX is great fun" href="http://usa.autodesk.com/adsk/servlet/index?id=773204&amp;siteID=123112" target="_blank" rel="tag">C++/ObjectARX</a>, Python, and SQL Server/Access databases.&#160; Let me tell you, I still have nightmares about parentheses =).<a href="http://www.geospecialling.com/wp-content/uploads/2010/02/TapDialogDRBlack.jpg" target="_blank"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="196" alt="@MApp DR drafting tools" src="http://www.geospecialling.com/wp-content/uploads/2010/02/TapDialogDRBlack_thumb.jpg" width="244" align="right" border="0" /></a></p>
<p>The drafting tools, in retrospect were good.&#160; Damn good.&#160; Obvious elements were there, select a cable, or equipment type using standard AutoCAD toolbar buttons.&#160; @MAppDR went a step further.&#160; It would create/set the layer, set the desired object snaps, draft the cable.&#160; Network connected equipment would snap to the cable, rotate, trim and physically connect itself to the model.&#160; In some circumstances, inserting a block/cable of a certain type also required an accompanying block.&#160; If required, the user would be prompted to insert these as well.&#160; In some cases &#8211; these blocks were placed automatically.&#160; Using @MAppDR &#8211; a user could draft very clean RF drawings without having to really know&#160; AutoCAD.&#160; Every piece of possible equipment was available from a comprehensive set of toolbars &#8211; and only one click away.&#160; </p>
<p>On insertion of blocks, the user was presented with a form powered by the attribute information stored in the databases.&#160; Some attributes were required, some were populated programmatically based on nearby objects or other conditions, and some were selected from lookups or manually entered by the user.&#160; </p>
<p>@MAppDR had a really cool connectivity process.&#160; This process would perform physical connectivity on the network, following rules defined for equipment inputs and outputs.&#160; In addition to this, rules were also defined to dictate what equipment could connect to other equipment.&#160; This connectivity, in my opinion was one of the most powerful components of @MAppDR.&#160; Connectivity information was stored on the entities.&#160; When a trace was done, we could follow the network and do all kinds of great reporting.&#160; I recall one situation where we knew that in situations where a specific combination of equipment was setup &#8211; it would cause service problems.&#160; Within a few hours, I had a batch process created that would process hundreds of drawings and spit out a report of nodes, and locations where this combination existed.&#160; The problems in the field were fixed even before customer complaints came in.&#160; </p>
<p>One of the key requirements for @MAppDR was a quality assurance process.&#160; We defined several &quot;levels&quot; of QA.&#160; Each level of QA required a password to execute.&#160; The first two levels of QA were for contractors doing mapping redraft, or drafting.&#160; These levels would let the consultants know that the required data had been entered and would &quot;stamp&quot; the drawing.&#160; The drawings were then submitted, and Comcast staff would run their password protected version of the QA routines &#8211; which would verify that indeed the contractor had done the required work.&#160; If not, the drawing was rejected and the contractor had to fix it.&#160; I can say with a great deal of certainty that Comcast, using @MAppDR is one of the few organizations with near perfect data.&#160; And the things they do with that data are incredible.<a href="http://www.geospecialling.com/wp-content/uploads/2010/02/TapDialogRFBlack.jpg" target="_blank"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="196" alt="@MAppRF Drafting Enhancements" src="http://www.geospecialling.com/wp-content/uploads/2010/02/TapDialogRFBlack_thumb.jpg" width="244" align="right" border="0" /></a></p>
<p>The final version of @MApp, @MappRF could have dominated the cable industry.&#160; Sadly, it was never completed.&#160; This release added RF design to the drafting.&#160; A library of equipment was created, as well as design parameters which were sub-selection of the equipment that let the RF designer know what equipment was available to be used.&#160; All of the equipment&#8217;s operating parameters were captured.&#160; As the user drafted equipment, the actual equipment model would be selected on the attributes.&#160; This allowed us to increase the efficiency of populating attributes during the drafting phase all the while making the stored data even more accurate and complete.&#160;&#160;&#160; </p>
<p>One of the coolest bits of @MAppRF was what came to be known as the TRID.&#160; The TRID was a&#160; multi-threaded C++ control was created that contained a tree-grid hybrid.&#160; This form could be docked within AutoCAD or floating on a separate monitor.&#160; As the user drafted, the RF signal and power calculations were performed in real-time, without interfering with the drafting process.&#160; I recall being told, this project would be simple.&#160; RF design is just table math.&#160; And it is, but, mix in a multi-threaded C++ form running per entity calculations on a potentially infinite number of <a href="http://www.geospecialling.com/wp-content/uploads/2010/02/Trid.jpg" target="_blank"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="194" alt="@MAppRF Design Diaglog - the TRID" src="http://www.geospecialling.com/wp-content/uploads/2010/02/Trid_thumb.jpg" width="244" align="right" border="0" /></a>frequencies both going forward, and backwards &#8211; oh and sprinkle in a little bit of power draw calculations.&#160; Then tell me its simple.&#160; =) </p>
<p>If I could do it over again.&#160; Wow, what a difference the current technology would make.&#160; By far the single largest flaw @MApp has is its dependence on drawing based storage.&#160; Given the timeline, we didn&#8217;t have a choice.&#160; <a title="Oracle Spatial" href="http://www.oracle.com/technology/products/spatial/index.html" target="_blank" rel="tag">Oracle Spatial</a> was available, but immature.&#160; Going with Oracle at that time would have likely been more grief than it was worth.&#160;&#160; Seamless map access would be a must.&#160; Given the times we used a special piece of ObjectARX code called the SPE.&#160; This gave us spatial analysis abilities that rival even Oracle Spatial.&#160; One of the major downfalls here is that it required AutoCAD to run.&#160; Therefore &#8211; most of the calculations had to occur within AutoCAD itself.&#160; This became a problem as other applications could benefit from these operations &#8211; but couldn&#8217;t take advantage of them without also being AutoCAD based.&#160; </p>
<p>Leveraging a multi-tiered architecture, a lot of the common functions could be moved to a more <a title="service-oriented architecture" href="http://en.wikipedia.org/wiki/Service-oriented_architecture" target="_blank" rel="tag">SOA</a> like architecture.&#160; Now, though the TRID could still be a multi-threaded form in AutoCAD &#8211; the calculations could be done on the server side &#8211; thereby making the AutoCAD portion a presentation layer &#8211; instead of a business logic layer.&#160; Now the RF design calculations could be done in any user interface &#8211; instead of having to opening a drawing in AutoCAD.&#160; </p>
<p>And that my dear reader, concludes my epic tale on @MApp.&#160; Even this large novel like piece only scratched the surface of this project.&#160; It was my life for many years.&#160; I slept under my desk a number of times &#8211; but it was a great project.&#160; It was fun to think about it again and put together something to share with you. =)</p>
<div class="wlWriterEditableSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:fe4ab6c6-7700-4b9e-8836-b12c74bd43c3" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px">Technorati Tags: <a href="http://technorati.com/tags/%40MApp" rel="tag">@MApp</a>,<a href="http://technorati.com/tags/RF+Design" rel="tag">RF Design</a>,<a href="http://technorati.com/tags/RF+Drafting" rel="tag">RF Drafting</a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.geospecialling.com/index.php/2008/08/mapp-a-developers-take-on-an-amazing-rf-design-and-drafting-application/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Passing a Large Mapguide Selection XML to a New Window Using Dynamic Forms and Javascript</title>
		<link>http://www.geospecialling.com/index.php/2008/07/passing-a-large-mapguide-selection-xml-to-a-new-window-using-dynamic-forms-and-javascript/</link>
		<comments>http://www.geospecialling.com/index.php/2008/07/passing-a-large-mapguide-selection-xml-to-a-new-window-using-dynamic-forms-and-javascript/#comments</comments>
		<pubDate>Thu, 31 Jul 2008 05:22:00 +0000</pubDate>
		<dc:creator>Darrin Maidlow</dc:creator>
				<category><![CDATA[Mapguide]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://www.geospecialling.com/index.php/2008/07/passing-a-large-mapguide-selection-xml-to-a-new-window-using-dynamic-forms-and-javascript/</guid>
		<description><![CDATA[Everyone knows there is a limit to the size of the query string, right?&#160; Well ok, maybe you didn&#8217;t &#8211; but there is.&#160; What that limit is depends on the browser.&#160; There is a lot of conflicting information out there on the magical Google.&#160; An RFC defines it, but no one really seems to pay [...]]]></description>
			<content:encoded><![CDATA[<p>Everyone knows there is a <a title="query string has a size limit!" href="http://www.asp101.com/tips/index.asp?id=102" target="_blank" rel="tag">limit to the size of the query string</a>, right?&#160; Well ok, maybe you didn&#8217;t &#8211; but there is.&#160; What that limit is depends on the browser.&#160; There is a lot of conflicting information out there on the magical <a title="the magical Google!" href="http://www.google.com" target="_blank" rel="tag">Google</a>.&#160; An RFC defines it, but no one really seems to pay attention to those anyhow.&#160; (Are you listening Microsoft, of course you are! =]).&#160; Anyhow, for IE, the query string length is usually around 2000 characters.</p>
<p>However, in most cases you&#8217;re better off using a form and posting your data up to the server side that way, as the limitations on data are so large you will likely not need to worry about them.&#160; Sometimes, query strings can also show your users just a little too much information &#8211; though I&#8217;m by no means a proponent of &quot;security through obscurity&quot; hiding a little bit more from your users will keep the curious ones a little more in check =).</p>
<p>When working with <a title="Autodesk Mapguide Enterprise" href="http://www.mapguide.com" target="_blank" rel="tag">Mapguide Enterprise</a>/<a title="Mapguide Open Source" href="http://mapguide.osgeo.org" target="_blank" rel="tag">Mapguide Open Source</a> we need to grab some potentially massive XML strings from the MgMap object and pass these along to the server side for processing.&#160; Take the selection XML from the MgMap object, even a single entity selection can use a significant portion of the characters available in the query string.&#160; On top of that, passing this data via query string requires that the data be URL encoded, using even more of our precious query string characters. </p>
<p>Depending on the design of your application it may not always be feasible to define a hard coded form, or even a form defined server side using ASP.NET.&#160; In some cases (you guessed it &#8211; my case) you may want to use javascript and do all the work on the client side to define a form and pass the data long that way.</p>
<p>Well you&#8217;re in luck, I found a pretty nice solution (WELL, at least I&#8217;m liking it&#160; =]).&#160;&#160; I&#8217;m kicking myself for not realizing this long ago, but oh well.&#160; So the following javascript function demonstrates how to build, add, populate, and submit a form on the fly using some information from the MgMap object. </p>
<div>
<div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   1:</span> <span style="color: #0000ff">function</span> postData()   </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   2:</span> {   3: <span style="color: #008000">//get the map   </span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   3:</span> mapObj = GetMap();   </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   4:</span>&#160; </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   5:</span> <span style="color: #008000">//define the new form   </span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   6:</span> <span style="color: #0000ff">var</span> newForm = document.createElement(<span style="color: #006080">&quot;form&quot;</span>);   </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   7:</span> <span style="color: #008000">//set the method to POST - the opposite of query strings..   </span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   8:</span> newForm.method=<span style="color: #006080">&quot;POST&quot;</span>;  </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   9:</span>  <span style="color: #008000">//add the new form to the current document  </span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  10:</span>  document.body.appendChild(newForm);  </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  11:</span>&#160; </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  12:</span>  <span style="color: #008000">//lets get some data and add it to the form  </span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  13:</span>  AddFormElement(newForm, <span style="color: #006080">&quot;MapName&quot;</span>, oMap.GetMapName());  </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  14:</span>  AddFormElement(newForm, <span style="color: #006080">&quot;SID&quot;</span>, oMap.GetSessionId());  </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  15:</span>  <span style="color: #008000">//be sure you escape the selection XML - or you will get an error on post about a   </span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  16:</span>  <span style="color: #008000">//&quot;potentially dangerous form value&quot;.  Remember on the server side to Server.UrlDecode() it  </span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  17:</span>  AddFormElement(newForm, <span style="color: #006080">&quot;sel&quot;</span>, escape(oMap.GetSelectionXML()));  </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  18:</span>&#160; </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  19:</span>  <span style="color: #008000">//lets create our new window  </span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  20:</span>  <span style="color: #0000ff">var</span> szTarget = <span style="color: #006080">&quot;targetWin&quot;</span>  </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  21:</span>  newForm.target = szTarget;  </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  22:</span>  <span style="color: #008000">//set the name/path of the ASPX file you want to process your form with  </span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  23:</span>  newForm.action = <span style="color: #006080">&quot;/url_to_open/file.aspx&quot;</span>  </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  24:</span>&#160; </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  25:</span>  <span style="color: #008000">//open a new window to submit the form to.  Its a good idea to have a blank.htm so you don't get a file not found error  </span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  26:</span>  <span style="color: #0000ff">var</span> oWin = window.open(<span style="color: #006080">&quot;blank.htm&quot;</span>,szTarget,<span style="color: #006080">'menubar=yes, resizable=yes,scrollbars=yes, status=no,toolbar=no,width=300, height=300'</span>);  </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  27:</span>&#160; </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  28:</span>  <span style="color: #008000">//give the window focus.  Users like this  </span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  29:</span>  oWin.focus();  </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  30:</span>&#160; </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  31:</span>  <span style="color: #008000">//submit the form - it will now open in the new window  </span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  32:</span>  newForm.submit();  </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  33:</span>  <span style="color: #008000">//remove the form from the document, we're done with it  </span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  34:</span>  document.body.removeChild(newForm);  </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  35:</span>  }  </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  36:</span>&#160; </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  37:</span>  <span style="color: #0000ff">function</span> AddFormElement(form, elementName, elementVal)  </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  38:</span>  {  </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  39:</span>      <span style="color: #0000ff">var</span> newElement = document.createElement(<span style="color: #006080">&quot;&lt;input name='&quot;</span> + elementName + <span style="color: #006080">&quot;' type='hidden'/&gt;&quot;</span>);  </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  40:</span>      newElement.value = elementVal;  </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  41:</span>      form.appendChild(newElement);  </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  42:</span>      <span style="color: #0000ff">return</span> form;  </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  43:</span>  }</pre>
</p></div>
</div>
<p>&#160;</p>
<p>On the server side, you can now access this data from ASP.NET using Request.Form, for example Request.Form(&quot;MapName&quot;) would give you the map name.&#160; Don&#8217;t forget when retrieving the selection XML to run that through Server.UrlDecode, or HttpUtility.UrlDecode.</p>
<p>As usual, any comments, bugs, or rotten fruit &#8211; send em my way.&#160; Enjoy!</p>
<div class="wlWriterEditableSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:09bdc2e1-fce5-42ef-972d-5d2186dd47d2" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px">Technorati Tags: <a href="http://technorati.com/tags/ASP.NET" rel="tag">ASP.NET</a>,<a href="http://technorati.com/tags/Javascript" rel="tag">Javascript</a>,<a href="http://technorati.com/tags/Mapguide+Enterprise" rel="tag">Mapguide Enterprise</a>,<a href="http://technorati.com/tags/Mapguide+Open+Source" rel="tag">Mapguide Open Source</a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.geospecialling.com/index.php/2008/07/passing-a-large-mapguide-selection-xml-to-a-new-window-using-dynamic-forms-and-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mapguide 2009 / OS 2.0 Get Selected Key Values VB.NET Example and the dreaded MgSelection.GenerateFilter Issue</title>
		<link>http://www.geospecialling.com/index.php/2008/07/mapguide-2009-os-2-0-get-selected-key-values-vb-net-example-and-the-dreaded-mgselection-generatefilter-issue/</link>
		<comments>http://www.geospecialling.com/index.php/2008/07/mapguide-2009-os-2-0-get-selected-key-values-vb-net-example-and-the-dreaded-mgselection-generatefilter-issue/#comments</comments>
		<pubDate>Wed, 30 Jul 2008 08:12:00 +0000</pubDate>
		<dc:creator>Darrin Maidlow</dc:creator>
				<category><![CDATA[Mapguide]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[Dynamic Authoring]]></category>

		<guid isPermaLink="false">http://www.geospecialling.com/index.php/2008/07/mapguide-2009-os-2-0-get-selected-key-values-vb-net-example-and-the-dreaded-mgselection-generatefilter-issue/</guid>
		<description><![CDATA[Tonight I came across the MgSelection.GenerateFilter bug.&#160; I had read about it, and made a mental note that one day it would be an issue.&#160; That note wasn&#8217;t very good, and I completely forgot about it.&#160;&#160; I was wrapping up the RADE updates around the report this eve and fortunately I bothered to select the [...]]]></description>
			<content:encoded><![CDATA[<p>Tonight I came across the <a title="MgSelection.GenerateFilter cannot deal with more than twenty objects" href="http://trac.osgeo.org/mapguide/ticket/501" target="_blank" rel="tag">MgSelection.GenerateFilter bug</a>.&#160; I had read about it, and made a mental note that one day it would be an issue.&#160; That note wasn&#8217;t very good, and I completely forgot about it.&#160;&#160; I was wrapping up the <a title="RADE framework - building custom applications without writing code" href="http://www.webrade.com/blogs/darrin/2008/06/29/RADEBuildCustomWebApplicationsWithoutWritingCustomCode.aspx" target="_blank" rel="tag">RADE</a> updates around the report this eve and fortunately I bothered to select the entire map and run through a report.</p>
<p align="center"><a href="http://www.geospecialling.com/wp-content/uploads/2010/02/image13.png" target="_blank"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="208" alt="RADE Report - but what, only 20 records returned?" src="http://www.geospecialling.com/wp-content/uploads/2010/02/image_thumb13.png" width="244" border="0" /></a> </p>
<p>Report looked good.&#160; The results were sorting, checkboxes working.&#160;&#160; Wait a minute, I selected the entire map.&#160; There should be more than twenty items returned.&#160; So a quick search of my twelve thousand saved e-mails from the <a title="Mapguide Users Mailing List" href="http://lists.osgeo.org/mailman/listinfo/mapguide-users" target="_blank" rel="tag">Mapguide Users mailing list</a> turned up what needed to be done.&#160; Fortunately Autodesk added a GenerateFilters call to MgSelection.&#160; This call returns an MgStringCollection of filters.</p>
<p>Basically the solution to this problem is to use GenerateFilters instead of GenerateFilter, and loop through the results.&#160; Each time, appending the returned keys to the complete list.&#160; For example:</p>
<div>
<div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   1:</span> Public Shared Function GetSelectedKeysString(ByRef siteConn As MgSiteConnection, _</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   2:</span>     ByRef resSvc As MgResourceService, ByVal oMap As MgMap, ByVal SessionId As String, _</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   3:</span>     ByVal SelectionXML As String, ByVal layerResID As MgResourceIdentifier, _</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   4:</span>     ByVal keyFieldName As String) As String</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   5:</span>&#160; </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   6:</span>     Dim szKeys As String = &quot;&quot;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   7:</span>     Dim oSel As New MgSelection(oMap)</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   8:</span>     oSel.FromXml(SelectionXML)</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   9:</span>     Dim curLay As MgLayerBase</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  10:</span>     'isolate the layer</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  11:</span>     For Each layerItem As MgLayerBase In oSel.GetLayers</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  12:</span>         If layerItem.Name = layerResID.Name Then</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  13:</span>             curLay = layerItem</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  14:</span>         End If</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  15:</span>     Next</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  16:</span>&#160; </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  17:</span>     Dim featSvc As MgFeatureService = siteConn.CreateService(MgServiceType.FeatureService)</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  18:</span>     Dim queryOptions As New MgFeatureQueryOptions</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  19:</span>     Dim featureClassName As String = curLay.GetFeatureClassName</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  20:</span>     'workaround using GenerateFilters and looping through the results as needed</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  21:</span>     Dim featureReader As MgFeatureReader</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  22:</span>     Dim filters As MgStringCollection = oSel.GenerateFilters(curLay, featureClassName, 20)</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  23:</span>     Dim filterCnt As Integer = 0</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  24:</span>     While filterCnt <span style="color: #0000ff">&lt;</span> filters.GetCount</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  25:</span>         queryOptions.SetFilter(filters.GetItem(filterCnt))</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  26:</span>         featureReader = featSvc.SelectFeatures(New MgResourceIdentifier(curLay.GetFeatureSourceId), featureClassName, queryOptions)</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  27:</span>         While featureReader.ReadNext</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  28:</span>             If szKeys = &quot;&quot; Then</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  29:</span>                 szKeys = ConvertPropertyToString(featureReader, keyFieldName)</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  30:</span>             Else</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  31:</span>                 szKeys &amp;= &quot;,&quot; &amp; ConvertPropertyToString(featureReader, keyFieldName)</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  32:</span>             End If</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  33:</span>         End While</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  34:</span>         featureReader.Close()</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  35:</span>         featureReader.Dispose()</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  36:</span>         filterCnt += 1</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  37:</span>     End While</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  38:</span>     Return szKeys</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  39:</span> End Function</pre>
</p></div>
</div>
<p>&#160;</p>
<p>In this code, we get the selection from the MgMap object and then isolate the layer in question.&#160; Then we generate the collection of filters and loop through them.&#160; Each time, adding the appropriate value to the list of keys.&#160; Note the use of ConverPropertyToString, this needs to be used to ensure that the various data types are converted over to string. </p>
</p>
<div class="wlWriterEditableSmartContent" id="scid:fb3a1972-4489-4e52-abe7-25a00bb07fdf:014f4cac-ecec-4ce7-ab9c-535012915177" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px">
<p>I&#8217;ve included this function as well as a couple other handy related ones in the <a href="http://www.geospecialling.com/wp-content/uploads/2010/02/feature.zip" target="_blank">attached zip file</a></p>
</div>
<p>.&#160; If you&#8217;re looking for a C# example of how to use GenerateFilters one is provided in the <a title="C# example of GenerateFilters" href="http://svn.osgeo.org/mapguide/branches/2.0.x/MgDev/Web/src/mapviewernet/buffer.aspx" target="_blank" rel="tag">source for buffers.aspx</a>. </p>
<p>After making these changes my reports now look all proper! hurray.&#160; Maybe I can hit the sack now?&#160; nahh.</p>
<p align="center"><a href="http://www.geospecialling.com/wp-content/uploads/2010/02/image14.png" target="_blank"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="208" alt="RADE report - but this time everything looks ok" src="http://www.geospecialling.com/wp-content/uploads/2010/02/image_thumb14.png" width="244" border="0" /></a>&#160;</p>
<div class="wlWriterEditableSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:5dbcf6eb-786b-405c-8a73-dbb348080503" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px">Technorati Tags: <a href="http://technorati.com/tags/ASP.NET" rel="tag">ASP.NET</a>,<a href="http://technorati.com/tags/Mapguide+Enterprise" rel="tag">Mapguide Enterprise</a>,<a href="http://technorati.com/tags/Mapguide+Open+Source" rel="tag">Mapguide Open Source</a>,<a href="http://technorati.com/tags/VB.NET" rel="tag">VB.NET</a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.geospecialling.com/index.php/2008/07/mapguide-2009-os-2-0-get-selected-key-values-vb-net-example-and-the-dreaded-mgselection-generatefilter-issue/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>RADE Milestone &#8211; Object Relational Mapping with NHibernate</title>
		<link>http://www.geospecialling.com/index.php/2008/07/rade-milestone-object-relational-mapping-with-nhibernate/</link>
		<comments>http://www.geospecialling.com/index.php/2008/07/rade-milestone-object-relational-mapping-with-nhibernate/#comments</comments>
		<pubDate>Sat, 19 Jul 2008 09:37:00 +0000</pubDate>
		<dc:creator>Darrin Maidlow</dc:creator>
				<category><![CDATA[RADE]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[nHibernate]]></category>

		<guid isPermaLink="false">http://www.geospecialling.com/index.php/2008/07/rade-milestone-object-relational-mapping-with-nhibernate/</guid>
		<description><![CDATA[It&#8217;s 1:30AM, I guess it&#8217;s Saturday now. =)&#160; I&#8217;ve been furiously pounding away for the past two weeks building a new data access layer for RADE 4.0.&#160; Gotta love 12 &#8211; 18 hour days for two weeks (Good thing I love software development).&#160; My wife is away for the week, so I can continue working [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s 1:30AM, I guess it&#8217;s Saturday now. =)&#160; I&#8217;ve been furiously pounding away for the past two weeks building a new <a title="ORM data access layer" href="http://en.wikipedia.org/wiki/Data_access_layer" target="_blank" rel="tag">data access layer</a> for RADE 4.0.&#160; Gotta love 12 &#8211; 18 hour days for two weeks (Good thing I love software development).&#160; My wife is away for the week, so I can continue working these stupid hours for another week.&#160; Anyhow I&#8217;ve chosen to proceed with <a title="nHibernate ORM" href="http://www.nhibernate.com" target="_blank" rel="tag">NHibernate</a> for the time being.&#160; <a title="LINQ" href="http://msdn.microsoft.com/en-us/netframework/aa904594.aspx" target="_blank" rel="tag">LINQ</a> with the <a title="Entity Framework" href="http://blogs.msdn.com/adonet/archive/2007/04/28/ado-net-entity-framework-update.aspx" target="_blank" rel="tag">Entity Framework</a> looks really cool and I&#8217;ve used it for some small research/test projects recently, but with the lack of support for database other than SQL server &#8211; it&#8217;s not an option at this time.</p>
<p>NHibernate was a tough curve for me.&#160; Initially, I started testing code generators.&#160; After spending a significant amount of time reading, testing, and pulling out hair I came to the conclusion that <a title="nHibernate code generation is still lacking" href="http://www.ayende.com/Blog/archive/2007/03/17/On-the-sad-state-of-NHibernate-code-generation.aspx" target="_blank" rel="tag">NHibernate code generation is still not there</a>.&#160; From my experiences <a title="genwise nHibernate code generator" href="http://www.genwise.com" target="_blank" rel="tag">Genwise</a> is probably the best code generator out there right now &#8211; but its still lacking in some areas.&#160; More importantly however, I learned that code generation is not a good place to start when implementing NHibernate for the first time.&#160; There is so much going on under the hood &#8211; in my opinion you need to start off doing a reasonable size project by hand.&#160; Code generation has significant benefits, because the generated code is so similar with simple replacements it just makes a lot of sense once you wrap your head around what&#8217;s going on with NHibernate.</p>
<p>As per my <a title="ReSharper - painless class creation" href="http://www.geospecialling.com/index.php/2008/07/resharper-a-class-creating-machine/" target="_blank" rel="tag">previous post on ReSharper</a> when implementing nHibernate by hand, <a title="ReSharper" href="http://www.jetbrains.com/resharper/" target="_blank" rel="tag">ReSharper is a must have</a>.&#160; Just the other day I found a *great* ReSharper <a title="ReSharper NHibernate Plugin" href="http://nhplugin.lieser-online.de/" target="_blank" rel="tag">NHibernate Plugin</a>.&#160; When editing NHibernate HBM XML files, it does a bunch of validation right in the editor.&#160; Saves you a lot of time finding problems without having to actually run a unit test and debug sometimes cryptic error messages.</p>
<p>I bought a copy of <a href="http://www.amazon.com/gp/redirect.html?ie=UTF8&amp;location=http%3A%2F%2Fwww.amazon.com%2Fgp%2Fproduct%2F1932394923%3Fpf%5Frd%5Fm%3DATVPDKIKX0DER%26pf%5Frd%5Fs%3Dcenter-2%26pf%5Frd%5Fr%3D1MWGQH6SNCMY6AMCW734%26pf%5Frd%5Ft%3D101%26pf%5Frd%5Fp%3D278240301%26pf%5Frd%5Fi%3D507846&amp;tag=r0a0-20&amp;linkCode=ur2&amp;camp=1789&amp;creative=9325">NHibernate In Action</a><img style="margin: 0px; border-top-style: none! important; border-right-style: none! important; border-left-style: none! important; border-bottom-style: none! important" height="1" alt="" src="http://www.assoc-amazon.com/e/ir?t=r0a0-20&amp;l=ur2&amp;o=1" width="1" border="0" />.&#160; I would recommend this book to you only if you have no experience, or understanding of Object Relational Mappers.&#160; As the book stands right now, it&#8217;s not really a good developer reference and only covers really basic examples.&#160; The documents that helped me the most to get everything up and running was <a title="NHibernate FAQ" href="http://blogs.hibernatingrhinos.com/nhibernate/archive/2008/03/31/prepare-your-system-for-nhibernate.aspx" target="_blank" rel="tag">The NHibernate FAQ</a>.&#160; The NHibernate documentation is pretty cryptic.&#160; Don&#8217;t read this stuff 12 hours into your day.&#160; No amount of RedBull will give you the focus needed to make sense of it.&#160; In the first 8 hours of the day, its quite helpful.</p>
<p>I primarily work in VB.NET.&#160; For this project however, I switched to C#.&#160; Maybe now, the my colleagues at <a title="bear mountain software" href="http://www.bearmountainsoftware.com" target="_blank" rel="tag">Bear Mountain</a> will stop giving me a hard time =).&#160; Seriously though.&#160; Examples are a LOT easier to come by in C#, probably 10:1. </p>
<p>Finally, get NUnit running.&#160; I had a lot of problems using the built in Microsoft Test projects with NHibernate &#8211; so I&#8217;ll be sticking with NUnit. If you&#8217;ve never done unit testing (you know who you are) do it.&#160; Particularly in this case &#8211; its crucial.&#160; You (Again you know who you are =]) used to write simple winform apps, and put a bunch of buttons on them.&#160; Don&#8217;t do that.&#160; </p>
<p>So, if you are one of the RADE non-developer users and you read on this far.&#160; Congrats.&#160; This milestone will not directly help you with your use of RADE.&#160; However, it&#8217;s a large step forward for the underlying architecture &#8211; and you will benefit from that.&#160; </p>
<p>Well back to Visual Studio I go..</p>
<div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:dc01ed48-a1bc-49eb-a8db-414dc5dc3243" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px">Technorati Tags: <a href="http://technorati.com/tags/.NET" rel="tag">.NET</a>,<a href="http://technorati.com/tags/NHibernate" rel="tag">NHibernate</a>,<a href="http://technorati.com/tags/RADE" rel="tag">RADE</a>,<a href="http://technorati.com/tags/Resharper" rel="tag">Resharper</a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.geospecialling.com/index.php/2008/07/rade-milestone-object-relational-mapping-with-nhibernate/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>ReSharper &#8211; A Class Creating Machine</title>
		<link>http://www.geospecialling.com/index.php/2008/07/resharper-a-class-creating-machine/</link>
		<comments>http://www.geospecialling.com/index.php/2008/07/resharper-a-class-creating-machine/#comments</comments>
		<pubDate>Mon, 14 Jul 2008 13:43:00 +0000</pubDate>
		<dc:creator>Darrin Maidlow</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[ReSharper]]></category>

		<guid isPermaLink="false">http://www.geospecialling.com/index.php/2008/07/resharper-a-class-creating-machine/</guid>
		<description><![CDATA[Recently, I purchased a copy of ReSharper 4.0.&#160; I&#8217;m not even going to pretend I&#8217;ve scratched the surface of what ReSharper can do, but I can assure you it&#8217;s a massive time saver when creating classes from scratch.&#160; I&#8217;m furiously plugging away, implementing an nHibernate ORM for RADE, and to do that I needed to [...]]]></description>
			<content:encoded><![CDATA[<p>Recently, I purchased a copy of <a title="ReSharper 4.0 - A Class Creating Machine!" href="http://www.jetbrains.com/resharper/index.html" target="_blank" rel="tag">ReSharper 4.0</a>.&#160; I&#8217;m not even going to pretend I&#8217;ve scratched the surface of what ReSharper can do, but I can assure you it&#8217;s a massive time saver when creating classes from scratch.&#160; I&#8217;m furiously plugging away, implementing an <a title="nHibernate Object Relational Mapper" href="http://www.nhibernate.org" target="_blank" rel="tag">nHibernate</a> ORM for RADE, and to do that I needed to create a lot of classes pretty much from scratch (oh, and do I have a few things to say about that, but that&#8217;s for another day).&#160; Let&#8217;s look at a simple example.&#160; To get things started, create a new class.&#160; Select the folder in the solution explorer, and press Alt+Insert:</p>
<p align="center"><a href="http://www.geospecialling.com/wp-content/uploads/2010/02/image6.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="184" alt="ReSharper Class Creation" src="http://www.geospecialling.com/wp-content/uploads/2010/02/image_thumb6.png" width="227" border="0" /></a> </p>
<p align="left">Press enter and you are prompted for the class name.&#160; So Visual Studio has this of course, but this is a small example of some of the time savings you can achieve.&#160; Enter the class name and you start off with an empty class.&#160; Next, lets define a couple of private members.&#160;&#160; Let&#8217;s run with the following example.</p>
<div>
<div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   1:</span> namespace RADE.BO.Domain</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   2:</span> {</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   3:</span>     public class SampleClass</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   4:</span>     {</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   5:</span>         private Int32 _ID;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   6:</span>         private String _Description;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   7:</span>         private Int64 _BiggerInt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   8:</span>     }</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   9:</span> }</pre>
</p></div>
</div>
<p>&#160;</p>
<p>Simple class.&#160; Three member variables.&#160; Here is where the big time savers come in.&#160; Next, click Alt+Insert again and you will be prompted with the following options:</p>
<p align="center"><a href="http://www.geospecialling.com/wp-content/uploads/2010/02/image7.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="244" alt="Some ReSharper Code Generation Tools" src="http://www.geospecialling.com/wp-content/uploads/2010/02/image_thumb7.png" width="207" border="0" /></a> </p>
<p align="left">Choose Properties.&#160; You will now be given the option to select one or many fields, set the access rights, read only and virtual properties as well a bunch of others.&#160; </p>
<p align="center"><a href="http://www.geospecialling.com/wp-content/uploads/2010/02/image8.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="244" alt="ReSharper Properties Generator" src="http://www.geospecialling.com/wp-content/uploads/2010/02/image_thumb8.png" width="244" border="0" /></a> </p>
<p align="left">Execute that and all of your get/sets are defined.&#160; My one complaint is that ReSharper is not maintaining the type on the properties.&#160; My Int32&#8242;s become int, and Int64&#8242;s become long&#8217;s.&#160; Apparently this is slated to be fixed.&#160;&#160; </p>
<p align="left">So yes, this sample class is tiny, but the time savings on larger classes, or projects full of classes are significant.&#160; The last feature I&#8217;ve been using extensively in this project is the generate constructor tool.&#160; Again, a form is displayed with the defined properties, select the ones you want and boom.&#160; You can create half a dozen different constructors in seconds.&#160; I&#8217;ve created a full object model on, roughly 20 different mildly complex objects in less than an hour, around midnight on a Sunday =)</p>
<p align="left">Some of the other things ReSharper does is suggest code cleanup ideas by removing unused directives, easy execution of <a title="NUnit unit-testing framework" href="http://www.nunit.org" target="_blank" rel="tag">NUnit tests</a>, improved code completion.&#160; I encourage you to check it out, <a title="ReSharper 4.0 Download Trial" href="http://www.jetbrains.com/resharper/download/" target="_blank" rel="tag">download a ReSharper trial</a>.</p>
<div class="wlWriterEditableSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:8dcb5def-80db-43d5-9cd3-dc2a526c7b9c" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px">Technorati Tags: <a href="http://technorati.com/tags/ReSharper" rel="tag">ReSharper</a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.geospecialling.com/index.php/2008/07/resharper-a-class-creating-machine/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>ODAC/ODP.NET on Vista x64</title>
		<link>http://www.geospecialling.com/index.php/2008/07/odacodp-net-on-vista-x64/</link>
		<comments>http://www.geospecialling.com/index.php/2008/07/odacodp-net-on-vista-x64/#comments</comments>
		<pubDate>Fri, 11 Jul 2008 13:11:00 +0000</pubDate>
		<dc:creator>Darrin Maidlow</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[ODP.NET]]></category>
		<category><![CDATA[Vista]]></category>
		<category><![CDATA[x64]]></category>

		<guid isPermaLink="false">http://www.geospecialling.com/index.php/2008/07/odacodp-net-on-vista-x64/</guid>
		<description><![CDATA[Since moving to Vista x64 I&#8217;ve had a heck of a time with Oracle clients.&#160; The one thing I could not get working until tonight was ODP with Visual Studio / .NET.&#160; Finally I found a solution. First, download and install Oracle 11g ODAC and Oracle Developer Tools for Visual Studio. (Link requires registration)&#160;&#160; This [...]]]></description>
			<content:encoded><![CDATA[<p>Since moving to Vista x64 I&#8217;ve had a heck of a time with Oracle clients.&#160; The one thing I could not get working until tonight was ODP with Visual Studio / .NET.&#160; Finally I found a solution. </p>
<p>First, download and install <a title="Oracle ODAC 11g" href="http://www.oracle.com/technology/software/tech/dotnet/utilsoft.html" target="_blank" rel="tag">Oracle 11g ODAC and Oracle Developer Tools for Visual Studio</a>. (Link requires registration)&#160;&#160; This should get the 32bit stuff installed.&#160;&#160; I&#8217;m still using an Oracle 10g R2 server.&#160; You will likely need to grab a copy of the TNSnames.ora for your existing client folder and place it in the appropriate tree of the 11g product home.</p>
<p>This however is not enough to get .NET working with ODP.&#160; Go to the folder where you extracted the zip.&#160; We need to find the Oracle.DataAccess.dll.&#160; This can be found in the file named filegroup4.jar, in the stage\components\oracle.ntoledb.odp_net_2.&#160; Winrar will open .jar files if needed.&#160; Extract the Oracle.DataAscess.dll file.</p>
<p>For now, I&#8217;ve put a copy of this file in my projects lib folder.&#160; I then added a reference directly to this file from all projects that need ODP access.&#160; </p>
<p>Keep in mind &#8211; before you ship you may want to remove this reference and ensure that the .DLL file doesn&#8217;t get included in your build.&#160; This should get your Vista x64 box developing with ODP.</p>
<p>To Oracle &#8211; come on guys.&#160; Give us some Vista x64 love!</p>
<div class="wlWriterEditableSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:123a6d8a-f567-47ae-a3ec-b8a415d2eaf3" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px">Technorati Tags: <a href="http://technorati.com/tags/.NET" rel="tag">.NET</a>,<a href="http://technorati.com/tags/ODP.NET" rel="tag">ODP.NET</a>,<a href="http://technorati.com/tags/Oracle" rel="tag">Oracle</a>,<a href="http://technorati.com/tags/Vista" rel="tag">Vista</a>,<a href="http://technorati.com/tags/X64" rel="tag">X64</a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.geospecialling.com/index.php/2008/07/odacodp-net-on-vista-x64/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mapguide Enterprise &#8211; Cannot Select Items in DWF and AJAX viewer &#8211; Again</title>
		<link>http://www.geospecialling.com/index.php/2008/07/mapguide-enterprise-cannot-select-items-in-dwf-and-ajax-viewer-again/</link>
		<comments>http://www.geospecialling.com/index.php/2008/07/mapguide-enterprise-cannot-select-items-in-dwf-and-ajax-viewer-again/#comments</comments>
		<pubDate>Tue, 08 Jul 2008 04:41:00 +0000</pubDate>
		<dc:creator>Darrin Maidlow</dc:creator>
				<category><![CDATA[Mapguide]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[Dynamic Authoring]]></category>
		<category><![CDATA[FDO]]></category>

		<guid isPermaLink="false">http://www.geospecialling.com/index.php/2008/07/mapguide-enterprise-cannot-select-items-in-dwf-and-ajax-viewer-again/</guid>
		<description><![CDATA[I had another problem with Mapguide Enterprise 2009 recently pertaining to objects not being selectable.&#160; Unlike my previous post on errors caused by invalid FDO filter conditions while dynamically authoring layers, no errors were logged to the Mapguide server logs.&#160; This problem is very likely specific to the enterprise version, as I was using the [...]]]></description>
			<content:encoded><![CDATA[<p>I had another problem with Mapguide Enterprise 2009 recently pertaining to objects not being selectable.&#160; Unlike my previous post on errors caused by <a title="cannot select items with an invalid FDO where condition" href="http://www.webrade.com/blogs/darrin/Trackback.aspx?guid=70cd1029-9f82-408f-b738-f25fe743e7dd" target="_blank" rel="tag">invalid FDO filter conditions while dynamically authoring</a> layers, no errors were logged to the Mapguide server logs.&#160; This problem is very likely specific to the enterprise version, as I was using the Autodesk FDO Provider for Oracle.</p>
<p>So a data connection was created pointing to the Oracle 10g schema.&#160; This database contained a number of tables containing Lat/Long point geometry entities.&#160; I created a layer pointing to the table in question.&#160; I created a layer pointing to that data connection.&#160; At this point the entities showed up as expected in the both the DWF and the AJAX viewers.&#160; Once again, I could not select any of the entities.&#160; I checked the server logs, no errors were reported.</p>
<p>In troubleshoot mode, I tried just about everything I could think of but nothing would work.&#160; I simplified the theme, created new layers, removed all other layers from them map.&#160; Eventually I created a new layer from another table.&#160; Luckily, the entities on this layer could be selected.&#160; It must be a problem with the underlying data.&#160; On a hunch, I checked the table definitions &#8211; specifically looking at primary keys.&#160; The selectable layer had a primary key defined, the problem layer did not.&#160; (Good thing I cannot take credit for creating this source data =))</p>
<p>So, I created a primary key on the problem table, did a touch on the layer definition (opening the definition in Studio and saving it without any changes) and then left for twenty minutes.&#160; I&#8217;m thinking there is some sort of caching going within the server, and I&#8217;m not sure how it works.&#160; Immediately reloading the map after adding the primary key did not work &#8211; the entities were still not selectable.&#160; When I came back &#8211; the items in the viewers were now selectable.</p>
<p>So long story short, if again you cannot select map entities using the Autodesk FDO Provider for Oracle ensure that the source table has a primary key defined.&#160; Hopefully this saves someone some grief =)</p>
<div class="wlWriterEditableSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:529a75cc-4fc2-418c-ade5-92e424b5f309" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px">Technorati Tags: <a href="http://technorati.com/tags/FDO" rel="tag">FDO</a>,<a href="http://technorati.com/tags/Mapguide+Enterprise" rel="tag">Mapguide Enterprise</a>,<a href="http://technorati.com/tags/Mapguide+Authoring" rel="tag">Mapguide Authoring</a>,<a href="http://technorati.com/tags/Oracle+Spatial" rel="tag">Oracle Spatial</a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.geospecialling.com/index.php/2008/07/mapguide-enterprise-cannot-select-items-in-dwf-and-ajax-viewer-again/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>RADE &#8211; Build custom web applications, without writing custom code</title>
		<link>http://www.geospecialling.com/index.php/2008/06/rade-build-custom-web-applications-without-writing-custom-code/</link>
		<comments>http://www.geospecialling.com/index.php/2008/06/rade-build-custom-web-applications-without-writing-custom-code/#comments</comments>
		<pubDate>Sun, 29 Jun 2008 13:21:00 +0000</pubDate>
		<dc:creator>Darrin Maidlow</dc:creator>
				<category><![CDATA[RADE]]></category>

		<guid isPermaLink="false">http://www.geospecialling.com/index.php/2008/06/rade-build-custom-web-applications-without-writing-custom-code/</guid>
		<description><![CDATA[In response to numerous queries, I put together this post to help answer the question – what is RADE (formerly known as WebRADE). RADE is a development framework that delivers custom web applications using existing data without having to write a single line of code.&#160; RADE provides a rich set of functions including security, prompting [...]]]></description>
			<content:encoded><![CDATA[<p>In response to numerous queries, I put together this post to help answer the question – what is RADE (formerly known as WebRADE). RADE is a development framework that delivers custom web applications using existing data without having to write a single line of code.&#160; RADE provides a rich set of functions including security, prompting queries, configurable reports and charting using existing database and mapping data, without the need for expensive consultants and programmers. </p>
<p> RADE includes a configurable web mapping interface that incorporates queries, reports, charts and basic editing tools. These “components” work with the data you have stored in one or more databases (Oracle, SQL Server, Access) and can be used by any application made with RADE. Right now RADE supports MapGuide 6.x, we are in the process however of extending the mapping interface to allow RADE applications to use multiple web mapping engines including MapGuide 6.x, MapGuide Enterprise 2009 / Mapguide Open Source 2.0 and Google Maps. Other mapping engines may be implemented in the future.&#160;&#160; </p>
<p>An application made with RADE is a collection of queries, reports, charts, and of course users/groups managed by the integrated RADE security model. They are your custom solutions founded upon the bedrock that RADE provides. </p>
<p> A user with basic knowledge of their underlying database structure can design customized queries, reports, and charts in a matter of hours. Solutions can be as broad or as narrow as needed depending on the requirements of the organization. All of this work is done using RADE’s web-based administration tools.&#160;&#160; </p>
<p>Before RADE, I worked for a provider of customizable desktop GIS, automated map standardization, and facilities management solutions for both government and industry. GIS/Geospatial implementations involved a lot of customized work, specific to particular clients, and could seldom be easily reused. This is when and where I came to realize that there had to be a better way to develop solutions.&#160;&#160; </p>
<p>As RADE developed, we put it to the test and have been developing a series of standalone applications build on its framework. With RADE, we are saving time on projects which results in significant cost savings and rapid delivery for our clients.&#160;&#160; </p>
<p>Out of curiosity one day, I connected RADE to my accounting and bug-tracking databases just to see what would happen. With a little research into the underlying databases — I was able to create both queries and reports on both data sources. No map required.&#160;&#160; </p>
<p>As a developer I have projects that require me to extend RADE with more proprietary code. Take <a title="FloorView" href="http://www.floorview.com" target="_blank" rel="tag">FloorView</a> for example. FloorView is a complete vertical application built on top of RADE. It uses the RADE security/authentication system in addition to the RADE queries and reports — but is in itself a full application. This allowed us to leverage the existing functionality saving time, and money. In addition to this, FloorView appears as a RADE application when authorized users login to the site keeping all of the RADE based applications in one convenient location.&#160;&#160; </p>
<p>In addition to FloorView a number of other vertical applications have been developed on top of, or using RADE. They include solutions for address management, disaster planning and recovery, sexual predator and offender tracking, crime mapping and analysis, oil and gas lease management and service request tracking and management.&#160;&#160; </p>
<p>The best analogy I have for RADE is “Developer in a Box”.&#160; Much of the work is already done for you&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.geospecialling.com/index.php/2008/06/rade-build-custom-web-applications-without-writing-custom-code/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Easy color ranges for developers in Mapguide Studio 2009</title>
		<link>http://www.geospecialling.com/index.php/2008/06/easy-color-ranges-for-developers-in-mapguide-studio-2009/</link>
		<comments>http://www.geospecialling.com/index.php/2008/06/easy-color-ranges-for-developers-in-mapguide-studio-2009/#comments</comments>
		<pubDate>Thu, 26 Jun 2008 00:30:00 +0000</pubDate>
		<dc:creator>Darrin Maidlow</dc:creator>
				<category><![CDATA[Mapguide]]></category>
		<category><![CDATA[Colors]]></category>

		<guid isPermaLink="false">http://www.geospecialling.com/index.php/2008/06/easy-color-ranges-for-developers-in-mapguide-studio-2009/</guid>
		<description><![CDATA[Typically developers are color stupid (myself included).&#160; I&#8217;ve seen some really really ugly maps.&#160; I&#8217;ve created some really really ugly maps.&#160; With Mapguide 6.5 in particular &#8211; I gave up on trying to create visually appealing maps.&#160; The 255 colors, in the ranges defined I just could not do it. With Mapguide Enterprise &#8211; I [...]]]></description>
			<content:encoded><![CDATA[<p>Typically developers are color stupid (myself included).&#160; I&#8217;ve seen some really really ugly maps.&#160; I&#8217;ve created some really really ugly maps.&#160; With Mapguide 6.5 in particular &#8211; I gave up on trying to create visually appealing maps.&#160; The 255 colors, in the ranges defined I just could not do it.</p>
<p>With Mapguide Enterprise &#8211; I may have found a solution.&#160; Recently I created a themed layer for municipalities.&#160; There were twenty five municipalities in a single spatial table.&#160; Each municipality had a unique code.&#160;&#160; In an effort to bang these off quickly I added the twenty five municipalities and the filter condition.&#160;&#160; Next I entered the twenty five legend labels.</p>
<p>Here is the developer friendly method I came up with creating a somewhat visually appealing color range.&#160; In the first condition I set first set the transparency to 50%.&#160; The transparency affects the resulting color.&#160; Select the color combo and choose &quot;More Colors&quot;.&#160; This should bring up the custom color dialog.&#160; First, select one of the &quot;Custom Color&quot; boxes and set the Hue to 0. Next I created a color I wanted to use as my starting shade.</p>
<p>At this point, I saved the color using the &quot;Add to Custom Colors&quot; button.&#160; Your form should look something like this:</p>
<p align="center"><a href="http://www.geospecialling.com/wp-content/uploads/2010/02/image4.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="203" alt="Mapguide Color Dialog" src="http://www.geospecialling.com/wp-content/uploads/2010/02/image_thumb4.png" width="244" border="0" /></a> </p>
<p align="left">Click OK a couple of times and your first condition should be set.&#160; Next I selected my next condition, and clicked the color combo again choosing &quot;More Colors&quot; once again.&#160; This time, select the saved custom color and it should reset the form with the previously saved shade.&#160; At this point I incremented the Hue by 20 to 20.&#160; Click ok a couple of times and repeat.&#160; I was not re-saving my shade, though I suppose that might have made sense.&#160; Each time you repeat this process increase the hue by 20 until you hit the max of 239.</p>
<p align="left">If needed, and you do hit the max hue start the process over starting with another complimentary base shade with a hue of 0. Using a hue increment of 40 might have resulted in more distinct colorations and may be a good idea.</p>
<p align="left">I think it turned out OK, but then again as I stated earlier &#8211; I&#8217;m color stupid.&#160; </p>
<p align="center"><a href="http://www.geospecialling.com/wp-content/uploads/2010/02/image5.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="175" alt="Resulting Color Range" src="http://www.geospecialling.com/wp-content/uploads/2010/02/image_thumb5.png" width="244" border="0" /></a> </p>
<div class="wlWriterEditableSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:5e1c745d-30a3-4d92-acc7-1ab11240cbd0" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px">Technorati Tags: <a href="http://technorati.com/tags/Mapguide" rel="tag">Mapguide</a>,<a href="http://technorati.com/tags/Mapguide+Authoring" rel="tag">Mapguide Authoring</a>,<a href="http://technorati.com/tags/Mapguide+Studio" rel="tag">Mapguide Studio</a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.geospecialling.com/index.php/2008/06/easy-color-ranges-for-developers-in-mapguide-studio-2009/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Convert Mapguide 6.5 colors to Mapguide Enterprise/Open Source/AutoCAD RGB equivalents</title>
		<link>http://www.geospecialling.com/index.php/2008/06/convert-mapguide-6-5-colors-to-mapguide-enterpriseopen-sourceautocad-rgb-equivalents/</link>
		<comments>http://www.geospecialling.com/index.php/2008/06/convert-mapguide-6-5-colors-to-mapguide-enterpriseopen-sourceautocad-rgb-equivalents/#comments</comments>
		<pubDate>Wed, 25 Jun 2008 05:59:00 +0000</pubDate>
		<dc:creator>Darrin Maidlow</dc:creator>
				<category><![CDATA[Mapguide]]></category>
		<category><![CDATA[6.5]]></category>

		<guid isPermaLink="false">http://www.geospecialling.com/index.php/2010/02/convert-mapguide-6-5-colors-to-mapguide-enterpriseopen-sourceautocad-rgb-equivalents/</guid>
		<description><![CDATA[I&#8217;ve been authoring some test data for my ongoing Mapguide Enterprise \ MGOS work.&#160; For consistency with my existing tabular test data, I need to migrate some Mapguide 6.5 maps over to Enterprise.&#160; This is quite the chore.&#160; I really wish Autodesk would have kept updating the Mapguide 6.5 Data Migration Tool and bring that [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been authoring some test data for my ongoing Mapguide Enterprise \ MGOS work.&#160; For consistency with my existing tabular test data, I need to migrate some Mapguide 6.5 maps over to Enterprise.&#160; This is quite the chore.&#160; I <strong><em>really</em></strong> wish Autodesk would have kept updating the Mapguide 6.5 <a title="Mapguide 6.5 to 2007 Data Migration Tool" href="http://usa.autodesk.com/adsk/servlet/index?siteID=123112&amp;id=7429087&amp;linkID=9242099" target="_blank" rel="tag">Data Migration Tool</a> and bring that up to support a current release of Mapguide.&#160; Even with the tools flaws, it was still a good start on migration &#8211; but oh well, that&#8217;s another rant completely..and maybe another side project that I just don&#8217;t have time for =)</p>
<p>Anyhow, I wanted to share the <a title="Autodesk Mapguide 6.5 RGB color conversions" href="http://www.dot.co.pima.az.us/gis/mgdev/mgcolors/" target="_blank" rel="tag">Pima County Mapguide Color Chart</a>.&#160; I can&#8217;t believe I hadn&#8217;t found this page sooner.&#160; A fantastic, and crucial reference.&#160;&#160; Tons of useful settings for the chart generator.&#160; Show the hex codes for using the colors in HTML, Decimal RGB values for Mapguide Enterprise \ Autocad.&#160; The colors under the Decimal heading are the RGB values &#8211; ordered in Red, Green, Blue.&#160; I&#8217;ve been using the chart in <a title="Autodesk Mapguide 6.5 Hex and RGB colors" href="http://www.dot.co.pima.az.us/gis/mgdev/mgcolors/chart.cfm?hex=yes&amp;decimal=yes&amp;crossref=yes&amp;insert=yes&amp;collength=60" target="_blank" rel="tag">this config</a>.</p>
<p>Thanks Pima County.&#160; Hopefully, you guys were able to come up with a programmatic method of creating this chart.&#160; I&#8217;d hate to be the guy tasked with &#8216;eyedropping&#8217; all these colors using Photoshop or something.</p>
<p>The decimal values by the way should work with AutoCAD too.</p>
<p>&#160;</p>
<div class="wlWriterEditableSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:6ff5e320-5388-400b-a832-82f2aaeeaebe" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px">Technorati Tags: <a href="http://technorati.com/tags/Mapguide+Colors" rel="tag">Mapguide Colors</a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.geospecialling.com/index.php/2008/06/convert-mapguide-6-5-colors-to-mapguide-enterpriseopen-sourceautocad-rgb-equivalents/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Upgrading SourceGear Vault Server to new x64 release on Windows 2003 x64/IIS6</title>
		<link>http://www.geospecialling.com/index.php/2008/06/upgrading-sourcegear-vault-server-to-new-x64-release-on-windows-2003-x64iis6/</link>
		<comments>http://www.geospecialling.com/index.php/2008/06/upgrading-sourcegear-vault-server-to-new-x64-release-on-windows-2003-x64iis6/#comments</comments>
		<pubDate>Sat, 14 Jun 2008 05:11:00 +0000</pubDate>
		<dc:creator>Darrin Maidlow</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[SourceGear Vault]]></category>

		<guid isPermaLink="false">http://www.geospecialling.com/index.php/2008/06/upgrading-sourcegear-vault-server-to-new-x64-release-on-windows-2003-x64iis6/</guid>
		<description><![CDATA[SourceGear recently released a 64 bit native built of the Vault server.&#160; I&#8217;m on a real x64 kick lately and really enjoy not seeing *32 beside my processes in task manager.&#160; Vault is one of the best source control providers out there, and you cannot beat the price either.&#160; It is core to my professional [...]]]></description>
			<content:encoded><![CDATA[<p><a title="SourceGear - awesome Source Control" href="http://www.sourcegear.com" target="_blank" rel="tag">SourceGear</a> recently released a 64 bit native built of the <a title="SourceGear Vault Source Control Client" href="http://www.sourcegear.com/vault/index.html" target="_blank" rel="tag">Vault</a> server.&#160; I&#8217;m on a real x64 kick lately and really enjoy not seeing *32 beside my processes in task manager.&#160; Vault is one of the best source control providers out there, and you cannot beat the price either.&#160; It is core to my professional life.&#160; Next to Visual Studio &#8211; it is one of the most important pieces of software I use. So, did a quick backup of my databases, un-installed the old server and installed the shiny new x64 code.&#160; Problems!</p>
<p>First off, my server was running IIS in 32 bit mode.&#160; This was required to run the previous releases of Vault.&#160; Once the install was complete, I started a dos window and set IIS back to 64 bit:</p>
<p>cscript.exe C:\Inetpub\AdminScripts\adsutil.vbs set W3SVC/AppPools/Enable32BitAppOnWin64 0</p>
<p>Then I ran an iisreset.</p>
<p>When I fired up my browser to check the vault service, there was a problem.&#160; All it would display was &quot;Service Unavailable&quot;.&#160; At this point, even html files were not being served out.&#160; Did a search on the Sourcegear forums and couldn&#8217;t find anything.&#160; It&#8217;s been a long week and I was not firing on all cylinders &#8211; so I called up the support team.&#160; (Good thing I renewed my maintenance, oh, this morning =D).&#160; At this point Beth from SourceGear and I brainstormed through the situation and came to the following conclusions:</p>
<p>I was the first customer to call with x64 problems.&#160; Yay for being first!</p>
<p>In IIS Manager, the application pool was disabled.&#160; A check of the event logs showed the following information:</p>
<p>Source: W3SVC-WP</p>
<p>Event ID: 2268</p>
<p>Could not load all ISAPI filters for site/service.&#160; Therefore startup aborted.</p>
<p>This prompted a check the web service extensions.&#160; Sure enough, there was a web service extension there configured for ASP.NET pointing to the 32 Bit assemblies.&#160; I prohibited this extension, and added a new one pointing to the 64 bit aspnet_isapi.dll.&#160; Re-enable the application pool and load a page in the browser &#8211; still nothing.</p>
<p>Finally &#8211; the last step needed to get everything serving properly was to run the following from the x64 framework folder:</p>
<p>c:\windows\microsoft.net\framework64\v2.0.50727\aspnet_regiis -I -enable</p>
<p>So in summary the following steps should get your Vault server upgraded and running in native x64.&#160; Bear in mind, my server is ONLY running Vault and these steps will break ASP.NET 1.1 applications (and lower) and possibly other code you might have running on the server.</p>
<div>
<div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   1:</span> Backup SGVault and SGMaster databases (did I even need to include this?)</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   2:</span> Un-install the 32 bit Vault server</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   3:</span> Install the 64 bit Vault server</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   4:</span> Run cscript.exe C:\Inetpub\AdminScripts\adsutil.vbs set W3SVC/AppPools/Enable32BitAppOnWin64 0</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   5:</span> Run c:\windows\microsoft.net\framework64\v2.0.50727\aspnet_regiis -I -enable</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   6:</span> Start IIS Manager. </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   7:</span> Double check the vault virtual directories to ensure the ASP.NET version is set to v2.0</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   8:</span> Prohibit the ASP.Net 32 bit isapi web service extension</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   9:</span> Add the ASP.Net 64 bit isapi web service extension</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  10:</span> run IISReset.exe</pre>
</p></div>
</div>
<p>&#160;</p>
<p>mmmm x64 goodness.&#160; Thanks again to Beth for helping me work through this =)</p>
<div class="wlWriterEditableSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:8323e946-73f1-411b-99ef-925d591a4a8d" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px">Technorati Tags: <a href="http://technorati.com/tags/IIS+6" rel="tag">IIS 6</a>,<a href="http://technorati.com/tags/x64" rel="tag">x64</a>,<a href="http://technorati.com/tags/ASP.NET" rel="tag">ASP.NET</a>,<a href="http://technorati.com/tags/SourceGear+Vault" rel="tag">SourceGear Vault</a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.geospecialling.com/index.php/2008/06/upgrading-sourcegear-vault-server-to-new-x64-release-on-windows-2003-x64iis6/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Implementing Remotesoft .NET Protector using MSBuild</title>
		<link>http://www.geospecialling.com/index.php/2008/05/implementing-remotesoft-net-protector-using-msbuild/</link>
		<comments>http://www.geospecialling.com/index.php/2008/05/implementing-remotesoft-net-protector-using-msbuild/#comments</comments>
		<pubDate>Fri, 30 May 2008 22:02:00 +0000</pubDate>
		<dc:creator>Darrin Maidlow</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Remotesoft Protector]]></category>

		<guid isPermaLink="false">http://www.geospecialling.com/index.php/2008/05/implementing-remotesoft-net-protector-using-msbuild/</guid>
		<description><![CDATA[RADE has grown significantly in size and complexity over the past four years.&#160; What started off as a relatively simple classic ASP application has grown to 8+ .NET assemblies, with numerous 3rd party DLL references.&#160; Current R&#38;D is going to further increase the size of the build. In addition to that, we&#8217;ve developed several vertical [...]]]></description>
			<content:encoded><![CDATA[<p>RADE has grown significantly in size and complexity over the past four years.&#160; What started off as a relatively simple classic ASP application has grown to 8+ .NET assemblies, with numerous 3rd party DLL references.&#160; Current R&amp;D is going to further increase the size of the build. In addition to that, we&#8217;ve developed several vertical products on top of RADE which need to be updated as new revisions of the base framework are completed.</p>
<p>It&#8217;s come to the point where I need to get to a one step build.&#160; The first move in here was to implement <a title="Remotesoft .NET assembly protector" href="http://www.remotesoft.com/salamander/protector.html" target="_blank" rel="tag">Remotesoft Protector</a> in my build process as protecting the assemblies ended up being one of the bigger pains in the butt when building.</p>
<p>So to kick things off, we need to work with MSBuild a little bit.&#160; Originally, I tried using the &lt;exec&gt; call from MSBuild.&#160; This didn&#8217;t give me the flexibility to loop through the files being generated.&#160; So I started writing a custom build task.&#160; Please read this <a title="msdn custom build task" href="http://blogs.msdn.com/msbuild/archive/2006/01/21/515834.aspx" target="_blank" rel="tag">great article</a> on building custom tasks if you are new to this.</p>
<p>In summary, I defined a number of get/set methods for the globals I wanted the build engine to set, and in the Execute function I set it up to loop through the passed .DLL files, and execute Protector on each.&#160; After the dlls were processed, they were moved out of the protected folder and the protected folder was removed.&#160; If you are having problems getting your task running, check out this article on <a title="debugging custom MSBuild tasks" href="http://blogs.msdn.com/msbuild/archive/2005/09/28/474951.aspx" target="_blank" rel="tag">debugging&#160; custom MSBuild tasks</a>.</p>
<p>RADE uses a Visual Studio 2008 <a title="Web Deployment Projects are the awesome." href="http://weblogs.asp.net/scottgu/archive/2008/01/28/vs-2008-web-deployment-project-support-released.aspx" target="_blank" rel="tag">Web Deployment Project</a> to deploy all of the files on build, so to implement the new task we need to do some editing in the project.&#160; Open the project either with a text editor, or in Visual Studio by a right click on the project and choosing &quot;Open Project File&quot;.&#160; This part is quite simple.&#160; First ensure that the assembly generated by building your task is in the same folder as the web deployment .wdproj file.&#160; Next we need to add a line near the top of the web deployment project:</p>
<div>
<div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   1:</span> <span style="color: #0000ff">&lt;</span><span style="color: #800000">Project</span> <span style="color: #ff0000">DefaultTargets</span><span style="color: #0000ff">=&quot;Build&quot;</span> <span style="color: #ff0000">xmlns</span><span style="color: #0000ff">=&quot;http://schemas.microsoft.com/developer/msbuild/2003&quot;</span> <span style="color: #ff0000">ToolsVersion</span><span style="color: #0000ff">=&quot;3.5&quot;</span><span style="color: #0000ff">&gt;</span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   2:</span>     <span style="color: #0000ff">&lt;</span><span style="color: #800000">UsingTask</span> <span style="color: #ff0000">TaskName</span><span style="color: #0000ff">=&quot;Landor.Deploy.BuildTasks.RemoteSoftProtector&quot;</span> <span style="color: #ff0000">AssemblyFile</span><span style="color: #0000ff">=&quot;Landor.Deploy.Buildtasks.dll&quot;</span><span style="color: #0000ff">/&gt;</span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   3:</span>     <span style="color: #0000ff">&lt;</span><span style="color: #800000">PropertyGroup</span><span style="color: #0000ff">&gt;</span>...</pre>
</p></div>
</div>
<p>Here we point the UsingTask call to both the namespace and class of our protector code, as well assembly.&#160; One more change to make.&#160; Scroll to the end of the project and you should see a number of empty &lt;Target&gt; tags.&#160; We need to add some code to the Name=&quot;Afterbuild&quot; tag.</p>
<div>
<div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   1:</span> <span style="color: #0000ff">&lt;</span><span style="color: #800000">Target</span> <span style="color: #ff0000">Name</span><span style="color: #0000ff">=&quot;AfterBuild&quot;</span><span style="color: #0000ff">&gt;</span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   2:</span>         <span style="color: #0000ff">&lt;</span><span style="color: #800000">ItemGroup</span><span style="color: #0000ff">&gt;</span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   3:</span>             <span style="color: #0000ff">&lt;</span><span style="color: #800000">DLLFiles</span> <span style="color: #ff0000">Include</span><span style="color: #0000ff">=&quot;$(MSBuildProjectDirectory)\Release\Bin\*.dll&quot;</span><span style="color: #0000ff">/&gt;</span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   4:</span>         <span style="color: #0000ff">&lt;/</span><span style="color: #800000">ItemGroup</span><span style="color: #0000ff">&gt;</span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   5:</span>         <span style="color: #0000ff">&lt;</span><span style="color: #800000">RemoteSoftProtector</span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   6:</span>             <span style="color: #ff0000">Files</span><span style="color: #0000ff">=&quot;@(DLLFiles)&quot;</span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   7:</span>             <span style="color: #ff0000">ProtectorEXEPath</span><span style="color: #0000ff">=&quot;C:\Program Files (x86)\Remotesoft\Protector\bin\protector.exe&quot;</span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   8:</span>             <span style="color: #ff0000">ProtectorParams</span><span style="color: #0000ff">=&quot;-neutral -string -cctor -clrversion v2.0.50727&quot;</span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   9:</span>             <span style="color: #ff0000">BinFolder</span><span style="color: #0000ff">=&quot;$(MSBuildProjectDirectory)\Release\Bin\&quot;</span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  10:</span>             <span style="color: #ff0000">Exclusions</span><span style="color: #0000ff">=&quot;AjaxControlToolkit.dll;Microsoft.Xml.Schema.Linq.dll;ZedGraph.Web.dll&quot;</span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  11:</span>         <span style="color: #0000ff">/&gt;</span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  12:</span> <span style="color: #0000ff">&lt;/</span><span style="color: #800000">Target</span><span style="color: #0000ff">&gt;</span></pre>
</p></div>
</div>
<p>&#160;</p>
<p>Two things occur here.&#160; First, in the &lt;Itemgroup&gt; tag we are initializing a variable called DLLFiles, and it&#8217;s getting all the .DLL files in the project&#8217;s Release\Bin build folder.&#160;&#160; Note that this process creates a semi-colon delimited list of full paths and files.</p>
<p>The next thing that occurs is actually calling the build task using the &lt;RemoteSoftProtector&gt; tag.&#160; The tag name should/must match the name of the build tasks&#8217; class.&#160; Within this tag, we are setting all of the defined public properties, using the same name as those defined with our build task class.</p>
</p>
<p>This concludes a day of fun learning how MSBuild and custom tasks work.&#160; Hopefully it helps you out a bit.&#160; Bugs or comments, let me know.</p>
<div class="wlWriterEditableSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:14c5a8f5-a67c-42a5-8857-65c17a4d30e2" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px">Technorati Tags: <a href="http://technorati.com/tags/.NET" rel="tag">.NET</a>,<a href="http://technorati.com/tags/Code+Protection" rel="tag">Code Protection</a>,<a href="http://technorati.com/tags/MSBuild" rel="tag">MSBuild</a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.geospecialling.com/index.php/2008/05/implementing-remotesoft-net-protector-using-msbuild/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>.NET Code Protection &#8211; Remotesoft Protector to the Rescue!</title>
		<link>http://www.geospecialling.com/index.php/2008/05/net-code-protection-remotesoft-protector-to-the-rescue/</link>
		<comments>http://www.geospecialling.com/index.php/2008/05/net-code-protection-remotesoft-protector-to-the-rescue/#comments</comments>
		<pubDate>Sun, 25 May 2008 07:53:00 +0000</pubDate>
		<dc:creator>Darrin Maidlow</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Code Protection]]></category>

		<guid isPermaLink="false">http://www.geospecialling.com/index.php/2008/05/net-code-protection-remotesoft-protector-to-the-rescue/</guid>
		<description><![CDATA[When .NET based assemblies go out the door, it&#8217;s incredibly simple for others to get access to your code.&#160;&#160; Download Lutz Roeder&#8217;s Reflector and take a look at what some of your assemblies have to say.&#160; The code visible is likely not going to be anywhere near as elegant as the original.&#160; The comments will [...]]]></description>
			<content:encoded><![CDATA[<p>When .NET based assemblies go out the door, it&#8217;s incredibly simple for others to get access to your code.&#160;&#160; Download <a title="Lutz Roeder&#39;s Reflector" href="http://www.aisto.com/roeder/dotnet/" target="_blank" rel="tag">Lutz Roeder&#8217;s Reflector</a> and take a look at what some of your assemblies have to say.&#160; The code visible is likely not going to be anywhere near as elegant as the original.&#160; The comments will be gone.&#160; The gist of what you are doing will be there.&#160; If you would prefer that your work be a little tougher to get at, read on.</p>
<p>Obfuscation was one of my first answers to this problem.&#160; An obfuscator ships with Visual Studio Pro, free and there are many available on the market.&#160; Obfuscation just didn&#8217;t do it for me.&#160; I once helped a customer troubleshoot problems with one of their software solutions from an unnamed vendor using Reflector and walking through the obfuscated code.&#160; This was really a painful experience, it does make it harder to figure out what is going on &#8211; but a friend of mine suggested a product that takes code protection one step further.</p>
<p>Hello <a title="Remotesoft Protector - protect your code" href="http://www.remotesoft.com/salamander/protector.html" target="_blank" rel="tag">Remotesoft Protector</a>.&#160; This product is pretty cool.&#160; If you purchase the protector product you will receive three components.&#160; Salamander .NET Decompiler, .NET Obfuscator, and .NET Protector.&#160; Initially I was processing my assemblies with both the obfuscator and the protector.&#160;&#160; Now a days, I pretty much only run my assemblies through the protector.</p>
<p>Once you&#8217;ve processed an assembly with the protector and you open it up in reflector things are going to look a little different.&#160; Here is a little before and after action for you:</p>
<p align="center"><a href="http://www.geospecialling.com/wp-content/uploads/2010/02/image2.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="478" alt="Code as disassembled by Reflector" src="http://www.geospecialling.com/wp-content/uploads/2010/02/image_thumb2.png" width="644" border="0" /></a>&#160;</p>
<p align="left">Now lets take a look at the same code, but after being protected:</p>
<p align="center"><a href="http://www.geospecialling.com/wp-content/uploads/2010/02/image3.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="73" alt="image" src="http://www.geospecialling.com/wp-content/uploads/2010/02/image_thumb3.png" width="244" border="0" /></a> </p>
<p align="left">That&#8217;s it.&#160; Protector has made all your code go bye bye =)&#160; What&#8217;s happened here?&#160; As I understand it, Protector compiles all your managed .NET code into native code.&#160; So, yes, is it possible to disassemble native binaries.&#160; The difference here is the height of the bar &#8211; with plain .NET assemblies even my grand mother could get my code.&#160; Reverse engineering a native assembly is a different story.&#160; If someone with the skill to do that wants your code &#8211; well you must be writing some damn fine code.&#160; It would probably be easier for that kind of person to write it from scratch =)</p>
<p align="left">I&#8217;ve been working on increasing my <a title="The Joel Test - 12 Steps to Better Code" href="http://www.joelonsoftware.com/articles/fog0000000043.html" target="_blank" rel="tag">Joel Test</a> score lately.&#160; One of my biggies is the one step build for RADE.&#160; That sentence really doesn&#8217;t do the task justice.&#160; The first step I&#8217;m tackling in the one step build is automating the process of protecting my .NET assemblies.&#160; I could not find any resources on doing with with MSBuild.&#160; Once I get it working, I&#8217;ll post some code.</p>
<p align="left">All that said, I highly recommend you check out Protector if code protection is your thing.&#160; The price is a little bit steep at 1899$ for 1-5 developers &#8211; but how much money have you invested in that one little DLL or EXE file?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.geospecialling.com/index.php/2008/05/net-code-protection-remotesoft-protector-to-the-rescue/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Visual Studio 2008 Product Comparison</title>
		<link>http://www.geospecialling.com/index.php/2008/05/visual-studio-2008-product-comparison/</link>
		<comments>http://www.geospecialling.com/index.php/2008/05/visual-studio-2008-product-comparison/#comments</comments>
		<pubDate>Sun, 25 May 2008 05:51:00 +0000</pubDate>
		<dc:creator>Darrin Maidlow</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://www.geospecialling.com/index.php/2008/05/visual-studio-2008-product-comparison/</guid>
		<description><![CDATA[Came across a really great comparison of the various Visual Studio 2008 releases today.&#160; Now if only I could come up with the ten grand Microsoft wants for a Team Suite license =[ Technorati Tags: Visual Studio]]></description>
			<content:encoded><![CDATA[<p>Came across a really <a title="Visual Studio 2008 version comparison" href="http://msdn.microsoft.com/en-us/vstudio/products/cc149003.aspx" target="_blank" rel="tag">great comparison</a> of the various Visual Studio 2008 releases today.&#160; Now if only I could come up with the ten grand Microsoft wants for a Team Suite license =[</p>
<div class="wlWriterEditableSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:36e00d69-4bd6-4014-88cf-4b5b5b034754" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px">Technorati Tags: <a href="http://technorati.com/tags/Visual+Studio" rel="tag">Visual Studio</a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.geospecialling.com/index.php/2008/05/visual-studio-2008-product-comparison/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dynamic Authoring in Mapguide Enterprise &#8211; Before the Viewer has Loaded</title>
		<link>http://www.geospecialling.com/index.php/2008/05/dynamic-authoring-in-mapguide-enterprise-before-the-viewer-has-loaded/</link>
		<comments>http://www.geospecialling.com/index.php/2008/05/dynamic-authoring-in-mapguide-enterprise-before-the-viewer-has-loaded/#comments</comments>
		<pubDate>Thu, 22 May 2008 05:38:00 +0000</pubDate>
		<dc:creator>Darrin Maidlow</dc:creator>
				<category><![CDATA[Mapguide]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[Dynamic Authoring]]></category>

		<guid isPermaLink="false">http://www.geospecialling.com/index.php/2008/05/dynamic-authoring-in-mapguide-enterprise-before-the-viewer-has-loaded/</guid>
		<description><![CDATA[As a follow up to my previous post on Creating .Net objects for Mapguide XML Schema Definitions, I wanted to share some examples of using these new objects, so I created this example of doing some dynamic authoring before the map viewer has loaded.&#160; Currently, all of my work is done using Mapguide Enterprise 2009, [...]]]></description>
			<content:encoded><![CDATA[<p>As a follow up to my previous post on <a title="Creating .Net objects for Mapguide XML Schema Definitions" href="http://www.geospecialling.com/index.php/2008/05/creating-net-objects-for-mapguide-xml-schema-definitions-xsd-using-linq/" target="_blank" rel="tag">Creating .Net objects for Mapguide XML Schema Definitions</a>, I wanted to share some examples of using these new objects, so I created this example of doing some dynamic authoring before the map viewer has loaded.&#160; Currently, all of my work is done using Mapguide Enterprise 2009, however this code should work using Mapguide Open 2.0 as well.&#160; I believe I had this code working using Mapguide 2008 initially, and then migrated it over to the 2009 platform.&#160; Feel free to give that shot if you are still using Mapguide 2008.&#160; Some changes would be needed in the .Net objects project &#8211; to remove 2009 specific XSD files and possibly reference some of the older XSDs for things like layers.</p>
<p>One of my first tasks with Mapguide Enterprise was to build a map on the fly.&#160; There were examples for adding layers to the map programmatically after the viewer had loaded, but this didn&#8217;t match the desired flow of my application.&#160; Also, having come from years of Mapguide 6.5 and lower -&#160; I was trying to avoid as much client side automation as possible.&#160; The new <a title="Mapguide Open Source Web Tier API" href="http://mapguide.osgeo.org/files/mapguide/docs/webapi/index.htm" target="_blank" rel="tag">Web Tier API</a> was one of the things that excited me the most about Mapguide Enterprise / Mapguide Open Source</p>
<p>I&#8217;ve pasted the full, commented code here, as well as attached a solution containing the two projects needed.&#160; Note these projects are Visual Studio 2008 projects.&#160; Please feel free to use this code for learning purposes.&#160; If it helps you out, link back to this article =)</p>
<p>If you choose instead to create a new project, be sure to add a project or DLL reference to the OSGeo.Mapguide.Objects.dll file we created previously .&#160; The project I&#8217;ve included here contains both the sample Web Application project, as well as a copy of the .NET objects for Mapguide project.&#160; It should be almost ready for the running.&#160; Also ensure there is a reference to the Microsoft.XML.Schema.Linq namespace added to the project.&#160; Also copy the required .DLL files from the Autodesk provided .NET viewer\bin folder to the web projects bin folder.&#160; I did not include these here as I was not sure of the legality of doing so.</p>
<p>First load up the <a title="Sheboyban Mapguide Sample Data" href="http://download.osgeo.org/mapguide/releases/2.0.0/samples/Sheboygan.mgp" target="_blank" rel="tag">Sheboygan package</a> into your Mapguide repository.&#160; For the purposes of this example, open the Map definition in Mapguide Studio (or equivalent) and remove all the layers and layer groups from the map.&#160; If you forget to do this you will get a Duplicate Object error when you load up the map.&#160; Once that is done, you are ready to try out the code.</p>
<div class="wlWriterEditableSmartContent" id="scid:fb3a1972-4489-4e52-abe7-25a00bb07fdf:7bb82de1-2f5f-472e-a241-e5709454be7c" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px">
<p> <a href="http://www.geospecialling.com/wp-content/uploads/2010/02/MGEDynamicAuthoringSample.zip" target="_blank">Full Project and Solution with source</a></p>
</div>
<p>You should be able top unzip the zip and open the MGEDynamicAuthoringSample.sln file with Visual Studio.&#160; Pretty much the only thing you may need to change are the constants to match your machine specific items:</p>
<p>&#160;</p>
<div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, &#39;Courier New&#39;, courier, monospace; background-color: #f4f4f4">
<div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   1:</span> <span style="color: #006080">'set some contants up - webconfig.ini, map viewer url, Map, Layout and Layer locatinos</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   2:</span> Private Const gszWebConfig As String = &quot;C:\inetpub\MapGuideEnterprise2009\WebServerExtensions\www\webconfig.ini&quot;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   3:</span> Private Const gszViewerUrl As String = &quot;http://localhost/mapguide2009/mapviewerdwf&quot;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   4:</span> Private Const gszMapResID As String = &quot;Library://Samples/Sheboygan/Maps/Sheboygan.MapDefinition&quot;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   5:</span> Private Const gszLayerFolderResID As String = &quot;Library://Samples/Sheboygan/Layers.Folder&quot;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   6:</span> Private Const gszLayoutResID As String = &quot;Library://Samples/Sheboygan/Layouts/SheboyganAsp.WebLayout&quot;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   7:</span> '</span>lets run with Administrator <span style="color: #0000ff">for</span> noew to eliminate permission problems.  Update your password <span style="color: #0000ff">as</span> needed, or specify your</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   8:</span> 'own credentials <span style="color: #0000ff">if</span> you are comfortable with setting up repository permissions.</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   9:</span> Private Const gszMGUser As String = <span style="color: #006080">&quot;Administrator&quot;</span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  10:</span> Private Const gszMGPass As String = <span style="color: #006080">&quot;admin&quot;</span></pre>
</p></div>
</div>
<p>
  <br />Once you&#8217;ve changed all the needed settings, you should be good to go.&#160; Run the code in Visual Studio and you should now see a map similar to the default Sheboygan map.&#160; The key difference is that all of the layers will exist within the layer group we created programmatically.</p>
<p><strong>Commented Codebehind:</strong></p>
<div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, &#39;Courier New&#39;, courier, monospace; height: 236px; background-color: #f4f4f4">
<div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   1:</span> Imports OSGeo.MapGuide</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   2:</span> <span style="color: #006080">'we still need to import and use system.xml, but don'</span>t really need to use many parts of the XML</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   3:</span> <span style="color: #006080">'functionality =)</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   4:</span> Imports System.Xml</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   5:</span> Partial Public Class _Default</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   6:</span>     '</span><span style="color: #006080">' '</span>So <span style="color: #0000ff">for</span> <span style="color: #0000ff">this</span> example, we<span style="color: #006080">'re going to use the sheboygan sample package available from </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   7:</span>     '</span><span style="color: #006080">' '</span> http:<span style="color: #008000">//mapguide.osgeo.org/download/releases/2.0.x-samples.  Be sure to grab both the </span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   8:</span>     <span style="color: #006080">''</span> <span style="color: #006080">' dotnetviewstample.zip as well as the sheboygan.mgp.  Import the package using</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   9:</span>     '</span><span style="color: #006080">' '</span> the mapguide site administrator.  I<span style="color: #006080">'ve tried to use the default resource paths</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  10:</span>     '</span><span style="color: #006080">' '</span> but some tweaking of map will be needed</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  11:</span>     <span style="color: #006080">''</span> <span style="color: #006080">' </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  12:</span>     '</span><span style="color: #006080">' '</span> Open the map definition <span style="color: #0000ff">in</span> Studio, and remove all the layers from Samples/Sheboygan/Maps/Sheboygan.MapDefinition </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  13:</span>     <span style="color: #006080">''</span> <span style="color: #006080">' we'</span>re going to add them dynamically    </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  14:</span>&#160; </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  15:</span>     Inherits System.Web.UI.Page</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  16:</span>&#160; </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  17:</span>     <span style="color: #006080">'set some contants up - webconfig.ini, map viewer url, Map, Layout and Layer locatinos</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  18:</span>     Private Const gszWebConfig As String = &quot;C:\inetpub\MapGuideEnterprise2009\WebServerExtensions\www\webconfig.ini&quot;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  19:</span>     Private Const gszViewerUrl As String = &quot;http://localhost/mapguide2009/mapviewerdwf&quot;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  20:</span>     Private Const gszMapResID As String = &quot;Library://Samples/Sheboygan/Maps/Sheboygan.MapDefinition&quot;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  21:</span>     Private Const gszLayerFolderResID As String = &quot;Library://Samples/Sheboygan/Layers.Folder&quot;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  22:</span>     Private Const gszLayoutResID As String = &quot;Library://Samples/Sheboygan/Layouts/SheboyganAsp.WebLayout&quot;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  23:</span>     Private Const gszMGUser As String = &quot;Administrator&quot;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  24:</span>     Private Const gszMGPass As String = &quot;admin&quot;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  25:</span>&#160; </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  26:</span>     '</span><span style="color: #006080">''</span> &lt;summary&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  27:</span>     <span style="color: #006080">''</span><span style="color: #006080">' Page_Load does everything =)  Be sure to copy the dll files from your mapviewernet\bin folder to this projects bin folder.</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  28:</span>     '</span><span style="color: #006080">''</span> I did not include them <span style="color: #0000ff">as</span> that might have violated some autodesk license.    </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  29:</span>     <span style="color: #006080">''</span><span style="color: #006080">' &lt;/summary&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  30:</span>     '</span><span style="color: #006080">''</span> &lt;param name=<span style="color: #006080">&quot;sender&quot;</span>&gt;&lt;/param&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  31:</span>     <span style="color: #006080">''</span><span style="color: #006080">' &lt;param name=&quot;e&quot;&gt;&lt;/param&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  32:</span>     '</span><span style="color: #006080">''</span> &lt;remarks&gt;&lt;/remarks&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  33:</span>     Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  34:</span>&#160; </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  35:</span>         <span style="color: #006080">'setup our siteconnection</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  36:</span>         Dim siteConnection As New MgSiteConnection</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  37:</span>         siteConnection = CreateMGSession(gszMGUser, gszMGPass, gszWebConfig)</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  38:</span>         Dim szSessionId As String = siteConnection.GetSite.CreateSession()</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  39:</span>&#160; </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  40:</span>         '</span>create our connection to the resource service</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  41:</span>         Dim resSvc As MgResourceService</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  42:</span>         resSvc = siteConnection.CreateService(MgServiceType.ResourceService)</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  43:</span>&#160; </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  44:</span>         <span style="color: #006080">'get or set the resourceid of the map to load - in this case i'</span>m just going to hard code it</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  45:</span>         Dim mapResourceID As New MgResourceIdentifier(gszMapResID)</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  46:</span>&#160; </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  47:</span>         <span style="color: #006080">'load the existing map from the libary into an XML document</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  48:</span>         Dim mapXML As XmlDocument = GetResourceXML(resSvc, mapResourceID)</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  49:</span>&#160; </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  50:</span>         '</span>so at <span style="color: #0000ff">this</span> point we have an XML document.  Let<span style="color: #006080">'s try using our new OSGeo.Mapguide.Object classes</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  51:</span>         Dim newMapDefinition As New OSGeo.MapGuide.Objects.MapDefinition</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  52:</span>&#160; </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  53:</span>         '</span>to load the xml - call the shared/<span style="color: #0000ff">static</span> method of MapDefinition.Parse on the OuterXML of the XMLDocument</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  54:</span>         newMapDefinition = OSGeo.MapGuide.Objects.MapDefinition.Parse(mapXML.OuterXml)</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  55:</span>&#160; </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  56:</span>         <span style="color: #006080">'at this point we have a loaded .NET Object containing the map.  Try using Intellisense to see the different methods</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  57:</span>         '</span>Lets add a layer group now</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  58:</span>&#160; </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  59:</span>         <span style="color: #006080">'add any needed layer groups to the map.  In this example we'</span>re only going to add one.</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  60:</span>         Dim szLayerGroupName As String = <span style="color: #006080">&quot;NewLayerGroup&quot;</span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  61:</span>         Dim szLayerGroupAlias As String = <span style="color: #006080">&quot;My Layer Group Alias&quot;</span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  62:</span>         newMapDefinition = AddMapLayerGroup(newMapDefinition, szLayerGroupName, szLayerGroupAlias)</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  63:</span>&#160; </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  64:</span>         <span style="color: #006080">'get or set the resourceid of the folder that contains our layers to add</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  65:</span>         Dim layerPath As New MgResourceIdentifier(gszLayerFolderResID)</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  66:</span>&#160; </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  67:</span>         '</span>so we now have a layer group <span style="color: #0000ff">in</span> our map.  Lets add the layers</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  68:</span>         AddFolderOfLayers(resSvc, newMapDefinition, layerPath, szLayerGroupName)</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  69:</span>&#160; </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  70:</span>         <span style="color: #006080">'at this point our map definition is loaded.  Lets convert it back to XML and save it to the session</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  71:</span>         Dim newMapDoc As New XmlDocument</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  72:</span>         newMapDoc.PreserveWhitespace = True</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  73:</span>&#160; </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  74:</span>         Dim szXML As String = newMapDefinition.Untyped.ToString</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  75:</span>         newMapDoc.LoadXml(szXML)</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  76:</span>&#160; </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  77:</span>         '</span>create our <span style="color: #006080">'new'</span> resourceID <span style="color: #0000ff">in</span> the session repository</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  78:</span>         Dim newMapResourceID As New MgResourceIdentifier(<span style="color: #006080">&quot;Session:&quot;</span> &amp; szSessionId &amp; <span style="color: #006080">&quot;//&quot;</span> &amp; mapResourceID.GetName() &amp; <span style="color: #006080">&quot;.&quot;</span> &amp; MgResourceType.MapDefinition)</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  79:</span>&#160; </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  80:</span>         <span style="color: #006080">'save the newly created map in the session repository</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  81:</span>         CreateSessionResource(resSvc, newMapDoc, szSessionId, newMapResourceID.GetName, MgResourceType.MapDefinition)</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  82:</span>&#160; </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  83:</span>         '</span>now lets deal with the layout - we need to load up the library layout, update the map definition, and save it to the repository</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  84:</span>         Dim layoutResourceID As New MgResourceIdentifier(gszLayoutResID)</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  85:</span>         Dim newLayoutResourceID As New MgResourceIdentifier(<span style="color: #006080">&quot;Session:&quot;</span> &amp; szSessionId &amp; <span style="color: #006080">&quot;//&quot;</span> &amp; layoutResourceID.GetName() &amp; <span style="color: #006080">&quot;.&quot;</span> &amp; MgResourceType.WebLayout)</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  86:</span>&#160; </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  87:</span>         <span style="color: #006080">'same process here, load the XML, parse the XML into the new .net Object</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  88:</span>         Dim layoutXML As XmlDocument = GetResourceXML(resSvc, layoutResourceID)</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  89:</span>&#160; </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  90:</span>         Dim newLayout As New OSGeo.MapGuide.Objects.WebLayout</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  91:</span>         newLayout = OSGeo.MapGuide.Objects.WebLayout.Parse(layoutXML.OuterXml)</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  92:</span>&#160; </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  93:</span>         '</span>update the map resource ID <span style="color: #0000ff">in</span> the layout to point to our newly created map <span style="color: #0000ff">in</span> the session</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  94:</span>         newLayout.Map.ResourceId = newMapResourceID.ToString</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  95:</span>&#160; </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  96:</span>         <span style="color: #006080">'finally go through the motinos to save the layout to the session</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  97:</span>         Dim newLayoutXML As New XmlDocument</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  98:</span>         newLayoutXML.PreserveWhitespace = True</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  99:</span>         newLayoutXML.LoadXml(newLayout.Untyped.ToString())</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 100:</span>&#160; </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 101:</span>         CreateSessionResource(resSvc, newLayoutXML, szSessionId, newLayoutResourceID.GetName, MgResourceType.WebLayout)</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 102:</span>&#160; </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 103:</span>         '</span>our last step <span style="color: #0000ff">is</span> to update the src attribute of the iframe with the information needed to load the newly created layout</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 104:</span>         SetupIFrame(newLayoutResourceID, szSessionId)</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 105:</span>     End Sub</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 106:</span>     Private Sub SetupIFrame(ByVal layoutResId As MgResourceIdentifier, ByVal szSessionID As String)</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 107:</span>         <span style="color: #006080">'build the URL based on our constants, and the layout + session info</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 108:</span>         Dim szUrl As String = gszViewerUrl &amp; &quot;?WEBLAYOUT=&quot; &amp; layoutResId.ToString &amp; &quot;&amp;SESSION=&quot; &amp; szSessionID</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 109:</span>&#160; </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 110:</span>         '</span>update the iframe</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 111:</span>         ifrmViewer.Attributes.Add(<span style="color: #006080">&quot;src&quot;</span>, szUrl)</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 112:</span>     End Sub</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 113:</span>     <span style="color: #006080">''</span><span style="color: #006080">' &lt;summary&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 114:</span>     '</span><span style="color: #006080">''</span> Adds a layer group to the passed MapDefinition, and returns the updated MapDefinition Object.</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 115:</span>     <span style="color: #006080">''</span><span style="color: #006080">' If desired, additional parameters could be added to this to customize the various other properties</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 116:</span>     '</span><span style="color: #006080">''</span> like ShowInLegend etc        </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 117:</span>     <span style="color: #006080">''</span><span style="color: #006080">' &lt;/summary&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 118:</span>     '</span><span style="color: #006080">''</span> &lt;param name=<span style="color: #006080">&quot;mapDef&quot;</span>&gt;The loaded MapDefinition obect&lt;/param&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 119:</span>     <span style="color: #006080">''</span><span style="color: #006080">' &lt;param name=&quot;szLayerGroupName&quot;&gt;The Layer Name of the new layer group&lt;/param&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 120:</span>     '</span><span style="color: #006080">''</span> &lt;param name=<span style="color: #006080">&quot;szLayerGroupAlias&quot;</span>&gt;The Layer Alias of the <span style="color: #0000ff">new</span> layer group&lt;/param&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 121:</span>     <span style="color: #006080">''</span><span style="color: #006080">' &lt;returns&gt;the passed MapDefinition, with the new layer group added&lt;/returns&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 122:</span>     '</span><span style="color: #006080">''</span> &lt;remarks&gt;&lt;/remarks&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 123:</span>     Public Shared Function AddMapLayerGroup(ByVal mapDef As OSGeo.MapGuide.Objects.MapDefinition, ByVal szLayerGroupName As String, ByVal szLayerGroupAlias As String) As OSGeo.MapGuide.Objects.MapDefinition</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 124:</span>         Dim newLayGRoup As New OSGeo.MapGuide.Objects.MapLayerGroupType</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 125:</span>         newLayGRoup.Name = szLayerGroupName</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 126:</span>         newLayGRoup.LegendLabel = szLayerGroupAlias</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 127:</span>         newLayGRoup.ShowInLegend = <span style="color: #006080">&quot;True&quot;</span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 128:</span>         newLayGRoup.ExpandInLegend = <span style="color: #006080">&quot;True&quot;</span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 129:</span>         newLayGRoup.Visible = <span style="color: #006080">&quot;True&quot;</span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 130:</span>         newLayGRoup.Group = <span style="color: #006080">&quot;&quot;</span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 131:</span>         mapDef.MapLayerGroup.Add(newLayGRoup)</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 132:</span>         Return mapDef</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 133:</span>     End Function</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 134:</span>&#160; </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 135:</span>     <span style="color: #006080">''</span><span style="color: #006080">' &lt;summary&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 136:</span>     '</span><span style="color: #006080">''</span> Adds all layer definitions within the specified repository folder to the specified map</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 137:</span>     <span style="color: #006080">''</span><span style="color: #006080">' &lt;/summary&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 138:</span>     '</span><span style="color: #006080">''</span> &lt;param name=<span style="color: #006080">&quot;resSvc&quot;</span>&gt;An open resource service connection&lt;/param&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 139:</span>     <span style="color: #006080">''</span><span style="color: #006080">' &lt;param name=&quot;newMap&quot;&gt;the MapDefinition object to modify&lt;/param&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 140:</span>     '</span><span style="color: #006080">''</span> &lt;param name=<span style="color: #006080">&quot;resLocation&quot;</span>&gt;The folder <span style="color: #0000ff">in</span> the repository to search <span style="color: #0000ff">for</span> layer objects&lt;/param&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 141:</span>     <span style="color: #006080">''</span><span style="color: #006080">' &lt;returns&gt;Update MapDefinition object&lt;/returns&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 142:</span>     '</span><span style="color: #006080">''</span> &lt;remarks&gt;&lt;/remarks&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 143:</span>     Public Shared Function AddFolderOfLayers(ByRef resSvc As MgResourceService, ByVal newMap As OSGeo.MapGuide.Objects.MapDefinition, ByVal resLocation As MgResourceIdentifier, ByVal szLayerGroupName As String) As OSGeo.MapGuide.Objects.MapDefinition</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 144:</span>         <span style="color: #006080">'get the list of layers in the folder</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 145:</span>         Dim resList As OSGeo.MapGuide.Objects.ResourceList</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 146:</span>         '</span>use GetAllResources to get a <span style="color: #0000ff">new</span> resList</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 147:</span>         resList = GetAllResources(resSvc, resLocation, 1, MgResourceType.LayerDefinition)</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 148:</span>&#160; </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 149:</span>         <span style="color: #006080">'resList items are pretty much a collection of resrouceDocumentLocalTypes so define one of these to use in the for loop</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 150:</span>         Dim resItem As OSGeo.MapGuide.Objects.ResourceList.ResourceDocumentLocalType</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 151:</span>&#160; </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 152:</span>         '</span>define a <span style="color: #0000ff">new</span> layerResID to use <span style="color: #0000ff">in</span> the loop</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 153:</span>         Dim layerResID As MgResourceIdentifier</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 154:</span>&#160; </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 155:</span>         <span style="color: #006080">'for each layer - process it and add it to the map</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 156:</span>         Dim newLayerType As New OSGeo.MapGuide.Objects.MapLayerType</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 157:</span>         For Each resItem In resList.ResourceDocument</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 158:</span>             layerResID = New MgResourceIdentifier(resItem.ResourceId)</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 159:</span>             '</span><span style="color: #0000ff">for</span> adding a layer to the map - we must use the MapLayerType <span style="color: #0000ff">object</span> </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 160:</span>             newLayerType = New OSGeo.MapGuide.Objects.MapLayerType</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 161:</span>             newLayerType.ResourceId = layerResID.ToString</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 162:</span>             <span style="color: #006080">'Be sure to specify the name of the </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 163:</span>             newLayerType.Group = szLayerGroupName</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 164:</span>             newLayerType.Name = layerResID.GetName</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 165:</span>             newLayerType.Selectable = &quot;false&quot;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 166:</span>             newLayerType.ShowInLegend = &quot;true&quot;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 167:</span>             newLayerType.LegendLabel = layerResID.GetName</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 168:</span>             newLayerType.ExpandInLegend = &quot;true&quot;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 169:</span>             newLayerType.Visible = &quot;true&quot;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 170:</span>&#160; </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 171:</span>             newMap.MapLayer.Insert(0, newLayerType)</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 172:</span>         Next</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 173:</span>         '</span><span style="color: #0000ff">return</span> the updated MapDefinition</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 174:</span>         Return newMap</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 175:</span>     End Function</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 176:</span>&#160; </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 177:</span>     <span style="color: #006080">'Some handy functions</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 178:</span>&#160; </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 179:</span>     '</span><span style="color: #006080">''</span> &lt;summary&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 180:</span>     <span style="color: #006080">''</span><span style="color: #006080">' Saves the specified XMLDocument to the session respository</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 181:</span>     '</span><span style="color: #006080">''</span> &lt;/summary&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 182:</span>     <span style="color: #006080">''</span><span style="color: #006080">' &lt;param name=&quot;resSvc&quot;&gt;The open resource service connection&lt;/param&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 183:</span>     '</span><span style="color: #006080">''</span> &lt;param name=<span style="color: #006080">&quot;xmlDoc&quot;</span>&gt;the XMLDocument to save to the session repository&lt;/param&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 184:</span>     <span style="color: #006080">''</span><span style="color: #006080">' &lt;param name=&quot;szSessionId&quot;&gt;String containing the session ID&lt;/param&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 185:</span>     '</span><span style="color: #006080">''</span> &lt;param name=<span style="color: #006080">&quot;szName&quot;</span>&gt;The name of the newly created <span style="color: #0000ff">object</span> <span style="color: #0000ff">in</span> the repository&lt;/param&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 186:</span>     <span style="color: #006080">''</span><span style="color: #006080">' &lt;param name=&quot;szResourceType&quot;&gt;the object type&lt;/param&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 187:</span>     '</span><span style="color: #006080">''</span> &lt;returns&gt;&lt;/returns&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 188:</span>     <span style="color: #006080">''</span><span style="color: #006080">' &lt;remarks&gt;&lt;/remarks&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 189:</span>     Public Shared Function CreateSessionResource(ByRef resSvc As MgResourceService, ByVal xmlDoc As XmlDocument, ByVal szSessionId As String, ByVal szName As String, ByVal szResourceType As String) As MgResourceIdentifier</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 190:</span>         Dim byteSource As MgByteSource = getByteSource(xmlDoc)</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 191:</span>         Dim resID As New MgResourceIdentifier(&quot;Session:&quot; &amp; szSessionId &amp; &quot;//&quot; &amp; szName &amp; &quot;.&quot; &amp; szResourceType)</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 192:</span>         resSvc.SetResource(resID, byteSource.GetReader, Nothing)</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 193:</span>         Return resID</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 194:</span>     End Function</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 195:</span>&#160; </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 196:</span>     '</span><span style="color: #006080">''</span> &lt;summary&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 197:</span>     <span style="color: #006080">''</span><span style="color: #006080">' Returns an MgByteSource for the passed XMLDocument</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 198:</span>     '</span><span style="color: #006080">''</span> &lt;/summary&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 199:</span>     <span style="color: #006080">''</span><span style="color: #006080">' &lt;param name=&quot;xmlDoc&quot;&gt;The XMLDocument to convert&lt;/param&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 200:</span>     '</span><span style="color: #006080">''</span> &lt;returns&gt;MgByteSource of the XMLDocumnet&lt;/returns&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 201:</span>     <span style="color: #006080">''</span><span style="color: #006080">' &lt;remarks&gt;&lt;/remarks&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 202:</span>     Public Shared Function getByteSource(ByVal xmlDoc As XmlDocument) As MgByteSource</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 203:</span>         Dim xmlStream As New IO.MemoryStream</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 204:</span>         xmlDoc.Save(xmlStream)</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 205:</span>         Dim arrBytes() As Byte = xmlStream.ToArray()</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 206:</span>         Dim Enc As Encoding = Encoding.UTF8</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 207:</span>         Dim docString As String = New String(Enc.GetChars(arrBytes))</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 208:</span>         arrBytes = Nothing</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 209:</span>&#160; </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 210:</span>         Dim arrOutput(docString.Length - 1) As Byte</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 211:</span>         Dim nByteCount As Integer = Enc.GetBytes(docString, 0, docString.Length, arrOutput, 0)</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 212:</span>&#160; </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 213:</span>         Dim byteSource As New MgByteSource(arrOutput, arrOutput.Length)</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 214:</span>         byteSource.SetMimeType(MgMimeType.Xml)</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 215:</span>&#160; </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 216:</span>         Return byteSource</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 217:</span>     End Function</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 218:</span>&#160; </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 219:</span>     '</span><span style="color: #006080">''</span> &lt;summary&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 220:</span>     <span style="color: #006080">''</span><span style="color: #006080">' returns a loaded XML document of the specified resourceID</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 221:</span>     '</span><span style="color: #006080">''</span> &lt;/summary&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 222:</span>     <span style="color: #006080">''</span><span style="color: #006080">' &lt;param name=&quot;resSvc&quot;&gt;An open connection to the Mapguide Resource Service&lt;/param&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 223:</span>     '</span><span style="color: #006080">''</span> &lt;param name=<span style="color: #006080">&quot;resId&quot;</span>&gt;The MgResourceID of the entity <span style="color: #0000ff">in</span> question&lt;/param&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 224:</span>     <span style="color: #006080">''</span><span style="color: #006080">' &lt;returns&gt;A loaded XMLDocument of the specified resource&lt;/returns&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 225:</span>     '</span><span style="color: #006080">''</span> &lt;remarks&gt;&lt;/remarks&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 226:</span>     Public Shared Function GetResourceXML(ByRef resSvc As MgResourceService, ByVal resId As MgResourceIdentifier) As XmlDocument</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 227:</span>         Dim retDoc As New XmlDocument</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 228:</span>         retDoc.PreserveWhitespace = True</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 229:</span>&#160; </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 230:</span>         Dim szXML As String = resSvc.GetResourceContent(resId).ToString()</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 231:</span>         Dim nByteCount As Integer</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 232:</span>         Dim arrByte(szXML.Length) As Byte</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 233:</span>         nByteCount = Encoding.UTF8.GetBytes(szXML, 0, szXML.Length, arrByte, 0)</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 234:</span>&#160; </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 235:</span>         Dim memStream As New IO.MemoryStream(arrByte)</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 236:</span>         retDoc.Load(memStream)</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 237:</span>         Return retDoc</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 238:</span>     End Function</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 239:</span>&#160; </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 240:</span>&#160; </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 241:</span>     <span style="color: #006080">''</span><span style="color: #006080">' &lt;summary&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 242:</span>     '</span><span style="color: #006080">''</span> Create a <span style="color: #0000ff">new</span> mapguide session and <span style="color: #0000ff">return</span> the resulting session ID</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 243:</span>     <span style="color: #006080">''</span><span style="color: #006080">' &lt;/summary&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 244:</span>     '</span><span style="color: #006080">''</span> &lt;param name=<span style="color: #006080">&quot;szMGUser&quot;</span>&gt;Valid mapguide user name&lt;/param&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 245:</span>     <span style="color: #006080">''</span><span style="color: #006080">' &lt;param name=&quot;szMGPass&quot;&gt;Valid password for the specified mapguide user name&lt;/param&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 246:</span>     '</span><span style="color: #006080">''</span> &lt;param name=<span style="color: #006080">&quot;szMGWebTier&quot;</span>&gt;The path to the Mapguide web tier (valid on the mapguide web server&lt;/param&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 247:</span>     <span style="color: #006080">''</span><span style="color: #006080">' &lt;returns&gt;MgSiteConnection - the newly created mapguide site connection&lt;/returns&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 248:</span>     '</span><span style="color: #006080">''</span> &lt;remarks&gt;&lt;/remarks&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 249:</span>     Public Shared Function CreateMGSession(ByVal szMGUser As String, ByVal szMGPass As String, ByVal szMGWebTier As String) As MgSiteConnection</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 250:</span>         MapGuideApi.MgInitializeWebTier(szMGWebTier)</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 251:</span>         Dim siteConnection As New MgSiteConnection()</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 252:</span>         siteConnection.Open(New MgUserInformation(szMGUser, szMGPass))</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 253:</span>         Return siteConnection</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 254:</span>     End Function</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 255:</span>&#160; </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 256:</span>     <span style="color: #006080">''</span><span style="color: #006080">' &lt;summary&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 257:</span>     '</span><span style="color: #006080">''</span> Converts MgReader to XMLDocument</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 258:</span>     <span style="color: #006080">''</span><span style="color: #006080">' &lt;/summary&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 259:</span>     '</span><span style="color: #006080">''</span> &lt;param name=<span style="color: #006080">&quot;byteReader&quot;</span>&gt;Loaded MgByteReader&lt;/param&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 260:</span>     <span style="color: #006080">''</span><span style="color: #006080">' &lt;returns&gt;Loaded XMLDocument&lt;/returns&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 261:</span>     '</span><span style="color: #006080">''</span> &lt;remarks&gt;&lt;/remarks&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 262:</span>     Public Shared Function ConvertMgReaderXml(ByVal byteReader As MgByteReader) As XmlDocument</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 263:</span>         Dim szXML As String</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 264:</span>         Try</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 265:</span>             szXML = byteReader.ToString</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 266:</span>         Catch ex As Exception</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 267:</span>             Throw ex</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 268:</span>         End Try</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 269:</span>         Dim nByteCount As Integer</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 270:</span>         Dim arrByte(szXML.Length) As Byte</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 271:</span>         Try</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 272:</span>             nByteCount = Encoding.UTF8.GetBytes(szXML, 0, szXML.Length, arrByte, 0)</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 273:</span>         Catch ex As Exception</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 274:</span>             Throw ex</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 275:</span>         End Try</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 276:</span>&#160; </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 277:</span>         Dim memStream As New IO.MemoryStream(arrByte)</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 278:</span>         Dim retDoc As New XmlDocument</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 279:</span>         retDoc.PreserveWhitespace = True</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 280:</span>         Try</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 281:</span>             retDoc.Load(memStream)</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 282:</span>         Catch ex As Exception</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 283:</span>             memStream.Close()</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 284:</span>             memStream.Dispose()</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 285:</span>             Throw ex</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 286:</span>         End Try</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 287:</span>         memStream.Close()</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 288:</span>         memStream.Dispose()</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 289:</span>         Return retDoc</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 290:</span>     End Function</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 291:</span>&#160; </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 292:</span>     <span style="color: #006080">''</span><span style="color: #006080">' &lt;summary&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 293:</span>     '</span><span style="color: #006080">''</span> Gets a ResourceList <span style="color: #0000ff">for</span> each item <span style="color: #0000ff">in</span> the specified repository folder.</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 294:</span>     <span style="color: #006080">''</span><span style="color: #006080">' &lt;/summary&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 295:</span>     '</span><span style="color: #006080">''</span> &lt;param name=<span style="color: #006080">&quot;resSvc&quot;</span>&gt;The opened resource server connection&lt;/param&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 296:</span>     <span style="color: #006080">''</span><span style="color: #006080">' &lt;param name=&quot;resId&quot;&gt;The MgResourceId of the folder we want to enumerate&lt;/param&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 297:</span>     '</span><span style="color: #006080">''</span> &lt;param name=<span style="color: #006080">&quot;nDepth&quot;</span>&gt;The folder depth to enumerate.  From the Mapguide Web API Reference:</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 298:</span>     <span style="color: #006080">''</span><span style="color: #006080">' (int) Recursion depth, relative to the specified resource.</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 299:</span>     '</span><span style="color: #006080">''</span>* If the resource <span style="color: #0000ff">is</span> a document, depth must be set to 0.</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 300:</span>     <span style="color: #006080">''</span><span style="color: #006080">'* If the resource is a folder:</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 301:</span>     '</span><span style="color: #006080">''</span>      o If the depth <span style="color: #0000ff">is</span> equal to 0, only information about the specified folder <span style="color: #0000ff">is</span> returned.</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 302:</span>     <span style="color: #006080">''</span><span style="color: #006080">'      o If the depth is greater than 0, information about the folder and its descendants up to the specified depth are returned.</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 303:</span>     '</span><span style="color: #006080">''</span>* If the depth <span style="color: #0000ff">is</span> -1, information about the folder and all its descendants <span style="color: #0000ff">is</span> returned.</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 304:</span>     <span style="color: #006080">''</span><span style="color: #006080">' &lt;/param&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 305:</span>     '</span><span style="color: #006080">''</span> &lt;param name=<span style="color: #006080">&quot;szType&quot;</span>&gt;Again from the Mapguide Web API Reference:</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 306:</span>     <span style="color: #006080">''</span><span style="color: #006080">'     (String/string) Type of the resource to be enumerated. (Case sensitive.) See MgResourceType  for valid types. If the type is a folder, </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 307:</span>     '</span><span style="color: #006080">''</span>     you must include the trailing slash.</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 308:</span>     <span style="color: #006080">''</span><span style="color: #006080">'     Or, this can be set to null, in which case information about all resource types is returned</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 309:</span>     '</span><span style="color: #006080">''</span> &lt;/param&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 310:</span>     <span style="color: #006080">''</span><span style="color: #006080">' &lt;returns&gt;OSGeo.Mapguide.Objects.ResourceList of resource entities&lt;/returns&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 311:</span>     '</span><span style="color: #006080">''</span> &lt;remarks&gt;&lt;/remarks&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 312:</span>     Public Shared Function GetAllResources(ByRef resSvc As MgResourceService, ByVal resId As MgResourceIdentifier, ByVal nDepth As Integer, ByVal szType As String) As OSGeo.MapGuide.Objects.ResourceList</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 313:</span>         Dim retDoc As XmlDocument</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 314:</span>         retDoc = ConvertMgReaderXml(resSvc.EnumerateResources(resId, nDepth, szType))</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 315:</span>&#160; </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 316:</span>         Dim resourceList As New OSGeo.MapGuide.Objects.ResourceList</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 317:</span>         resourceList = OSGeo.MapGuide.Objects.ResourceList.Parse(retDoc.OuterXml)</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 318:</span>         Return resourceList</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 319:</span>     End Function</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 320:</span> End Class</pre>
</p></div>
</div>
<p>If you have any questions or comments &#8211; feel free to let me know.</p>
<div class="wlWriterEditableSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:8bbf493c-f424-47b7-bed5-b62ee2ab5c29" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px">Technorati Tags: <a href="http://technorati.com/tags/ASP.NET" rel="tag">ASP.NET</a>,<a href="http://technorati.com/tags/Mapguide" rel="tag">Mapguide</a>,<a href="http://technorati.com/tags/Dynamic+Authoring" rel="tag">Dynamic Authoring</a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.geospecialling.com/index.php/2008/05/dynamic-authoring-in-mapguide-enterprise-before-the-viewer-has-loaded/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Creating .NET objects for Mapguide XML schema Definitions (XSD) using LINQ</title>
		<link>http://www.geospecialling.com/index.php/2008/05/creating-net-objects-for-mapguide-xml-schema-definitions-xsd-using-linq/</link>
		<comments>http://www.geospecialling.com/index.php/2008/05/creating-net-objects-for-mapguide-xml-schema-definitions-xsd-using-linq/#comments</comments>
		<pubDate>Fri, 16 May 2008 10:18:00 +0000</pubDate>
		<dc:creator>Darrin Maidlow</dc:creator>
				<category><![CDATA[Mapguide]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[Dynamic Authoring]]></category>

		<guid isPermaLink="false">http://www.geospecialling.com/index.php/2008/05/creating-net-objects-for-mapguide-xml-schema-definitions-xsd-using-linq/</guid>
		<description><![CDATA[With the release of Mapguide 2007 I was really excited about the new API and the significant power that it would give us developer types.&#160; Though I now appreciate the work involved with creating a full object API for all the supported development platforms, I was a little sad to see that only a handful [...]]]></description>
			<content:encoded><![CDATA[<p>With the release of Mapguide 2007 I was really excited about the new API and the significant power that it would give us developer types.&#160; Though I now appreciate the work involved with creating a full object API for all the supported development platforms, I was a little sad to see that only a handful of objects had been created for working with the various entity types available in Mapguide.</p>
<p>One of my first tasks with Mapguide was to add some layers to the map, before the viewer had loaded up, save that map in the session repository and then build a layout for the map &#8211; again in the session repository.&#160; I tried various ways of working with the XML provided by the resource&#160; service, and read through many of the e-mails on the topic from the Osgeo list, but I just couldn&#8217;t get it to work.&#160; So I set out on my mission to get an object based method of getting things done.&#160; First, as per the developer documentation I tried out xsd.exe.&#160; XSD allowed me to get a class skeleton created, but there was a lot of work needed to a rounded API running.&#160;&#160; I had been recently investigating the new functionality Microsoft was exposing with LINQ &#8211; and I came across LINQ to XSD.&#160; For more information on Linq to XSD the <a title="Microsoft XML Team Weblog" href="http://blogs.msdn.com/xmlteam/archive/2008/02/21/linq-to-xsd-alpha-0-2.aspx" target="_blank" rel="tag">Microsoft XML team blog</a> is a good place to start.&#160; </p>
<p>So download <a title="LINQ to XSD Alpha 0.2" href="http://www.microsoft.com/downloads/details.aspx?FamilyID=a45f58cd-fcfc-439e-b735-8182775560af&amp;displaylang=en" target="_blank" rel="tag">LINQ to XSD Alpha 0.2</a> and install it.&#160; You will need to have <a title=".NET 3.5 Framework" href="http://www.microsoft.com/downloads/details.aspx?FamilyID=a45f58cd-fcfc-439e-b735-8182775560af&amp;displaylang=en" target="_blank" rel="tag">.NET 3.5</a> installed first.&#160; In addition to that I&#8217;m using Visual Studio 2008 Pro.&#160; I have tried these steps with both Mapguide Enterprise 2008 and&#160; 2009.&#160; I have to assume the resulting code will work with Mapguide Open Source as well.</p>
<p><strong>Setting up your project</strong></p>
<p>At this point you should be able to fire up Visual Studio and create a new project.&#160; If you are a VB developer, I&#8217;m afraid you&#8217;re going to have to dive into a bit of C#, as its the only support language right now.&#160; It&#8217;s not that bad.</p>
<p>The new project window should look a little like this:</p>
<p align="center"><a href="http://www.geospecialling.com/wp-content/uploads/2010/02/image1.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="167" alt="image" src="http://www.geospecialling.com/wp-content/uploads/2010/02/image_thumb1.png" width="277" border="0" /></a> </p>
<p align="left">Choose LINQ to XSD Library and give the project a name.&#160; Once the new project is loaded, create a new folder called XSD.&#160; Browse to your Mapguide 2009/OS 2.0 server Schema folder (on a default installation its c:\Program Files\Autodesk\MapGuideEnterprise2009\Server\Schema).&#160; Take a these files and drag them into the new XSD folder.</p>
<p align="left">Back in Visual Studio, select all of the XSD files.&#160; Look in the property window and change the &quot;Build Action&quot; to be &quot;LinqToXsdSchema&quot;.</p>
<p align="left"><strong>Building the project</strong></p>
<p align="left">At this point, right click on the project in Visual Studio, and choose build.&#160; You should have 173 errors.&#160; This is caused by having multiple, similar versions of some of the XSDs.&#160; Let&#8217;s exclude the following files:</p>
<ul>
<li>
<div align="left">FdoProviderCapabilities-1.0.0.xsd</div>
</li>
<li>
<div align="left">LayerDefinition-1.0.0.xsd</div>
</li>
<li>
<div align="left">LayerDefinition-1.1.0.xsd</div>
</li>
<li>
<div align="left">LoadProcedure-1.0.0.xsd</div>
</li>
<li>
<div align="left">SymbolDefinition-1.0.0.xsd</div>
</li>
</ul>
<p align="left">Rebuild the project and we should be down to five errors.&#160; I have found that by excluding the following files I was able to get the code to generate:</p>
<ul>
<li>
<div align="left">ApplicationDefinition-1.0.0.xsd</div>
</li>
<li>ApplicationDefinitionInfo-1.0.0.xsd </li>
<li>SymbolLibrary-1.0.0.xsd </li>
</ul>
<p align="left">&#160;</p>
<p>For my purposes, I was not too concerned about being able to work with these entity types programmatically (at least at this time).&#160; If anyone is able to work around and would like to share it, please let me know.</p>
<p>Build the project again, and we will see three new errors.&#160; This time we will need to dig into the generated code to correct them.&#160; For each of the three errors we will want to change the public string name.&#160; For example:</p>
<div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: rgb(244,244,244)">
<div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas,&#39;Courier New&#39;,courier,monospace; border-right-style: none; border-left-style: none; background-color: rgb(244,244,244); border-bottom-style: none">
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas,&#39;Courier New&#39;,courier,monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: rgb(96,96,96)">   1:</span> <span style="color: rgb(0,0,255)">public</span> <span style="color: rgb(0,0,255)">string</span> DataType {</pre>
</p></div>
</div>
<p>&#160;</p>
<p>We would change to:</p>
<div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: rgb(244,244,244)">
<div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas,&#39;Courier New&#39;,courier,monospace; border-right-style: none; border-left-style: none; background-color: rgb(244,244,244); border-bottom-style: none">
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas,&#39;Courier New&#39;,courier,monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: rgb(96,96,96)">   1:</span> <span style="color: rgb(0,0,255)">public</span> <span style="color: rgb(0,0,255)">string</span> Datatype {</pre>
</p></div>
</div>
<p>&#160;</p>
<p>Change the case of the property name in each of the three errors and we are just about there.&#160; At this point you should have around 42904 lines of code in this file.&#160; Good thing I didn&#8217;t try to do this manually.&#160;&#160; Take a copy of all these wonderful lines o&#8217; code, and we&#8217;re going to paste them into a new class. For the sake of this example, I renamed class1.cs to be OSGeo.Mapguide.Objects.cs and pasted the code in there.&#160; I also wrapped all the code in a namespace to match the file name.</p>
<p>If you need to find the generated code, take a look in the obj folder within your project.&#160; You should find a file named LinqToXsdSource.cs in the appropriate build folder.</p>
<p>Next we need to prevent the XSDs from rebuilding each time.&#160; Select all of your XSD files again, and change the &quot;Build Action&quot; to &quot;None&quot;.&#160;&#160;&#160; Building the project at this point will generate fifty some odd errors.&#160; We can eliminate these by doing a search and replace on global:: and replacing it with an empty string.&#160; Build the project again, and you will find one error.&#160; Simply remove the &quot;global.&quot; from the line in question and the project will now build.</p>
<p>At this point, you should have a nice .dll file which you can reference from your projects and access many of the Mapguide entity types using objects.&#160; Be sure to grab a copy of Microsoft.XmlSchema.Linq.dll and distribute that with your new DLL.</p>
</p>
<div class="wlWriterEditableSmartContent" id="scid:fb3a1972-4489-4e52-abe7-25a00bb07fdf:c7128993-8018-4abc-98b5-f699b6434c0d" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px">
<p>For your convenience, I&#8217;ve posted the <a href="http://www.geospecialling.com/wp-content/uploads/2010/02/OSGeo.Mapguide.Objects.zip" target="_blank">Project, source and binaries</a></p>
</div>
<p>This project maybe have some issues.&#160; I have worked with LayerDefinitions, MapDefinitions, and WebLayouts &#8211; but not tested many of the classes here yet.&#160; If you have any feedback or enhancements you want to share &#8211; please let me know!</p>
<p>In the next week I will post some examples on how to build maps and layouts &#8211; before the viewer has loaded.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.geospecialling.com/index.php/2008/05/creating-net-objects-for-mapguide-xml-schema-definitions-xsd-using-linq/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Cannot Select Entities in Mapguide Enterprise 2009 Viewer</title>
		<link>http://www.geospecialling.com/index.php/2008/05/cannot-select-entities-in-mapguide-enterprise-2009-viewer/</link>
		<comments>http://www.geospecialling.com/index.php/2008/05/cannot-select-entities-in-mapguide-enterprise-2009-viewer/#comments</comments>
		<pubDate>Thu, 08 May 2008 09:27:00 +0000</pubDate>
		<dc:creator>Darrin Maidlow</dc:creator>
				<category><![CDATA[Mapguide]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[FDO]]></category>

		<guid isPermaLink="false">http://www.geospecialling.com/index.php/2010/05/cannot-select-entities-in-mapguide-enterprise-2009-viewer/</guid>
		<description><![CDATA[I recently encountered a frustrating problem in my Mapguide travels.&#160; When the map in my application came up, I could not select any entities.&#160; Both window and single selections just did nothing.&#160; I had recently setup my map tier on my Vista x64 box so I was not sure if I had missed something in [...]]]></description>
			<content:encoded><![CDATA[<p>I recently encountered a frustrating problem in my <a title="Autodesk Mapguide" href="http://www.mapguide.com" target="_blank" rel="tag">Mapguide</a> travels.&#160; When the map in my application came up, I could not select any entities.&#160; Both window and single selections just did nothing.&#160; I had recently setup my <a title="Manually configure Mapguide 2009 Web Tier on Vista x64 IIS7" href="http://www.geospecialling.com/index.php/2008/05/manually-configure-mapguide-2009-web-tier-on-vista-x64-iis7/" target="_blank" rel="tag">map tier on my Vista x64 box</a> so I was not sure if I had missed something in the configuration there.&#160; In addition to this, my application is doing some dynamic authoring and adding a bunch of layers to the map before the viewer loads it up.</p>
<p>I saved a copy of the dynamically generated maps and layers to the library repository.&#160; Everything checked out.&#160; The layers were marked as selectable.</p>
<p>Next step was to check out the server logs on my Mapguide server.&#160;&#160;&#160; We have a nice error occurring a lot: Error: An exception occurred in FDO component. String does not represent a valid filter. </p>
<p>So into the code I go.&#160; I ripped out all my dynamic authoring calls, and the map loads and selects no problem.&#160; As I was starting to suspect, my code was to blame &#8211; and there is something specific to my filters on the layers:</p>
<div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, &#39;Courier New&#39;, courier, monospace; background-color: #f4f4f4">
<div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   1:</span> newLayer.VectorLayerDefinition.Filter = <span style="color: #006080">&quot;BLDG_ID = &quot;</span><span style="color: #006080">&quot;&quot;</span> &amp; szBldgID &amp; <span style="color: #006080">&quot;&quot;</span><span style="color: #006080">&quot; AND BLDG_FLOOR &quot;</span><span style="color: #006080">&quot; IN(0,&quot;</span> &amp; nFloorNumber.ToString &amp; <span style="color: #006080">&quot;)&quot;</span><span style="color: #006080">&quot;&quot;</span></pre>
</p></div>
</div>
<p>&#160;</p>
<p>I had assumed that FDO had an IN clause, did a quick check in Mapguide Studio&#8217;s condition builder and didn&#8217;t see one.&#160; Fair enough, in this case I can get by with two equals conditions in my select as the list of conditions will only ever consist of two values.</p>
<div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, &#39;Courier New&#39;, courier, monospace; background-color: #f4f4f4">
<div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   1:</span> newLayer.VectorLayerDefinition.Filter = <span style="color: #006080">&quot;BLDG_ID = &quot;</span> &amp; szBldgID &amp; <span style="color: #006080">&quot; AND (BLDG_FLOOR = 0 OR BLDG_FLOOR = &quot;</span> &amp; nFloorNumber.ToString &amp; <span style="color: #006080">&quot;)&quot;</span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   2:</span> 'newLayer.VectorLayerDefinition.Filter = <span style="color: #006080">&quot;BLDG_ID = &quot;</span> &amp; szBldgID &amp; <span style="color: #006080">&quot; AND BLDG_FLOOR  IN(0,&quot;</span> &amp; nFloorNumber.ToString &amp; <span style="color: #006080">&quot;)&quot;</span><span style="color: #006080">&quot;&quot;</span></pre>
</p></div>
</div>
<p>
  <br />Long story short, if you are selecting items in the map viewer that are supposed to be selectable, check your server logs.</p>
<div class="wlWriterEditableSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:7bbff4f2-31de-4ffd-bbef-2315558181c6" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px">Technorati Tags: <a href="http://technorati.com/tags/Mapguide" rel="tag">Mapguide</a>,<a href="http://technorati.com/tags/ASP.NET" rel="tag">ASP.NET</a>,<a href="http://technorati.com/tags/FDO" rel="tag">FDO</a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.geospecialling.com/index.php/2008/05/cannot-select-entities-in-mapguide-enterprise-2009-viewer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Manually configure Mapguide 2009 Web Tier on Vista x64 IIS7</title>
		<link>http://www.geospecialling.com/index.php/2008/05/manually-configure-mapguide-2009-web-tier-on-vista-x64-iis7/</link>
		<comments>http://www.geospecialling.com/index.php/2008/05/manually-configure-mapguide-2009-web-tier-on-vista-x64-iis7/#comments</comments>
		<pubDate>Thu, 01 May 2008 21:37:00 +0000</pubDate>
		<dc:creator>Darrin Maidlow</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[IIS 7]]></category>
		<category><![CDATA[Vista]]></category>

		<guid isPermaLink="false">http://www.geospecialling.com/index.php/2008/05/manually-configure-mapguide-2009-web-tier-on-vista-x64-iis7/</guid>
		<description><![CDATA[My configuration is this. I have a 32 bit window server running IIS6 and Mapguide server. however for development purposes and local debugging I needed the web tier to be run from my workstation &#8211; but working with my network Mapguide enterprise server. First off, you need to ensure that IIS 7 is installed on [...]]]></description>
			<content:encoded><![CDATA[<p>My configuration is this. I have a 32 bit window server running IIS6 and Mapguide server. however for development purposes and local debugging I needed the web tier to be run from my workstation &#8211; but working with my network Mapguide enterprise server.</p>
<p>First off, you need to ensure that IIS 7 is installed on the Vista machine, you also need to specify ASP.NET and the ISAPI components be installed. To start off, run the web tier installation and choose a manual installation. I did a custom install, and did not install the php, site admin, or java components. I installed my web tier to C:\inetpub\MapGuideEnterprise2009. It is critical that you do not install it to the default location in program files (x86), or the Vista permissions will break everything. You will know this has occurred because your map will show all question marks in the layer legend, and no map data.&#160; In the server log you will see session timeout errors.&#160; If you do install it to the default location, just move the entire folder structure out of program files (x86).</p>
<p>Finish the installer, this should deploy the needed Mapguide files. I noticed a bit of a delay in the copying new files portion of the installer. Seemed to be hung for several minutes, but it did complete.</p>
<p>Now start up IIS manager (start / run / inetmgr)</p>
<p>This is the &#8216;hard&#8217; part. It looks nothing like what I was expecting.&#160; IIS Internet Manager has been pretty static for the past, oh ten years&#8230; </p>
<p>A default web site should be configured &#8211; double click on the computer in the left pane to expand the tree.</p>
<p align="center">&#160;<a href="http://www.webrade.com/blogs/darrin/content/binary/WindowsLiveWriter/ManuallyconfigureMapguide2009WebTieronVi_E55C/clip_image002_2.jpg" target="_blank"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="210" alt="clip_image002" src="http://www.webrade.com/blogs/darrin/content/binary/WindowsLiveWriter/ManuallyconfigureMapguide2009WebTieronVi_E55C/clip_image002_thumb.jpg" width="244" align="middle" border="0" /></a></p>
<p>&#160;</p>
<p>First off &#8211; we&#8217;re going to create a new application pool specifically for Mapguide. This will save us some problems down the road. If you are not familiar with them, <a title="IIS Application Pools" href="http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/f05a7c2b-36b0-4b6e-ac7c-662700081f25.mspx?mfr=true" target="_blank">application pools</a> are a newer concept introduced in IIS 6. Each application in IIS requires an application pool. Only one version of the .NET framework can be used by a single application pool. We&#8217;re going to set this pool to use .NET 2.0 (which also includes 3.0 and 3.5)</p>
<p align="center">&#160;<a href="http://www.webrade.com/blogs/darrin/content/binary/WindowsLiveWriter/ManuallyconfigureMapguide2009WebTieronVi_E55C/clip_image004_2.jpg"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="219" alt="clip_image004" src="http://www.webrade.com/blogs/darrin/content/binary/WindowsLiveWriter/ManuallyconfigureMapguide2009WebTieronVi_E55C/clip_image004_thumb.jpg" width="244" border="0" /></a></p>
<p>&#160;</p>
<p>The most important reason for a new application pool is to set this pool/worker process to run in 32 bit mode. Select the new application pool and choose Advanced Settings. Change Enable 32-Bit Applications to true. </p>
<p align="center">&#160;<a href="http://www.webrade.com/blogs/darrin/content/binary/WindowsLiveWriter/ManuallyconfigureMapguide2009WebTieronVi_E55C/clip_image006_2.jpg"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="199" alt="clip_image006" src="http://www.webrade.com/blogs/darrin/content/binary/WindowsLiveWriter/ManuallyconfigureMapguide2009WebTieronVi_E55C/clip_image006_thumb.jpg" width="244" border="0" /></a></p>
<p>&#160;</p>
<p>If you do not set the pool to run as 32 bit, you will get an error message that says: </p>
<p>&quot;The page you are requesting cannot be served because of the Multipurpose Internet Mail Extensions (MIME) map policy that is configured on the Web server. The page you requested has a file name extension that is not recognized, and is not allowed.&quot;</p>
<p>A new behavior in IIS7 is a change between virtual directories and applications. In IIS6 and below, we would create a virtual directory, and then add an application to the properties of that virtual directory. With IIS7, we right click and instead of choosing Add Virtual Directory we choose Add Application. So let’s add a new application to the Default Web Site.</p>
<p>For simplicity, I&#8217;m re-creating the structure exactly as defined on my Windows 2003 server. Once the application is created, right click on it and choose Add Application. So right click on the default web site and choose add application. Call it Mapguide2009 and choose the newly created mapguide2009 application pool.</p>
<p>Next we need to right click on the Mapguide2009 application and create two new applications. One called mapviewerdwf, and mapviewerajax. Each of these apps must point to the same location – the mapviewernet folder. (by default its location is C:\Program Files (x86)\Autodesk\MapGuideEnterprise2009\WebServerExtensions\www\mapviewernet – but we need to use c:\inetpub\wwwroot\ MapGuideEnterprise2009\WebServerExtensions\www\mapviewernet) The other difference is that for each application, we must set the default document to be dwfviewer.aspx and ajaxviewer.aspx respectively. To set the default document select the new application in the tree and double click Default Document in the central pane. Enter the appropriate default document.</p>
<p align="center"><a href="http://www.webrade.com/blogs/darrin/content/binary/WindowsLiveWriter/ManuallyconfigureMapguide2009WebTieronVi_E55C/clip_image008_2.jpg"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="210" alt="clip_image008" src="http://www.webrade.com/blogs/darrin/content/binary/WindowsLiveWriter/ManuallyconfigureMapguide2009WebTieronVi_E55C/clip_image008_thumb.jpg" width="244" border="0" /></a></p>
<p><a href="http://www.webrade.com/blogs/darrin/content/binary/WindowsLiveWriter/ManuallyconfigureMapguide2009WebTieronVi_E55C/clip_image008_2.jpg"></a>&#160;</p>
<p>Next we need to setup a script mapping for the FCGI. Select the Mapguide2009 application and we are going to create yet another application. Call this application mapagent. This should act like adding an application to an existing folder in IIS6. Next, double click on Handler Mappings. In the top right, select Add Script Map. On the script mapping form, enter MapAgent.fcgi (or *.fcgi) for the request path. Browse to and select the isapi_MapAgent.dll from the www\mapagent folder. Under request restrictions, you can also set the verbs to GET,POST.</p>
<p align="center"><a href="http://www.webrade.com/blogs/darrin/content/binary/WindowsLiveWriter/ManuallyconfigureMapguide2009WebTieronVi_E55C/clip_image010_2.jpg"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="199" alt="clip_image010" src="http://www.webrade.com/blogs/darrin/content/binary/WindowsLiveWriter/ManuallyconfigureMapguide2009WebTieronVi_E55C/clip_image010_thumb.jpg" width="244" border="0" /></a></p>
<p><a href="http://www.webrade.com/blogs/darrin/content/binary/WindowsLiveWriter/ManuallyconfigureMapguide2009WebTieronVi_E55C/clip_image010_2.jpg"></a>&#160;</p>
<p>Click Ok and you will be prompted to enable the ISAPI extension. Click on yes.</p>
<p>At this point – the Mapguide 2009 web tier should be installed and running. Try it out by starting up a browser and hitting <a href="http://localhost/mapguide2009/mapagent/index.html">http://localhost/mapguide2009/mapagent/index.html</a>. Next you can access maps using <a href="http://localhost/mapguide2009/mapviewerdwf">http://localhost/mapguide2009/mapviewerdwf</a> or mapviewerajax.</p>
<div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:cc4115d7-0a10-45e6-83d4-3f6d1a97eb15" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px">Technorati Tags: <a href="http://technorati.com/tags/Mapguide" rel="tag">Mapguide</a>,<a href="http://technorati.com/tags/Vista" rel="tag">Vista</a>,<a href="http://technorati.com/tags/IIS%207" rel="tag">IIS 7</a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.geospecialling.com/index.php/2008/05/manually-configure-mapguide-2009-web-tier-on-vista-x64-iis7/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Mapguide Enterprise and Not Null Constraints</title>
		<link>http://www.geospecialling.com/index.php/2008/04/mapguide-enterprise-and-not-null-constraints/</link>
		<comments>http://www.geospecialling.com/index.php/2008/04/mapguide-enterprise-and-not-null-constraints/#comments</comments>
		<pubDate>Sat, 26 Apr 2008 21:34:00 +0000</pubDate>
		<dc:creator>Darrin Maidlow</dc:creator>
				<category><![CDATA[Mapguide]]></category>
		<category><![CDATA[.NET]]></category>

		<guid isPermaLink="false">http://www.geospecialling.com/index.php/2008/04/mapguide-enterprise-and-not-null-constraints/</guid>
		<description><![CDATA[There is a problem with not null constraints and Mapguide Enterprise.&#160; This problem exists in both 2008, and the 2009 versions.&#160; If any columns within your table or view are defined as not allowing null Mapguide will pick these up as key fields. I found this problem when trying to programmatically retrieve a feature set [...]]]></description>
			<content:encoded><![CDATA[<p>There is a problem with not null constraints and Mapguide Enterprise.&#160; This problem exists in both 2008, and the 2009 versions.&#160; If any columns within your table or view are defined as not allowing null Mapguide will pick these up as key fields.</p>
<p>I found this problem when trying to programmatically retrieve a feature set of&#160; the current selection.&#160; When the SetFilter method on the MgFeatureQueryOptions call was issued I was receiving a&#160; &quot;Not Implemented&quot; error.&#160; After a bit of back and forth with Steve Dang at Autodesk he gave me a list of valid&#160; database property types for the SetFilter call:</p>
<div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, &#39;Courier New&#39;, courier, monospace; background-color: #f4f4f4">
<div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   1:</span> <span style="color: #008000">//The problem is from the web tier.  Note that the  MgSelectionBase::GenerateFilter method</span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   2:</span> <span style="color: #008000">//will throw an  MgNotImplementedException if the property type of the filtered data</span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   3:</span> <span style="color: #008000">//is not one of the following types: </span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   4:</span>&#160; </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   5:</span> MgPropertyType::Int16</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   6:</span> MgPropertyType::Int32</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   7:</span> MgPropertyType::Int64</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   8:</span> MgPropertyType::String</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   9:</span> MgPropertyType::Single</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  10:</span> MgPropertyType::Double</pre>
</p></div>
</div>
<p>&#160;</p>
<p>This got me looking at my underlying fields, and eventually I noticed in the ODBC data connection the key fields for the table in question contained a&#160; number of columns that just should not have been there.&#160; The problem field was a date column &#8211; which would explain why the SetFilter call was throwing and error.&#160; Upon closer inspection I realized that these columns were constrained with &quot;Not Null&quot; constraints.&#160; </p>
<p>So I changed my source database and removed the not null constraints.&#160; Went back to studio to refresh the table &#8211; but the columns were still there.&#160; Long story short &#8211; there is possibly another defect somewhere in Mapguide around data connections.&#160; They seem to not fully update when you make changes to them.&#160; However, creating a new data connection and pointing to the same SQL server database now shows keys without the null columns.</p>
<p>Moving forward in my code now generated the selection filter and things were good.</p>
<p>I proposed to Autodesk that they auto populate the key fields but then allow the user to modify this list, in addition to correcting the not null constraint issue.&#160;&#160; It seems as though all primary and foreign keys are being found for the table/view and added to the list.&#160; Fair enough, however in the view I was working with I had something like 10+ keys (due to the joins of data tables, as well as the needed lookup tables).&#160;&#160; In reality &#8211; I only was interested in one of those fields.&#160; Filtering based on that one field was enough to uniquely identify the data in question.&#160; I&#8217;m not really familiar with the way FDO does things so this might not be possible.</p>
<div class="wlWriterEditableSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:5c8c2644-2a65-47f3-bba3-e8a16ca1b0d8" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px">Technorati Tags: <a href="http://technorati.com/tags/Mapguide" rel="tag">Mapguide</a>,<a href="http://technorati.com/tags/.NET" rel="tag">.NET</a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.geospecialling.com/index.php/2008/04/mapguide-enterprise-and-not-null-constraints/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

