<?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>Sun, 25 Jul 2010 05:15:41 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>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>0</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>0</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 [...]]]></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 machine [...]]]></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 this:
The [...]]]></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>1</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>0</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 though) [...]]]></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 some [...]]]></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[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 Google looking for SQL scripts – and I can’t seem to find anything, or I [...]]]></description>
			<content:encoded><![CDATA[<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>
<p>
<div class="wlWriterEditableSmartContent" id="scid:fb3a1972-4489-4e52-abe7-25a00bb07fdf:e5d0b4d1-df0c-47b2-b4da-c12ae3943183" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px">
<p> <a href="http://www.landoris.com/blogs/darrin/wp-content/uploads/2009/02/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 class="wlWriterEditableSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:6c599aad-2efa-4e10-bc42-fbf5178ce26b" 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/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>0</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[Autodesk University]]></category>
		<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 3D [...]]]></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 number [...]]]></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 I’d [...]]]></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 &#8217;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>0</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>0</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&#8217;s become int, and Int64&#8217;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>0</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>1</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 may [...]]]></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>0</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