<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>ThoughtFactory.CreateThought()</title>
	
	<link>http://www.garry-stewart.com/blog</link>
	<description>A random collection of thoughts from an easily bored developer</description>
	<lastBuildDate>Fri, 09 Jul 2010 10:48:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/garry-stewart" /><feedburner:info uri="garry-stewart" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Perth Alt.Net Talk: Does the world end if you stop using Visual Studio?</title>
		<link>http://feedproxy.google.com/~r/garry-stewart/~3/6_s36nCBWoU/</link>
		<comments>http://www.garry-stewart.com/blog/2010/07/09/perth-alt-net-talk-does-the-world-end-if-you-stop-using-visual-studio/#comments</comments>
		<pubDate>Thu, 08 Jul 2010 17:46:33 +0000</pubDate>
		<dc:creator>Garry</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Presentation]]></category>

		<guid isPermaLink="false">http://www.garry-stewart.com/blog/?p=85</guid>
		<description><![CDATA[After hearing so many developers complain that they wouldn&#8217;t be able to code without Visual Studio/Resharper/CodeRush/Intellisense/Source Control IDE Integration/WYSIWYG editors/&#60;Insert Random Tool Here /&#62; , I thought it would be useful to find out how dependent I was on similar tooling. Do I honestly need all the features offered by a &#8220;modern&#8221; IDE? Are these [...]]]></description>
			<content:encoded><![CDATA[<p>After hearing so many developers complain that they wouldn&#8217;t be able to code without Visual Studio/Resharper/CodeRush/Intellisense/Source Control IDE Integration/WYSIWYG editors/&lt;Insert Random Tool Here /&gt; , I thought it would be useful to find out how dependent I was on similar tooling. Do I honestly need all the features offered by a &#8220;modern&#8221; IDE? Are these features helping me or are they reducing the quality of the code I write? Would my productivity flat line if I stopped depending on my IDE?</p>
<p>I honestly can&#8217;t answer any of these questions definitively, so I&#8217;ve decided to strip my coding tool set back to a &#8220;text editor on steroids&#8221; (<a title="Vim" href="http://www.vim.org/">Vim </a>in my case) and command line tooling in an attempt to do some &#8220;modern&#8221; .Net development in an environment that most would consider archaic. In a way I&#8217;m regressing to an environment similar to what I used back before I joined the league of Microsoft developers, so it will be interesting to see how much of the allure of a simpler tool set is nostalgia with no substance and how much is based on the promise of actual productivity gains.</p>
<p>The goal is not so much to shift away from an IDE, but rather to figure out which tools actually make me a better developer and which ones encourage sloppy practices or simply slow me down. Even if I do go back to Visual Studio as my main coding environment of choice I&#8217;ll hopefully have a better understanding of how I should be using the tools to improve the quality of my output.</p>
<p>I&#8217;ll be presenting on my initial experiences at the Perth Alt.Net Group in July. Details are as follows:</p>
<blockquote><p><strong>What:</strong> Does the world end if you stop using Visual Studio?</p>
<p><strong>When:</strong> Wednesday 14th July 2010, 6pm &#8211; Whenever they kick us out</p>
<p><strong>Where:</strong> 43 Below Bar &amp; Bistro, Corner of Barrack Street and Hay Street (underground across from McDonalds)</p></blockquote>
<p>Check out the <a title="Perth Alt.Net Group" href="http://perth.ozalt.net/">Perth Alt.Net Group&#8217;s Website</a> for more details.</p>
<p>In addition, I&#8217;ll also try to formulate my thoughts into something longer than 140 characters (curse you, Twitter!) and post more information about my experiences here over the coming weeks and months.</p>
<img src="http://feeds.feedburner.com/~r/garry-stewart/~4/6_s36nCBWoU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.garry-stewart.com/blog/2010/07/09/perth-alt-net-talk-does-the-world-end-if-you-stop-using-visual-studio/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://www.garry-stewart.com/blog/2010/07/09/perth-alt-net-talk-does-the-world-end-if-you-stop-using-visual-studio/</feedburner:origLink></item>
		<item>
		<title>Hyper-V Networking Issues</title>
		<link>http://feedproxy.google.com/~r/garry-stewart/~3/WKETE29JdhY/</link>
		<comments>http://www.garry-stewart.com/blog/2010/05/02/hyper-v-networking-issues/#comments</comments>
		<pubDate>Sun, 02 May 2010 11:49:49 +0000</pubDate>
		<dc:creator>Garry</dc:creator>
				<category><![CDATA[Server]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Hyper-V]]></category>
		<category><![CDATA[networking]]></category>

		<guid isPermaLink="false">http://www.garry-stewart.com/blog/2010/05/02/hyper-v-networking-issues/</guid>
		<description><![CDATA[Although I’m by no means a Sysadmin, I know just enough to be useful when a room full of developers has a server/network related issue. For the proof of concept I’m currently working on we have to set up our own infrastructure, and seeing as we don’t have a dedicated infrastructure person on the team [...]]]></description>
			<content:encoded><![CDATA[<p>Although I’m by no means a Sysadmin, I know just enough to be useful when a room full of developers has a server/network related issue. For the proof of concept I’m currently working on we have to set up our own infrastructure, and seeing as we don’t have a dedicated infrastructure person on the team I ended up doing most of the software installation and network setup. </p>
<p>As a consequence, I’ve spent the last few weeks playing with various virtual machine technologies, given that we initially had to jury rig a fairly large environment out of whatever laptops and desktops we had on hand. We had some machines running <a href="http://www.vmware.com/products/workstation/" target="_blank">VMware Workstation</a>, some with <a href="http://www.virtualbox.org/" target="_blank">VirtualBox</a> and two large desktops running <a href="http://www.microsoft.com/windowsserver2008/en/us/hyperv-main.aspx" target="_blank">Hyper-V</a>. One of these desktops was my personal dev box that usually sits under my desk at home, but it’s powerful enough that I decided to use it on the project.</p>
<p>The VirtualBox and VMware images were running fine, but all of the images on the Hyper-V machines had abysmal network performance. I tried everything I could think of to improve performance, including upgrading drivers and forcing the speed/duplex settings, but to no avail. </p>
<p>“Surely it must be an issue with the network”, I said. Oh well. Seeing as the environments were only needed for a short period of time I chalked it up to experience and just tried to run as much on one machine as possible. The next environment we were moving to was in another office (difference network gear, different virtual hosts and virtual machines etc) so I wasn’t worried about having the same issues.</p>
<p>Thankfully we didn’t see the same issues after the office move, and the client infrastructure people who set the environment up and sort out issues for us have been fantastic. Great environment, great people, all is good with the world, and I would never run into that nasty network speed issue again…</p>
<p>Until, that is, I took my dev server home and hooked it back up. I tried using terminal server to access one of the virtual machines and once again the performance was dreadful, while connecting to the virtual host was super quick. What gives, Hyper-V? This had to be fixed. </p>
<p>Well, it turns out that I’m not the only one experiencing these issues. A quick Google search <a href="http://blogs.ethz.ch/jlaville/2008/03/25/what-if-you-face-very-slow-network-performance-for-an-hyper-v-virtual-machine/" target="_blank">revealed an issue with TCP Offload</a> settings on Hyper-V Virtual Machines. Apparently the virtual host takes care of this for you, so you should disable any TCP Offload related settings on the virtual machines. The author of the article suggests making a registry modification to disable the setting, but I simply disabled anything related to TCP Offloading in the properties of the NIC on each virtual machine.</p>
<p>The speed increase was both immediate and fantastic. It’s hard to believe that a few hours ago I couldn’t remote desktop into a virtual machine that was sitting a metre away from me with a virtual host that was plugged into the same 1000Mbps switch as my desktop machine without getting timeouts or extreme lag, yet now it flies along.</p>
<p>All this makes me wonder why Hyper-V doesn’t configure this by default. It sets up the drivers for the NIC and there are Hyper-V integration services at work too, so surely the virtual host must have some opportunity to make rather vital config changes like this on the guest operating systems? Considering the guest operating system is nearly unusable without the fix you would think that they would have a big red dialog window that pops up during the installation procedure for each new machine that tells you to apply the change.</p>
<img src="http://feeds.feedburner.com/~r/garry-stewart/~4/WKETE29JdhY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.garry-stewart.com/blog/2010/05/02/hyper-v-networking-issues/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.garry-stewart.com/blog/2010/05/02/hyper-v-networking-issues/</feedburner:origLink></item>
		<item>
		<title>Reporting Services Data Extensions &amp; Access Services in Sharepoint 2010</title>
		<link>http://feedproxy.google.com/~r/garry-stewart/~3/XvEcbpu_cc4/</link>
		<comments>http://www.garry-stewart.com/blog/2010/01/11/reporting-services-data-extensions-access-services-in-sharepoint-2010/#comments</comments>
		<pubDate>Mon, 11 Jan 2010 16:05:43 +0000</pubDate>
		<dc:creator>Garry</dc:creator>
				<category><![CDATA[SharePoint]]></category>

		<guid isPermaLink="false">http://www.garry-stewart.com/blog/?p=83</guid>
		<description><![CDATA[One of the features of Access Services, SharePoint 2010’s new “host Access databases on the web” service, involves the promotion of Access reports to SQL Server Reporting Services (SSRS) reports. Essentially the publishing feature of Access Services takes an Access report and generates an RDL file from it, allowing the SSRS Web control to display [...]]]></description>
			<content:encoded><![CDATA[<p>One of the features of Access Services, SharePoint 2010’s new “host Access databases on the web” service, involves the promotion of Access reports to SQL Server Reporting Services (SSRS) reports. Essentially the publishing feature of Access Services takes an Access report and generates an RDL file from it, allowing the SSRS Web control to display it inside SharePoint.</p>
<p>This feature requires that you have an SharePoint Integrated mode instance of Reporting Services and have configured Reporting Services Integration in SharePoint Central Administration. Assuming that you’ve done all this, you may expect that your reports just show up. Unfortunately this is probably not going to be the case, and you may find yourself being faced with an error similar to the following:</p>
<blockquote><p>An attempt has been made to use a data extension &#8216;ADS&#8217; that is either not registered for this report server or is not supported in this edition of Reporting Services</p>
</blockquote>
<p>The following except from a <a href="http://technet.microsoft.com/en-us/library/ee662542(office.14).aspx">TechNet article</a> gives the solution:</p>
<blockquote><p>Modify the C:\Program Files\Microsoft SQL Server\MSRS10_50.MSSQLSERVER\Reporting Services\ReportServer\rsreportserver.config file on the Reporting Services server. Remove the comments from the ADS data extension. For example:</p>
<p><code>&lt;!-- &lt;Extension Name=&quot;ADS&quot; Type=&quot;Microsoft.Office.Access.Reports.DataProcessing.AdsConnection, Microsoft.Office.Access.Server.DataServer, Version=14.0.0.0, Culture=Neutral, PublicKeyToken=71e9bce111e9429c&quot;/&gt; --&gt;</code><strong>TO</strong></p>
<p><code>&lt;Extension Name=&quot;ADS&quot; Type=&quot;Microsoft.Office.Access.Reports.DataProcessing.AdsConnection, Microsoft.Office.Access.Server.DataServer, Version=14.0.0.0, Culture=Neutral, PublicKeyToken=71e9bce111e9429c&quot;/&gt; --&gt;</code></p>
</blockquote>
<p>This allows Reporting Services to construct a data set out of a particular data source. You can find more information on Reporting Services Extensions <a href="http://msdn.microsoft.com/en-us/library/ms152934.aspx">here</a>, and more specifically Data Processing Extensions <a href="http://msdn.microsoft.com/en-us/library/ms154655.aspx">here</a>. </p>
<p>The interesting thing about all this is that Access Services actually promotes all of your Access tables to SharePoint lists, making me wonder why the generated SSRS reports need to know about Access at all. MIcrosoft.ReportingServices.DataExtensions.SharePointList.SPListConnection already provides an implementation that talks to SharePoint lists, so why not use that? I figured that I’d do a little digging into the SharePoint site generated by Access Services to find out just why they needed their own Data Extension.</p>
<p>If you navigate to the _layouts/viewlsts.aspx page (type it into your address bar directly, so <a href="http://mysite/Applications/MyApplication/_layouts/viewlsts.aspx">http://mysite/Applications/MyApplication/_layouts/viewlsts.aspx</a>) of your Access Services application you should be able to explore the Report library and associated lists that make up your application. Inside the Report library you’ll notice that there is an &quot;”AccessDataSource”, who’s connection string contains both the SiteId and WebId of your application, and whose Data Source Type is “ADS”. This tells us that, at the very least, the report knows that it’s communicating with a particular SharePoint Site.</p>
<p>If you download a copy of one of the report RDL files and check it out in a text or XML editor you’ll notice something interesting; inside the DataSet element there is a Query definition that looks something like the following:</p>
<p> <code>&lt;Query&gt;    <br />&lt;DataSourceName&gt;ADS&lt;/DataSourceName&gt;     <br />&lt;CommandText&gt;_sq_rContactList&lt;/CommandText&gt;     <br />&lt;QueryParameters&gt;     <br />&lt;QueryParameter Name=&quot;AccSrv_Where&quot;&gt;     <br />&lt;Value&gt;=Parameters!AccSrv_Where.Value&lt;/Value&gt;     <br />&lt;/QueryParameter&gt;     <br />&lt;/QueryParameters&gt;     <br />&lt;/Query&gt; </code>
<p>The important thing to note here is the CommandText element. Access Services stores most of your Access objects, including queries, as serialised text inside list items in a list called MSysASO. If you inspect that list you’ll find a list item matching up with the CommandText from your DataSet Query inside your RDL file. </p>
<p>If you look at the ServerObject field of this list item you’ll see something that initially looks somewhat like a CAML query but is actually a query from the Access Services namespace, <a href="http://schemas.microsoft.com/office/accessservices/2009/04/application">http://schemas.microsoft.com/office/accessservices/2009/04/application</a>.</p>
<p>Here’s an example of one of these queries:</p>
<p> <code>&lt;Query xmlns=&quot;<a href="http://schemas.microsoft.com/office/accessservices/2009/04/application&quot;">http://schemas.microsoft.com/office/accessservices/2009/04/application&quot;</a> Name=&quot;_sq_rContactList&quot;&gt;&lt;References&gt; &lt;Reference Source=&quot;_sq_rContactList_Base&quot; /&gt;&lt;/References&gt;&lt;Results&gt;&lt;Property Source=&quot;_sq_rContactList_Base&quot; Name=&quot;Address&quot; /&gt;&lt;Property Source=&quot;_sq_rContactList_Base&quot; Name=&quot;BusinessPhone&quot; /&gt;&lt;Property Source=&quot;_sq_rContactList_Base&quot; Name=&quot;City&quot; /&gt;&lt;Property Source=&quot;_sq_rContactList_Base&quot; Name=&quot;Company&quot; /&gt;&lt;Property Source=&quot;_sq_rContactList_Base&quot; Name=&quot;ContactName&quot; /&gt;&lt;Property Source=&quot;_sq_rContactList_Base&quot; Name=&quot;CountryRegion&quot; /&gt;&lt;Property Source=&quot;_sq_rContactList_Base&quot; Name=&quot;EmailAddress&quot; /&gt;&lt;Property Source=&quot;_sq_rContactList_Base&quot; Name=&quot;FaxNumber&quot; /&gt;&lt;Property Source=&quot;_sq_rContactList_Base&quot; Name=&quot;HomePhone&quot; /&gt;&lt;Property Source=&quot;_sq_rContactList_Base&quot; Name=&quot;JobTitle&quot; /&gt;&lt;Property Source=&quot;_sq_rContactList_Base&quot; Name=&quot;LastName&quot; /&gt;&lt;Property Source=&quot;_sq_rContactList_Base&quot; Name=&quot;MobilePhone&quot; /&gt;&lt;Property Source=&quot;_sq_rContactList_Base&quot; Name=&quot;StateProvince&quot; /&gt;&lt;Property Source=&quot;_sq_rContactList_Base&quot; Name=&quot;ZIPPostal&quot; /&gt;&lt;/Results&gt;&lt;/Query&gt; </code>
<p>At first glance this doesn’t tell us a whole lot; it just seems to be a collection of field names that we would want to fetch in our query, but it doesn’t say anything about where the data is coming from or whether there are any restrictions on what data we should bring back. You will notice, however, that it seems to reference another item in the MSysASO list through the Source attribute of the Property element. In this it is referencing the _sq_rContactList_Base list item, which looks like the following:</p>
<p> <code>&lt;Query xmlns=&quot;<a href="http://schemas.microsoft.com/office/accessservices/2009/04/application&quot;">http://schemas.microsoft.com/office/accessservices/2009/04/application&quot;</a>&gt; &lt;References&gt; &lt;Reference Source=&quot;Contacts&quot;/&gt;&lt;/References&gt;&lt;Results&gt;&lt;Property Source=&quot;Contacts&quot; Name=&quot;Company&quot;/&gt;&lt;Property Source=&quot;Contacts&quot; Name=&quot;ID&quot;/&gt;&lt;Property Source=&quot;Contacts&quot; Name=&quot;LastName&quot;/&gt;&lt;Property Source=&quot;Contacts&quot; Name=&quot;FirstName&quot;/&gt;&lt;Property Source=&quot;Contacts&quot; Name=&quot;EmailAddress&quot;/&gt;&lt;Property Source=&quot;Contacts&quot; Name=&quot;JobTitle&quot;/&gt;&lt;Property Source=&quot;Contacts&quot; Name=&quot;BusinessPhone&quot;/&gt;&lt;Property Source=&quot;Contacts&quot; Name=&quot;HomePhone&quot;/&gt;&lt;Property Source=&quot;Contacts&quot; Name=&quot;MobilePhone&quot;/&gt;&lt;Property Source=&quot;Contacts&quot; Name=&quot;FaxNumber&quot;/&gt;&lt;Property Source=&quot;Contacts&quot; Name=&quot;Address&quot;/&gt;&lt;Property Source=&quot;Contacts&quot; Name=&quot;City&quot;/&gt;&lt;Property Source=&quot;Contacts&quot; Name=&quot;StateProvince&quot;/&gt;&lt;Property Source=&quot;Contacts&quot; Name=&quot;ZIPPostal&quot;/&gt;&lt;Property Source=&quot;Contacts&quot; Name=&quot;CountryRegion&quot;/&gt;&lt;Property Source=&quot;Contacts&quot; Name=&quot;WebPage&quot;/&gt;&lt;Property Source=&quot;Contacts&quot; Name=&quot;Notes&quot;/&gt;&lt;Property Source=&quot;Contacts&quot; Name=&quot;_OldID&quot;/&gt;&lt;Property Source=&quot;Contacts&quot; Name=&quot;ContactName&quot;/&gt;&lt;Property Source=&quot;Contacts&quot; Name=&quot;FileAs&quot;/&gt;&lt;Property Source=&quot;Contacts&quot; Name=&quot;Attachments&quot;/&gt;&lt;Property Source=&quot;Contacts&quot; Name=&quot;SharePointEditor&quot;/&gt;&lt;Property Source=&quot;Contacts&quot; Name=&quot;SharePointAuthor&quot;/&gt;&lt;Property Source=&quot;Contacts&quot; Name=&quot;SharePointModifiedDate&quot;/&gt;&lt;Property Source=&quot;Contacts&quot; Name=&quot;SharePointCreatedDate&quot;/&gt;&lt;/Results&gt;&lt;Restriction&gt;=(((Contacts.Company)&amp;lt;&amp;gt;&quot;Local Bank&quot;))&lt;/Restriction&gt;&lt;/Query&gt; </code>
<p>This second query contains the meat and potatoes of the query itself, including any query restrictions (which you can see in my example where I have restricted the data where Contacts.Company &lt;&gt; “Local Bank”) and the source tables and fields where the data is coming from.</p>
<p>As such, each query is actually made of of two serialised objects stored in two separate list items inside the MSysASO list;&#160; _sq_r%ReportName% and _sq_r%ReportName%_Base. With these two objects, when combined with the ADS Data Extension and the SiteId/WebId referenced in the Reporting Services Data Source object previously discussed, Reporting Services now has enough information to fetch the appropriate data for the report.</p>
<p>So it is reasonable to infer from all this that the reason Microsoft don’t use the MIcrosoft.ReportingServices.DataExtensions.SharePointList.SPListConnection Data Extension is because they needed to be able to perform lookups into their shared resources list (MSysASO) to fetch the real query that they want to run, hence needing a custom Data Extension to do so. The use of this central repository makes total sense, especially when combined with Access’ shared query model where multiple reports could be referencing the same query. If they did not do this and simply relied upon the SharePoint List Data Extension then they would essentially have to generate CAML queries for each report, repeating them inside each RDL file as needed.</p>
<img src="http://feeds.feedburner.com/~r/garry-stewart/~4/XvEcbpu_cc4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.garry-stewart.com/blog/2010/01/11/reporting-services-data-extensions-access-services-in-sharepoint-2010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.garry-stewart.com/blog/2010/01/11/reporting-services-data-extensions-access-services-in-sharepoint-2010/</feedburner:origLink></item>
		<item>
		<title>Refreshing Reports using URL access in Reporting Services</title>
		<link>http://feedproxy.google.com/~r/garry-stewart/~3/3qy2CIQFcmE/</link>
		<comments>http://www.garry-stewart.com/blog/2009/07/09/refreshing-reports-using-url-access-in-reporting-services/#comments</comments>
		<pubDate>Thu, 09 Jul 2009 07:10:15 +0000</pubDate>
		<dc:creator>Garry</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[MVC]]></category>
		<category><![CDATA[reporting services]]></category>

		<guid isPermaLink="false">http://www.garry-stewart.com/blog/?p=80</guid>
		<description><![CDATA[In the past I&#8217;ve been a fairly big advocate of the Microsoft Report Viewer control for accessing SQL Server Reporting Services reports from within a web application, simply because it allows authentication to be proxied through the host application (so you can use a service account to talk to reporting services and control security through [...]]]></description>
			<content:encoded><![CDATA[<p>In the past I&#8217;ve been a fairly big advocate of the Microsoft Report Viewer control for accessing SQL Server Reporting Services reports from within a web application, simply because it allows authentication to be proxied through the host application (so you can use a service account to talk to reporting services and control security through your application rather than adding every user in your application to reporting services), but the control requires a traditional ASP.Net webforms Form and page life cycle, so it&#8217;s out of the picture for ASP.Net MVC development.</p>
<p>To solve the problem I turned to Reporting Services&#8217; URL Access functionality that allows direct linking to reports while still giving you control over parameters, the toolbars and other functionality through the use of variables passed in via the query string. I used iframes to get the inline reports onto the page, and just linked directly to the reports that were meant to open in their own window.</p>
<p>This was great until I noticed that the data on the report was not being refreshed at a regular interval, leaving users with stale data on screen. A quick check of the report in Report Manager confirmed that the data was in the system and the report updated correctly when shown through Reporting Services&#8217; own interface.</p>
<p>A quick inspection of the execution parameters of my report (located under properties-&gt;execution for each report in Report Manager) showed that I was not using the in built Reporting Services caching, so I figured I was dealing with some sort of HTTP caching. This lead me to try one of the oldest tricks in the &#8220;how to fool the HTTP cache duration&#8221; book, random junk parameters. The theory behind this is that adding a random parameter that is not used by an application to the end of a query string will tell the web server that this is a request that it hasn&#8217;t seen before, and hence it will need to figure out the actual result rather than looking in the cache. I postfixed the URL with something along the lines of &#8220;&amp;RefreshParameter=&#8221; + System.DateTime.Now.Ticks.ToString(), and hoped for the best.</p>
<p>Unfortunately it did nothing. Realising that the problem had nothing to do with HTTP caching I thought that I&#8217;d try and apply the same trick to an actual report parameter to see if reporting services could be fooled in a similar manner. The URL Access feature allows you to specify reporting services parameters on the query string in the exact same format as the &#8220;RefreshParameter&#8221; I had already created, so I simply had to make a new parameter on each of my reports called &#8220;RefreshParameter&#8221; that accepts blank/null values and does nothing. This worked a treat, enabling me to have current data displayed in iframes on my MVC site.</p>
<p><strong>Update:</strong> <a target="_blank" href="http://codebetter.com/blogs/peter.van.ooijen/archive/2005/10/05/132789.aspx" title="Peter Van Ooijen on caching in Reporting Services"><em>Peter Van Ooijen suggests</em></a><em> that using the rc:ClearSession=true parameter may work in some scenarios (but apparently not all). Some people seem to have had good mileage by combining both the session clearing and the random variables. </em></p>
<img src="http://feeds.feedburner.com/~r/garry-stewart/~4/3qy2CIQFcmE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.garry-stewart.com/blog/2009/07/09/refreshing-reports-using-url-access-in-reporting-services/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		<feedburner:origLink>http://www.garry-stewart.com/blog/2009/07/09/refreshing-reports-using-url-access-in-reporting-services/</feedburner:origLink></item>
		<item>
		<title>When You Assume..</title>
		<link>http://feedproxy.google.com/~r/garry-stewart/~3/TF0Yt308mDY/</link>
		<comments>http://www.garry-stewart.com/blog/2009/04/26/when-you-assume/#comments</comments>
		<pubDate>Sun, 26 Apr 2009 13:34:48 +0000</pubDate>
		<dc:creator>Garry</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[cleartype]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.garry-stewart.com/blog/?p=78</guid>
		<description><![CDATA[I, like many others, have never thought of Linux as a &#8220;pretty&#8221; operating system, instead choosing to think of it as the home of &#8220;best effort&#8221; programmer-designed GUIs and &#8220;command line first&#8221; design. This line of thought has set my expectations for my desktop Linux environments at home. When I switched to running Linux as [...]]]></description>
			<content:encoded><![CDATA[<p>I, like many others, have never thought of Linux as a &#8220;pretty&#8221; operating system, instead choosing to think of it as the home of &#8220;best effort&#8221; programmer-designed GUIs and &#8220;command line first&#8221; design.</p>
<p>This line of thought has set my expectations for my desktop Linux environments at home. When I switched to running Linux as my main Desktop machine 18 months ago I noticed that the fonts were nowhere near as nice as my Mac and Windows machines. Blindly assuming that Ubuntu didn&#8217;t support ClearType, I simply went about my business and put up with the horrible fonts.</p>
<p>That was up until today, when I finally decided to investigate. It turns out that Ubuntu fully supports ClearType (although they call it &#8220;subpixel smoothing&#8221;), it&#8217;s just turned off by default. There&#8217;s even a <a href="http://www.killertechtips.com/2008/04/10/how-to-turn-on-cleartype-in-ubuntu-linux/" target="_blank">handy GUI for turning it on</a>. I&#8217;m never going to assume that my OS has to look like a dog&#8217;s breakfast ever again.</p>
<img src="http://feeds.feedburner.com/~r/garry-stewart/~4/TF0Yt308mDY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.garry-stewart.com/blog/2009/04/26/when-you-assume/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.garry-stewart.com/blog/2009/04/26/when-you-assume/</feedburner:origLink></item>
		<item>
		<title>Now You See It</title>
		<link>http://feedproxy.google.com/~r/garry-stewart/~3/Dv_kuVT3Va8/</link>
		<comments>http://www.garry-stewart.com/blog/2009/02/19/now-you-see-it/#comments</comments>
		<pubDate>Thu, 19 Feb 2009 15:50:30 +0000</pubDate>
		<dc:creator>Garry</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Infopath]]></category>

		<guid isPermaLink="false">http://www.garry-stewart.com/blog/?p=76</guid>
		<description><![CDATA[Today I was helping out one of my colleagues with a particularly annoying InfoPath problem; he wanted to enable the multi-line option for a text box bound to a web service, but whenever he did the read-only option would automatically trigger. Truly frustrating. Not being one to believe that things are impossible, I decided to [...]]]></description>
			<content:encoded><![CDATA[<p>Today I was helping out one of my colleagues with a particularly annoying InfoPath problem; he wanted to enable the multi-line option for a text box bound to a web service, but whenever he did the read-only option would automatically trigger. Truly frustrating.<br />
<img src="/images/infopath_textbox/textbox_properties_readonly.gif" alt="InfoPath Text Box Properties - Read Only Multi-line" border="2" /><br />
Not being one to believe that things are impossible, I decided to take a crack at it at home, and as soon as the kids were in bed I got stuck into Everyone&#8217;s Favorite Search Engine (TM). Unfortunately, Google was not my friend on this problem; I found all sorts of information about binding Rich Text Boxes to Web Services and forcing text boxes to re-size when using Forms Server, but nothing related to editable mutli-line text boxes.</p>
<p>I decided that the best idea was to try and replicate the problem, so I fired up my trusty Win2k8 VM, made a quick ASMX web service and hooked it up to an InfoPath form. Sure enough, as soon as I tried to enable the Multi-line option of a text box it became read only. Reassuringly, it worked when using an unbound text box, which at least let me know that displaying editable mutli-line text boxes in InfoPath is possible.</p>
<p>The fact that the problem was only occurring with web service data-sources made me suspect that the schema being returned by the web service may be the key, but upon inspection the schema InfoPath created for my web service connection was using exactly the same types as the schema for my default form data-source. The elements were not read only, and I couldn&#8217;t see anything else out of the ordinary in the schema. So much for that idea.</p>
<p>Then it clicked. The problem had been staring me in the face the whole time in the guise of a huge red circle with a white &#8220;x&#8221; through the middle; the form was configured for InfoPath Form Services compatibility, which disables certain options. This MUST have something to do with the problem. I quickly turned off Form Services compatibility then turn on the Multi-line option again, and&#8230;.</p>
<p>&#8230; the field became read only. Doh! But wait! There were two sub-options under Mutli-line: Paragraph breaks and Wrap text. In Form Services compatibility mode I could not edit these options, and selecting Mutli-line highlighted both, which in turn highlighted the read-only option, but with compatibility mode turned off I was now free to edit these values.</p>
<p><img src="/images/infopath_textbox/textbox_properties_after.gif" alt="InfoPath Text Box Properties - Editable Multi-Line" style="margin-left: 3px" align="right" border="2" />Then it hit me. I noticed that, by default, I couldn&#8217;t select the Paragraph breaks option unless the read-only option was checked. That was it! For some reason, InfoPath can&#8217;t handle having paragraph breaks in a text box when it&#8217;s bound to a web service</p>
<p>So instead of clicking on Multi-line I clicked on Wrap text. This checked the Mutli-line option for me, and at the very least let me have a text box that could wrap text onto a new line. I could live with not being able to have paragraph breaks, but unfortunately I could only select this mode in InfoPath Form Services compatibility mode, meaning that I wouldn&#8217;t get all the fancy error checking to make sure that it would work when viewed over the web. When in compatibility mode, clicking on Multi-line would still check the Paragraph breaks option which would then force the control to be read only. I couldn&#8217;t win.</p>
<p>Or could I? On a whim I turned off compatibility mode again and set up my control to be Mutli-line/Wrap text as described above, then I turned compatibility mode back on. Success! The options stayed as they were, giving me a mutli-line text box that wasn&#8217;t read-only. I would just have to make the necessary multi-line related changes to my fields with compatibility mode turned off, and only turne it on for the specific occasions where I would need it.</p>
<p>Not a great solution, sure, but at least it works, and that&#8217;s certainly better than nothing. I&#8217;m honestly still amazed that I couldn&#8217;t find any info about this on Google, though. I would have thought that using a bound multi-line text box would be a more common use case.</p>
<img src="http://feeds.feedburner.com/~r/garry-stewart/~4/Dv_kuVT3Va8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.garry-stewart.com/blog/2009/02/19/now-you-see-it/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.garry-stewart.com/blog/2009/02/19/now-you-see-it/</feedburner:origLink></item>
		<item>
		<title>The Future is Looking Good</title>
		<link>http://feedproxy.google.com/~r/garry-stewart/~3/sVdNGCezv60/</link>
		<comments>http://www.garry-stewart.com/blog/2009/01/26/the-future-is-looking-good/#comments</comments>
		<pubDate>Tue, 27 Jan 2009 03:00:43 +0000</pubDate>
		<dc:creator>Garry</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[MSDN]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://www.garry-stewart.com/blog/?p=75</guid>
		<description><![CDATA[As I&#8217;ve previously mentioned, as of October 1st 2008 MSDN subscribers who have previously only had access to Visual Studio Team System Development Edition can now also use Database Edition. The reasoning behind this move has now been made clear thanks to the January MSDN Subscription Newsletter: In the next release of Visual Studio Team [...]]]></description>
			<content:encoded><![CDATA[<p>As I&#8217;ve <a href="http://www.garry-stewart.com/blog/?p=61" target="blank">previously mentioned</a>, as of October 1st 2008 MSDN subscribers who have previously only had access to Visual Studio Team System Development Edition can now also use Database Edition. The reasoning behind this move has now been made clear thanks to the January MSDN Subscription Newsletter:</p>
<blockquote><p>In the next release of Visual Studio Team System we will be merging the feature sets of the Development Edition and the Database Edition into a single product. The new product will include all of the features in the Development Edition and the Database Edition as well as new capabilities delivering even more value in a single product. This will provide a more complete set of capabilities for building software in today’s data-driven environments. Bringing these two feature sets together enables you to take advantage of the core tools for application development as well as the necessary tools for database development, including performance profiling, code analysis, code metrics, code coverage, database refactoring, Schema Compare, Data Compare, and more</p></blockquote>
<p>Looks like they&#8217;ve finally got the message that a large proportion of developers still need to touch the database, and as a result will be combining the Developer and Database editions of VSTS in the next version. Now if only they could get rid of the comparatively useless Architect edition. Roll on VS 2010!</p>
<img src="http://feeds.feedburner.com/~r/garry-stewart/~4/sVdNGCezv60" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.garry-stewart.com/blog/2009/01/26/the-future-is-looking-good/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.garry-stewart.com/blog/2009/01/26/the-future-is-looking-good/</feedburner:origLink></item>
		<item>
		<title>The Misleading Error Message Strikes Again</title>
		<link>http://feedproxy.google.com/~r/garry-stewart/~3/vBrVev_o12Y/</link>
		<comments>http://www.garry-stewart.com/blog/2009/01/11/the-misleading-error-message-strikes-again/#comments</comments>
		<pubDate>Mon, 12 Jan 2009 06:48:20 +0000</pubDate>
		<dc:creator>Garry</dc:creator>
				<category><![CDATA[User Experience]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.garry-stewart.com/blog/?p=73</guid>
		<description><![CDATA[We&#8217;ve got a stock standard Windows 2008 virtual hard drive image at work that I wanted to make some additions to and generally polish up into a decent developer image. The install media was the &#8220;Windows Server 2008 Datacenter, Enterprise and Standard (x86) &#8211; DVD (English)&#8221; ISO sourced from MSDN. I noticed that the image [...]]]></description>
			<content:encoded><![CDATA[<p>We&#8217;ve got a stock standard Windows 2008 virtual hard drive image at work that I wanted to make some additions to and generally polish up into a decent developer image. The install media was the &#8220;Windows Server 2008 Datacenter, Enterprise and Standard (x86) &#8211; DVD (English)&#8221; ISO sourced from MSDN.</p>
<p>I noticed that the image had not yet been activated, so I set out to rectify the situation. Hopping into the system settings in control panel, I navigated down the the section on product key information and clicked on the link to activate windows. Unfortunately this process errored out with the following message:</span></p>
<blockquote><p>Code: 0x8007232B<br/><br />
Description:  DNS name does not exist.</p></blockquote>
<p>I immediately checked network connectivity. Can I get to google? Yes. Can I resolve MS addresses? Yes. Hmm.</p>
<p>Then I happened to notice some text in the bottom right hand corner of my desktop:</p>
<blockquote><p>Windows Server(R) 2008 Standard<br/><br />
Evaluation copy. Build 6002</p></blockquote>
<p>Evaluation copy? That means that my product key is not going to be valid. So I grabbed a new product key from MSDN, entered that in and tried the activation process again. Success!</p>
<p>After all that I still can&#8217;t figure out what a DNS error has to do with a product key being invalid. I would have been more than happy with something along the lines of &#8220;Unable to activate due to invalid product key&#8221;. They may as well have told me that activation failed due to insufficient vegemite.</p>
<img src="http://feeds.feedburner.com/~r/garry-stewart/~4/vBrVev_o12Y" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.garry-stewart.com/blog/2009/01/11/the-misleading-error-message-strikes-again/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.garry-stewart.com/blog/2009/01/11/the-misleading-error-message-strikes-again/</feedburner:origLink></item>
		<item>
		<title>Creating a Monster – Part 1 – The Beginning</title>
		<link>http://feedproxy.google.com/~r/garry-stewart/~3/nVyfS3UNyq4/</link>
		<comments>http://www.garry-stewart.com/blog/2009/01/10/creating-a-monster-part-1-the-beginning/#comments</comments>
		<pubDate>Sat, 10 Jan 2009 15:23:37 +0000</pubDate>
		<dc:creator>Garry</dc:creator>
				<category><![CDATA[Music]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[guitar]]></category>
		<category><![CDATA[modifications]]></category>

		<guid isPermaLink="false">http://www.garry-stewart.com/blog/?p=72</guid>
		<description><![CDATA[Ferreting around in a spare room/cupboard/garage/other junk storage area can sometimes yield a wonderful surprise. I recently re-discovered an old, broken guitar sitting in our spare bathroom (which has been totally stripped awaiting renovation for.. oh, about 2 years now, and is now serving as an extra large cupboard. But that&#8217;s another story); an Epiphone [...]]]></description>
			<content:encoded><![CDATA[<p>Ferreting around in a spare room/cupboard/garage/other junk storage area can sometimes yield a wonderful surprise. I recently re-discovered an old, broken guitar sitting in our spare bathroom (which has been totally stripped awaiting renovation for.. oh, about 2 years now, and is now serving as an extra large cupboard. But that&#8217;s another story); an Epiphone Les Paul Special II that I picked up for AUD200 back in 1999. It was the first electric guitar I ever played on stage, and even though it&#8217;s a cheap piece of junk it will always hold a special place in my heart.</p>
<p>Upon inspection it was clear that time had not been kind to the guitar. I had originally put it into storage after the nut broke next to the 6th string, effectively making the guitar useless in it&#8217;s current state.</p>
<p><img src="http://farm4.static.flickr.com/3495/3184232843_bc550f4eb6.jpg" alt="The original broken nut" border="2" height="333" width="500" /></p>
<p>Numerous other problems presented themselves, leading to a rather impressive list of ailments:</p>
<ul>
<li>Machine heads that were falling apart and would not keep the strings in tune.</li>
<li>Broken nut, limiting the guitar to 5 strings</li>
<li>Crackling tone and volume pots</li>
<li>A loose input socket</li>
<li>Weak sound from the pickups</li>
<li>A noisy pickup switch</li>
<li>Annoying hum indicating that the guitar was not properly grounded</li>
</ul>
<p><img src="http://farm4.static.flickr.com/3095/3181491491_34378ef7dd.jpg" alt="Broken machine head" border="2" height="333" width="500" /></p>
<p>Given that list and my eagerness to give a task a go as long as it seems interesting enough, I decided to attempt some modifications myself.</p>
<p>First, let me be very clear about something: I know absolutely nothing about guitar modifications, woodworking or electrics. If you&#8217;re after a guide on how to do any of this then check out the various articles I reference throughout the post. I did this because I was bored and wanted to find out how to do this sort of thing. The guitar I tried it on was broken anyway and I was fine with the prospect of breaking it some more. Ultimately I&#8217;d like to get good enough to make modifications to some of my more expensive instruments, but until that time I&#8217;ll settle for practising on guitars that are next to worthless.</p>
<p>If this works out well then I&#8217;ve got another two guitars that need physical repairs and another 3 that could do with shielding as well as having the grounding looked at. The cheap Yamaha bass I picked up a few years back suffered from a horrible hum when I&#8217;m not touching the strings, which indicates that it&#8217;s not properly grounded, so I&#8217;ll have to take a look at that, too.</p>
<p>The first thing I had to do was pick replacement parts. The machine heads were easy; I ordered a set of non-locking Gotohs. I&#8217;ve never tried locking machine heads, so I figured that I&#8217;d stick with what I know. The guitar has a fixed bridge, so it simply needs a decent set of machine heads to keep it in tune.</p>
<p>The nut was a different story. Normally I&#8217;d get someone to cut a new bone nut from a blank, but there was no way I had the time or patience to do that this time around. I also couldn&#8217;t drop the guitar off at a shop for any period of time, as I&#8217;d be putting all the other hardware on it myself so I&#8217;d need to have access to it.</p>
<p>I could have bought myself a blank bone nut and shaped it myself, but it looks like a long, complicated process that involves specialist tools, a well thought out plan and actual skill; none of which I have. Fortunately I was able to buy a basic graphite nut in the same profile as the original, broken nut. As long as it is the correct height you can usually get away with attaching the nut without modification. At most I&#8217;d be up for a little filing to lower the height slightly.</p>
<p>But what about the electrics? How do I get rid of that hum? How do I rewire the guitar? To the intarwebs!</p>
<p>There&#8217;s an excellent <a href="http://www.guitarnuts.com/wiring/shielding/shield3.php" target="_blank">article</a> on properly grounding and wiring guitars over at <a href="http://www.guitarnuts.com/" target="_blank">Guitar Nuts</a> that caught my eye. The basic idea is to insulate, create a single path to ground and create a makeshift <a href="http://en.wikipedia.org/wiki/Faraday_cage" target="_blank">Faraday Cage</a>. To accomplish this I would need some copper backed tape and a lot of guess work. Unfortunately the article is geared towards a Fender Strat style guitar, so there were still a few problems that I would have to solve.</p>
<p>Darrell Young over at <a href="http://www.digitaldarrell.com/" target="_blank">Digital Darrell</a> has an excellent <a href="http://www.digitaldarrell.com/guitar/Article-UpgradeLindaPickups.asp" target="_blank">article</a> on replacing the pickups in the exact same model of guitar that I&#8217;m working on. When I do the actual modification I&#8217;m sure that I&#8217;ll be be referring to this with some frequency.</p>
<p>Unlike Darrell there&#8217;s no way I&#8217;m going to spring for authentic Gibson pickups given that this is the first time I&#8217;ve ever tried anything like this. Instead I&#8217;m looking at getting a pair of cheap Gotoh humbuckers. Gotoh themselves are better known for their hardware (floating bridges, machine heads etc. In fact, the machine heads I put on the guitar are Gotoh), but they make a range of cheap, relatively high quality pickups that are made in Japan and can be picked up for around AUD40-AUD50. I managed to find a <a href="http://www.stewmac.com/freeinfo/I-GOTOH.html" target="_blank">wiring guide for Gotoh pickups</a> online, so I can do some pre-planning to figure out what my circuit is actually going to look like before the pickups arrive.</p>
<p>In order to fix the noisy volume and tone pots I would need to replace them. A pot is basically a variable resistor that can be used to alter the signal coming from your pickups. There are two main levels of resistence used in guitars; 250k and 500k. You also occasionally see 1Meg pots. A high resistance pot will retain more of the high frequencies in the signal.</p>
<p>As a general rule of thumb, the 250k models are normally used with single coil pickups to avoid an overly shrill sound. Since I&#8217;ll be putting humbuckers into the guitar I&#8217;ll be going with 500k replacements.</p>
<p><img src="http://farm4.static.flickr.com/3438/3182351416_afe9ab0e86.jpg" alt="Misc Parts" border="2" height="333" width="500" /></p>
<p>Quite a few of the parts have arrived, and over the next few weeks I&#8217;ll slowly but surely be progressing with the modification. I&#8217;ll be taking plenty of photos, and will be uploading themto a <a href="http://www.flickr.com/photos/10100979@N03/sets/72157612308078601/" target="_blank">set on my Flickr stream</a> as I go. Next thing on my agenda: remember enough about electronics from high school to avoid electrocuting myself.</p>
<img src="http://feeds.feedburner.com/~r/garry-stewart/~4/nVyfS3UNyq4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.garry-stewart.com/blog/2009/01/10/creating-a-monster-part-1-the-beginning/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.garry-stewart.com/blog/2009/01/10/creating-a-monster-part-1-the-beginning/</feedburner:origLink></item>
		<item>
		<title>InfoPath Form Security and Custom Code</title>
		<link>http://feedproxy.google.com/~r/garry-stewart/~3/dz7y0chhkqQ/</link>
		<comments>http://www.garry-stewart.com/blog/2009/01/06/infopath-form-security-and-custom-code/#comments</comments>
		<pubDate>Tue, 06 Jan 2009 14:58:52 +0000</pubDate>
		<dc:creator>Garry</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Infopath]]></category>

		<guid isPermaLink="false">http://www.garry-stewart.com/blog/?p=71</guid>
		<description><![CDATA[Generic error messages are high on my list of pet peeves. Being told that &#8220;an error occurred&#8221; may be something that you can pass off in a line of business application, especially if the actual error message gets emailed to the help desk or something similar, but it is totally unacceptable in a product targeted [...]]]></description>
			<content:encoded><![CDATA[<p>Generic error messages are high on my list of pet peeves. Being told that &#8220;an error occurred&#8221; may be something that you can pass off in a line of business application, especially if the actual error message gets emailed to the help desk or something similar, but it is totally unacceptable in a product targeted towards software developers.</p>
<p>Tonight, when trying to add some managed code to an InfoPath 2007 solution, I ran into one of these horrible errors. InfoPath was presenting me with a highly helpful &#8220;InfoPath cannot open the selected form&#8221; error message whenever I tried to debugging the solution.</p>
<p>After spending a few minutes scratching my head I remembered that InfoPath forms need to run in Full Trust mode in order to use managed code. I navigated to &#8220;Tools&gt;Form Options&gt;Security and Trust&#8221; and had a look at the settings, which were still set to the default &#8220;Automatically determine security level&#8221;. Unfortunately I assumed that, when using this setting, InfoPath would be able to figure out that I was using managed code and select the appropriate security level. Obviously my assumption was incorrect.<br />
<img src="/images/infopathsecurityform.gif" alt="InfoPath Security Settings" height="554" width="603" style="border: 2px solid #000000" /><br />
After setting the level of trust to &#8220;Full Trust&#8221; I was finally able to launch the form, complete with managed code.</p>
<p>If I had not previously read about security and trust within InfoPath then I would have had to waste more time floundering on Google with only a generic error message to help me. All that could have been avoided if they had just presented me with a dialog saying &#8220;The form has an insufficient trust level to perform this operation&#8221;. Well, either that or make the &#8220;Automatically determine security level&#8221; trust setting actually determine an appropriate trust level in the first place.</p>
<img src="http://feeds.feedburner.com/~r/garry-stewart/~4/dz7y0chhkqQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.garry-stewart.com/blog/2009/01/06/infopath-form-security-and-custom-code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.garry-stewart.com/blog/2009/01/06/infopath-form-security-and-custom-code/</feedburner:origLink></item>
	</channel>
</rss>
