<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-21774696</id><updated>2012-01-23T20:25:42.545-08:00</updated><title type='text'>Steve's Tech Notes</title><subtitle type='html'>A place for me to store and share some technical notes about BizTalk or whatever else I'm working with at the moment.&lt;br&gt;
&lt;br&gt;
&lt;i&gt;The views expressed on this blog are mine alone and do not necessarily reflect the views of my employer.&lt;/i&gt;</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://stevestechnotes.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/21774696/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://stevestechnotes.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Steve Harclerode</name><uri>http://www.blogger.com/profile/01048793793830514398</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_NWdMoFXGm5U/Sp2oRQ30x-I/AAAAAAAAACE/vYCnIUTkZM8/S220/274450548.bin.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>38</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-21774696.post-8743138802126573203</id><published>2011-08-10T10:03:00.000-07:00</published><updated>2011-08-10T13:29:41.215-07:00</updated><title type='text'>Message - "The MSDTC transaction manager was unable to push the transaction..."</title><content type='html'>A client recently saw a strange error after installing a new BizTalk 2010 application. The app produced the following error when using the WCF SQL adapter to connect to a remote SQL database:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;The adapter failed to transmit message going to send port "RequestMessageData" with URL "mssql://VSQL05.PROD.acme.com//Messages?". It will be retransmitted after the retry interval specified for this Send Port. Details:"System.Transactions.TransactionManagerCommunicationException: Communication with the underlying transaction manager has failed. ---&amp;gt; System.Runtime.InteropServices.COMException: The MSDTC transaction manager was unable to push the transaction to the destination transaction manager due to communication problems. Possible causes are: a firewall is present and it doesn't have an exception for the MSDTC process, the two machines cannot find each other by their NetBIOS names, or the support for network transactions is not enabled for one of the two transaction managers. (Exception from HRESULT: 0x8004D02A)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;At first I thought the error might have to do with the fact that the SQL address is virtual. But after some flopping about like a fish on deck, we found a guy at the client site who knew MSDTC really well. He suggested that we choose the "&lt;span style="font-weight: bold;"&gt;Enable XA Transactions&lt;/span&gt;" option in the DTC properties dialog box. I didn't know it at the time, but the production DB was in SQL 2000, running on an older version of Windows. The QA DB had been SQL 2005.&lt;br /&gt;&lt;br /&gt;That fix didn't work by itself (there was another issue), and then I remembered that I once ran into something like this when installing BizTalk 2004 for another client. In that case, I had to select "&lt;span style="font-weight: bold;"&gt;No Authentication Required&lt;/span&gt;" in the MSDTC properties on all boxes. But since I knew that no request was going to be coming from SQL 2000, I selected "&lt;span style="font-weight: bold;"&gt;Incoming Caller Authentication Required&lt;/span&gt;". Problem solved!&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/21774696-8743138802126573203?l=stevestechnotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevestechnotes.blogspot.com/feeds/8743138802126573203/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=21774696&amp;postID=8743138802126573203' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/21774696/posts/default/8743138802126573203'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/21774696/posts/default/8743138802126573203'/><link rel='alternate' type='text/html' href='http://stevestechnotes.blogspot.com/2011/08/message-msdtc-transaction-manager-was.html' title='Message - &quot;The MSDTC transaction manager was unable to push the transaction...&quot;'/><author><name>Steve Harclerode</name><uri>http://www.blogger.com/profile/01048793793830514398</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_NWdMoFXGm5U/Sp2oRQ30x-I/AAAAAAAAACE/vYCnIUTkZM8/S220/274450548.bin.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-21774696.post-3274864536256623186</id><published>2011-08-02T18:15:00.000-07:00</published><updated>2011-08-02T18:35:00.740-07:00</updated><title type='text'>BizTalk Map - Copy Node containing HTML</title><content type='html'>I recently had to map data from an InfoPath 2007 form to a canonical schema. The input from InfoPath usually contained HTML, although on occasion it contained encoded HTML (depending on where the original data was pulled from). The output needed to be in a CDATA section so that it could be treated as plain old text.&lt;br /&gt;&lt;br /&gt;After consulting several people at work and looking at lots of blog posts, I was able to pull off a solution. I'm sure there are ways to improve the quality of the code, but it does work. One thing I don't like about this solution is that it adds a namespace attribute to the top level HTML nodes. Fortunately every browser I tested with ignores the namespace.&lt;br /&gt;&lt;br /&gt;Here's the source schema:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/-v5xrFyzdIRQ/TjiiLYYtQ3I/AAAAAAAAAEs/FHsmDjeIwyE/s1600/inputschema.png"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 200px; height: 100px;" src="http://1.bp.blogspot.com/-v5xrFyzdIRQ/TjiiLYYtQ3I/AAAAAAAAAEs/FHsmDjeIwyE/s320/inputschema.png" alt="" id="BLOGGER_PHOTO_ID_5636433250062517106" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;And here's the contents of the Inline XSLT functoid that I used:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;lt;xsl:element name="ns0:FreeformData1" &amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;  &amp;lt;xsl:text disable-output-escaping="yes"&amp;gt;&amp;amp;lt;![CDATA[&amp;lt;/xsl:text&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;  &amp;lt;xsl:choose&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    &amp;lt;xsl:when test="count(/*[local-name()='myFields']/*[local-name()='FreeData1']/child::*/child::node()) &amp;amp;gt; 0"&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;      &amp;lt;xsl:for-each select = "/*[local-name()='myFields']/*[local-name()='FreeData1']/child::node()"&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        &amp;lt;xsl:copy-of select="self::*" /&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;      &amp;lt;/xsl:for-each&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    &amp;lt;/xsl:when&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        &amp;lt;xsl:otherwise&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;          &amp;lt;xsl:value-of select="string(/*[local-name()='myFields']/*[local-name()='FreeData1'])" disable-output-escaping="yes"/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        &amp;lt;/xsl:otherwise&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;  &amp;lt;/xsl:choose&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;  &amp;lt;xsl:text disable-output-escaping="yes"&amp;gt;]]&amp;amp;gt;&amp;lt;/xsl:text&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;lt;/xsl:element&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;If the input XML looks like this:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;lt;ns0:myFields xmlns:ns0="http://sampleforblog.namespace.com"&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;lt;ns0:field1&amp;gt;Test data&amp;lt;/ns0:field1&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;lt;ns0:FreeData1&amp;gt;&amp;lt;html&amp;gt;&amp;lt;FONT color="#ff0000"&amp;gt;Hello&amp;lt;/FONT&amp;gt; world this &amp;lt;STRONG&amp;gt;is a test&amp;lt;/STRONG&amp;gt;&amp;lt;/html&amp;gt;&amp;lt;/ns0:FreeData1&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;lt;/ns0:myFields&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Then the output XML looks like this:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;lt;ns0:yourFields xmlns:ns0="http://sample2forblog"&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;  &amp;lt;ns0:field&amp;gt;Test data&amp;lt;/ns0:field&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;  &amp;lt;ns0:FreeformData1&amp;gt;&amp;lt;![CDATA[&amp;lt;html xmlns:ns0="http://sampleforblog.namespace.com"&amp;gt;&amp;lt;FONT color="#ff0000"&amp;gt;Hello&amp;lt;/FONT&amp;gt; world this &amp;lt;STRONG&amp;gt;is a test&amp;lt;/STRONG&amp;gt;&amp;lt;/html&amp;gt;]]&amp;gt;&amp;lt;/ns0:FreeformData1&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;lt;/ns0:yourFields&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I'm not showing the case where the HTML is encoded, but I did test that as well. Encoded HTML is handled by the "otherwise" case in the XSLT above.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/21774696-3274864536256623186?l=stevestechnotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevestechnotes.blogspot.com/feeds/3274864536256623186/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=21774696&amp;postID=3274864536256623186' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/21774696/posts/default/3274864536256623186'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/21774696/posts/default/3274864536256623186'/><link rel='alternate' type='text/html' href='http://stevestechnotes.blogspot.com/2011/08/biztalk-map-copy-node-containing-html.html' title='BizTalk Map - Copy Node containing HTML'/><author><name>Steve Harclerode</name><uri>http://www.blogger.com/profile/01048793793830514398</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_NWdMoFXGm5U/Sp2oRQ30x-I/AAAAAAAAACE/vYCnIUTkZM8/S220/274450548.bin.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-v5xrFyzdIRQ/TjiiLYYtQ3I/AAAAAAAAAEs/FHsmDjeIwyE/s72-c/inputschema.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-21774696.post-8088759195755121182</id><published>2011-07-29T14:28:00.001-07:00</published><updated>2011-07-29T14:42:40.168-07:00</updated><title type='text'>SharePoint - Counting Social Tags</title><content type='html'>I found some code on the web for counting social tags, but unfortunately it failed when the page was a "welcome" page. The code below handles that special case. I used a Web Service Reference to the SocialDataService web service, although I probably could have created a (WCF) Service Reference instead. &lt;br /&gt;&lt;br /&gt;The method IsWelcomePage() is detailed in my previous post. The method TrimPageFromUrl() is fairly simple, it just changes a URL such as &lt;span style="font-weight:bold;"&gt;http://spsite/pages/default.aspx&lt;/span&gt; to &lt;span style="font-weight:bold;"&gt;http://spsite/&lt;/span&gt;.&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;private void CountTagsByTermNameAndUrl()&lt;br /&gt;{&lt;br /&gt;    using (SocDataSvc.SocialDataService socialDataService = new SocDataSvc.SocialDataService())&lt;br /&gt;    {&lt;br /&gt;        socialDataService.Credentials = System.Net.CredentialCache.DefaultNetworkCredentials;&lt;br /&gt;        socialDataService.Url = GetUrlWithUpdatedDomain(socialDataService.Url, m_siteUrl);&lt;br /&gt;        SocDataSvc.SocialTermDetail termDetail;&lt;br /&gt;        try&lt;br /&gt;        {&lt;br /&gt;            termDetail = socialDataService.GetTagTermsOnUrl(m_siteUrl, null)&lt;br /&gt;                .Where(detail =&gt; detail.Term.Name == m_termName).SingleOrDefault();&lt;br /&gt;            if (termDetail == null &amp;&amp; IsWelcomePage(m_siteUrl))&lt;br /&gt;            {   // this could be the default page, remove the last part of the Url and try again&lt;br /&gt;                m_siteUrl = TrimPageFromUrl(m_siteUrl);&lt;br /&gt;                termDetail = socialDataService.GetTagTermsOnUrl(m_siteUrl, null)&lt;br /&gt;                    .Where(detail =&gt; detail.Term.Name == m_termName).SingleOrDefault();&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;        catch (Exception ex)&lt;br /&gt;        {&lt;br /&gt;            // handle exception&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        // make sure we got at least one result&lt;br /&gt;        m_tagCount = (termDetail != null &amp;&amp; termDetail.Term.Name == m_termName) ? termDetail.Count : 0;&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/21774696-8088759195755121182?l=stevestechnotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevestechnotes.blogspot.com/feeds/8088759195755121182/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=21774696&amp;postID=8088759195755121182' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/21774696/posts/default/8088759195755121182'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/21774696/posts/default/8088759195755121182'/><link rel='alternate' type='text/html' href='http://stevestechnotes.blogspot.com/2011/07/sharepoint-counting-social-tags.html' title='SharePoint - Counting Social Tags'/><author><name>Steve Harclerode</name><uri>http://www.blogger.com/profile/01048793793830514398</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_NWdMoFXGm5U/Sp2oRQ30x-I/AAAAAAAAACE/vYCnIUTkZM8/S220/274450548.bin.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-21774696.post-4695950512201751660</id><published>2011-07-29T14:23:00.001-07:00</published><updated>2011-07-29T14:27:17.168-07:00</updated><title type='text'>Getting the Welcome Page for a SharePoint Publishing Site</title><content type='html'>I wish I had found this sooner, it could have saved me a lot of time:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;private static bool IsWelcomePage(string url)&lt;br /&gt;{&lt;br /&gt;    bool rslt = false;&lt;br /&gt;&lt;br /&gt;    using (SPSite site = new SPSite(url))&lt;br /&gt;    {&lt;br /&gt;        using (SPWeb web = site.OpenWeb())&lt;br /&gt;        {&lt;br /&gt;            if (PublishingWeb.IsPublishingWeb(web))&lt;br /&gt;            {&lt;br /&gt;                PublishingWeb pweb = PublishingWeb.GetPublishingWeb(web);&lt;br /&gt;                string defaulturl = pweb.DefaultPage.Url;&lt;br /&gt;&lt;br /&gt;                if (defaulturl == new Uri(url).GetComponents(UriComponents.Path, UriFormat.SafeUnescaped))&lt;br /&gt;                {&lt;br /&gt;                    rslt = true;&lt;br /&gt;                }&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    return rslt;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/21774696-4695950512201751660?l=stevestechnotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevestechnotes.blogspot.com/feeds/4695950512201751660/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=21774696&amp;postID=4695950512201751660' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/21774696/posts/default/4695950512201751660'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/21774696/posts/default/4695950512201751660'/><link rel='alternate' type='text/html' href='http://stevestechnotes.blogspot.com/2011/07/getting-welcome-page-for-sharepoint.html' title='Getting the Welcome Page for a SharePoint Publishing Site'/><author><name>Steve Harclerode</name><uri>http://www.blogger.com/profile/01048793793830514398</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_NWdMoFXGm5U/Sp2oRQ30x-I/AAAAAAAAACE/vYCnIUTkZM8/S220/274450548.bin.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-21774696.post-3972746114022500448</id><published>2011-07-29T13:09:00.000-07:00</published><updated>2011-07-29T14:13:54.581-07:00</updated><title type='text'>Properties for SharePoint 2010 Visual Web Parts</title><content type='html'>I seem to spend a lot of time looking up where to set various properties in Visual Web Part projects, so I'm recording what I have learned recently. Here's how to set the Category that the web part will appear in when adding it to a page:&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;lt;Property Name="Group" Value="Acme" /&amp;gt;&lt;/span&gt;&lt;br /&gt;This property is in the &lt;span style="font-weight: bold;"&gt;Elements.xml&lt;/span&gt; file for the web part. In this case, the Category will be &lt;span style="display:inline-block;"&gt;&lt;span style="font-weight: bold;"&gt;Acme&lt;/span&gt;&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;Here's a picture of some things that affect the appearance of this feature in SharePoint under Manage Features. Title and description should be fairly obvious. The interesting thing about this feature is that it has a dependency on another feature called Social Ribbon. I found the GUID by looking in the TEMPLATE\FEATURES folder in the 14 hive. In my case, I opened the Feature.xml file in the SocialRibbonControl folder and copied the Feature Id value.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/-lWXVM533dXg/TjMdbZUgVmI/AAAAAAAAAEk/cJMRsYDySKk/s1600/feature.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 320px; height: 192px;" src="http://3.bp.blogspot.com/-lWXVM533dXg/TjMdbZUgVmI/AAAAAAAAAEk/cJMRsYDySKk/s320/feature.jpg" alt="" id="BLOGGER_PHOTO_ID_5634879915261187682" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I also wanted show an image in the feature gallery next to the feature. First, I right clicked my project name in VS Solution Explorer and selected &lt;span style="font-weight:bold;"&gt;Add / SharePoint "Images" mapped folder&lt;/span&gt;. I created a sub-folder directly in the Images folder and copied my image there. Finally, I edited the &lt;span style="font-weight:bold;"&gt;Feature1.Template.xml&lt;/span&gt; file and added the following attribute to the Feature element: &lt;span style="font-weight:bold;"&gt;ImageUrl="Neudesic\Neudesic.jpg"&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;Finally, here are some properties that I added to the &lt;span style="font-weight:bold;"&gt;.webpart&lt;/span&gt; file: to affect the display of the web part in the web part gallery and to set a couple of properties that take effect when the web part displays on a page:&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;lt;property name="Title" type="string"&amp;gt;Acme Web Part&amp;lt;/property&amp;gt;&lt;br /&gt;&amp;lt;property name="Description" type="string"&amp;gt;Displays stuff, along with doing other stuff"&amp;lt;/property&amp;gt;&lt;br /&gt;&amp;lt;property name="ChromeType" type="chrometype"&amp;gt;None&amp;lt;/property&amp;gt;&lt;br /&gt;&amp;lt;property name="Width" type="unit"&amp;gt;200&amp;lt;/property&amp;gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/21774696-3972746114022500448?l=stevestechnotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevestechnotes.blogspot.com/feeds/3972746114022500448/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=21774696&amp;postID=3972746114022500448' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/21774696/posts/default/3972746114022500448'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/21774696/posts/default/3972746114022500448'/><link rel='alternate' type='text/html' href='http://stevestechnotes.blogspot.com/2011/07/properties-for-sharepoint-2010-visual.html' title='Properties for SharePoint 2010 Visual Web Parts'/><author><name>Steve Harclerode</name><uri>http://www.blogger.com/profile/01048793793830514398</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_NWdMoFXGm5U/Sp2oRQ30x-I/AAAAAAAAACE/vYCnIUTkZM8/S220/274450548.bin.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-lWXVM533dXg/TjMdbZUgVmI/AAAAAAAAAEk/cJMRsYDySKk/s72-c/feature.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-21774696.post-7329523959957121919</id><published>2011-07-26T15:35:00.000-07:00</published><updated>2011-07-26T15:42:50.166-07:00</updated><title type='text'>Error Handling Code for Web Part</title><content type='html'>I keep needing to write the same error handling code for Web Parts, HTML pages, etc. The only difference is in how I display the error. This is something I wrote for a client who told me that he wanted the web part to look ugly if an exception is thrown. Well, this does just that! The label with ID lblError is invisible until DisplayException gets called.&lt;br /&gt;&lt;pre&gt;private void DisplayException(Exception ex)&lt;br /&gt;{&lt;br /&gt;   using (StringWriter stringWriter = new StringWriter())&lt;br /&gt;   {&lt;br /&gt;       using (HtmlTextWriter htmlTextWriter = new HtmlTextWriter(stringWriter))&lt;br /&gt;       {&lt;br /&gt;&lt;br /&gt;           // show exception message&lt;br /&gt;           HtmlWriteLine("Exception", ex.Message, htmlTextWriter);&lt;br /&gt;           HtmlWriteLine("Method", ex.TargetSite, htmlTextWriter);&lt;br /&gt;           HtmlWriteLineReplaceNewLines("Stack Trace", ex.StackTrace, htmlTextWriter);&lt;br /&gt;&lt;br /&gt;           Exception exInner = ex.InnerException;&lt;br /&gt;           int innerExceptionNum = 1;&lt;br /&gt;           while (exInner != null)&lt;br /&gt;           {&lt;br /&gt;               htmlTextWriter.WriteBreak();&lt;br /&gt;               htmlTextWriter.Write("-----");&lt;br /&gt;               htmlTextWriter.WriteBreak();&lt;br /&gt;&lt;br /&gt;               HtmlWriteLine(String.Format("Inner Exception {0}", innerExceptionNum), exInner.Message, htmlTextWriter);&lt;br /&gt;               HtmlWriteLine("Method", exInner.TargetSite, htmlTextWriter);&lt;br /&gt;               HtmlWriteLineReplaceNewLines("Stack Trace", exInner.StackTrace, htmlTextWriter);&lt;br /&gt;&lt;br /&gt;               exInner = exInner.InnerException;&lt;br /&gt;               innerExceptionNum++;&lt;br /&gt;&lt;br /&gt;               htmlTextWriter.WriteBreak();&lt;br /&gt;           }&lt;br /&gt;           lblError.Text = stringWriter.ToString();&lt;br /&gt;           lblError.Visible = true;&lt;br /&gt;       }&lt;br /&gt;   }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;private void HtmlWriteLineReplaceNewLines(string label, string text, HtmlTextWriter htmlTextWriter)&lt;br /&gt;{&lt;br /&gt;   htmlTextWriter.Write(String.Format("{0}=", label));&lt;br /&gt;   string[] textArray = text.Split(new string[] { Environment.NewLine }, StringSplitOptions.None);&lt;br /&gt;   foreach (string s in textArray)&lt;br /&gt;   {&lt;br /&gt;       htmlTextWriter.Write(s);&lt;br /&gt;       htmlTextWriter.WriteBreak();&lt;br /&gt;   }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;private static void HtmlWriteLine(string label, Object value, HtmlTextWriter htmlTextWriter)&lt;br /&gt;{&lt;br /&gt;   htmlTextWriter.Write(String.Format("{0}=\"{1}\"", label, value));&lt;br /&gt;   htmlTextWriter.WriteBreak();&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/21774696-7329523959957121919?l=stevestechnotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevestechnotes.blogspot.com/feeds/7329523959957121919/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=21774696&amp;postID=7329523959957121919' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/21774696/posts/default/7329523959957121919'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/21774696/posts/default/7329523959957121919'/><link rel='alternate' type='text/html' href='http://stevestechnotes.blogspot.com/2011/07/error-handling-code-for-web-part.html' title='Error Handling Code for Web Part'/><author><name>Steve Harclerode</name><uri>http://www.blogger.com/profile/01048793793830514398</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_NWdMoFXGm5U/Sp2oRQ30x-I/AAAAAAAAACE/vYCnIUTkZM8/S220/274450548.bin.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-21774696.post-4736649336988707203</id><published>2011-06-09T17:46:00.000-07:00</published><updated>2011-06-09T17:52:41.473-07:00</updated><title type='text'>Schema referenced by Map...has been deleted</title><content type='html'>&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;o:officedocumentsettings&gt;   &lt;o:allowpng/&gt;  &lt;/o:OfficeDocumentSettings&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:worddocument&gt;   &lt;w:view&gt;Normal&lt;/w:View&gt;   &lt;w:zoom&gt;0&lt;/w:Zoom&gt;   &lt;w:trackmoves/&gt;   &lt;w:trackformatting/&gt;   &lt;w:punctuationkerning/&gt;   &lt;w:validateagainstschemas/&gt;   &lt;w:saveifxmlinvalid&gt;false&lt;/w:SaveIfXMLInvalid&gt;   &lt;w:ignoremixedcontent&gt;false&lt;/w:IgnoreMixedContent&gt;   &lt;w:alwaysshowplaceholdertext&gt;false&lt;/w:AlwaysShowPlaceholderText&gt;   &lt;w:donotpromoteqf/&gt;   &lt;w:lidthemeother&gt;EN-US&lt;/w:LidThemeOther&gt;   &lt;w:lidthemeasian&gt;X-NONE&lt;/w:LidThemeAsian&gt;   &lt;w:lidthemecomplexscript&gt;X-NONE&lt;/w:LidThemeComplexScript&gt;   &lt;w:compatibility&gt;    &lt;w:breakwrappedtables/&gt;    &lt;w:snaptogridincell/&gt;    &lt;w:wraptextwithpunct/&gt;    &lt;w:useasianbreakrules/&gt;    &lt;w:dontgrowautofit/&gt;    &lt;w:splitpgbreakandparamark/&gt;    &lt;w:enableopentypekerning/&gt;    &lt;w:dontflipmirrorindents/&gt;    &lt;w:overridetablestylehps/&gt;   &lt;/w:Compatibility&gt;   &lt;m:mathpr&gt;    &lt;m:mathfont val="Cambria Math"&gt;    &lt;m:brkbin val="before"&gt;    &lt;m:brkbinsub val="&amp;#45;-"&gt;    &lt;m:smallfrac val="off"&gt;    &lt;m:dispdef/&gt;    &lt;m:lmargin val="0"&gt;    &lt;m:rmargin val="0"&gt;    &lt;m:defjc val="centerGroup"&gt;    &lt;m:wrapindent val="1440"&gt;    &lt;m:intlim val="subSup"&gt;    &lt;m:narylim val="undOvr"&gt;   &lt;/m:mathPr&gt;&lt;/w:WordDocument&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:latentstyles deflockedstate="false" defunhidewhenused="true" defsemihidden="true" defqformat="false" defpriority="99" latentstylecount="267"&gt;   &lt;w:lsdexception locked="false" priority="0" semihidden="false" unhidewhenused="false" qformat="true" name="Normal"&gt;   &lt;w:lsdexception locked="false" priority="9" semihidden="false" unhidewhenused="false" qformat="true" name="heading 1"&gt;   &lt;w:lsdexception locked="false" priority="9" qformat="true" name="heading 2"&gt;   &lt;w:lsdexception locked="false" priority="9" qformat="true" name="heading 3"&gt;   &lt;w:lsdexception locked="false" priority="9" qformat="true" name="heading 4"&gt;   &lt;w:lsdexception locked="false" priority="9" qformat="true" name="heading 5"&gt;   &lt;w:lsdexception locked="false" priority="9" qformat="true" name="heading 6"&gt;   &lt;w:lsdexception locked="false" priority="9" qformat="true" name="heading 7"&gt;   &lt;w:lsdexception locked="false" priority="9" qformat="true" name="heading 8"&gt;   &lt;w:lsdexception locked="false" priority="9" qformat="true" name="heading 9"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 1"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 2"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 3"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 4"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 5"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 6"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 7"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 8"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 9"&gt;   &lt;w:lsdexception locked="false" priority="35" qformat="true" name="caption"&gt;   &lt;w:lsdexception locked="false" priority="10" semihidden="false" unhidewhenused="false" qformat="true" name="Title"&gt;   &lt;w:lsdexception locked="false" priority="1" name="Default Paragraph Font"&gt;   &lt;w:lsdexception locked="false" priority="11" semihidden="false" unhidewhenused="false" qformat="true" name="Subtitle"&gt;   &lt;w:lsdexception locked="false" priority="22" semihidden="false" unhidewhenused="false" qformat="true" name="Strong"&gt;   &lt;w:lsdexception locked="false" priority="20" semihidden="false" unhidewhenused="false" qformat="true" name="Emphasis"&gt;   &lt;w:lsdexception locked="false" priority="59" semihidden="false" unhidewhenused="false" name="Table Grid"&gt;   &lt;w:lsdexception locked="false" unhidewhenused="false" name="Placeholder Text"&gt;   &lt;w:lsdexception locked="false" priority="1" semihidden="false" unhidewhenused="false" qformat="true" name="No Spacing"&gt;   &lt;w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading"&gt;   &lt;w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List"&gt;   &lt;w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid"&gt;   &lt;w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1"&gt;   &lt;w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2"&gt;   &lt;w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1"&gt;   &lt;w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2"&gt;   &lt;w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1"&gt;   &lt;w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2"&gt;   &lt;w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3"&gt;   &lt;w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List"&gt;   &lt;w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading"&gt;   &lt;w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List"&gt;   &lt;w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid"&gt;   &lt;w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 1"&gt;   &lt;w:lsdexception locked="false" unhidewhenused="false" name="Revision"&gt;   &lt;w:lsdexception locked="false" priority="34" semihidden="false" unhidewhenused="false" qformat="true" name="List Paragraph"&gt;   &lt;w:lsdexception locked="false" priority="29" semihidden="false" unhidewhenused="false" qformat="true" name="Quote"&gt;   &lt;w:lsdexception locked="false" priority="30" semihidden="false" unhidewhenused="false" qformat="true" name="Intense Quote"&gt;   &lt;w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="19" semihidden="false" unhidewhenused="false" qformat="true" name="Subtle Emphasis"&gt;   &lt;w:lsdexception locked="false" priority="21" semihidden="false" unhidewhenused="false" qformat="true" name="Intense Emphasis"&gt;   &lt;w:lsdexception locked="false" priority="31" semihidden="false" unhidewhenused="false" qformat="true" name="Subtle Reference"&gt;   &lt;w:lsdexception locked="false" priority="32" semihidden="false" unhidewhenused="false" qformat="true" name="Intense Reference"&gt;   &lt;w:lsdexception locked="false" priority="33" semihidden="false" unhidewhenused="false" qformat="true" name="Book Title"&gt;   &lt;w:lsdexception locked="false" priority="37" name="Bibliography"&gt;   &lt;w:lsdexception locked="false" priority="39" qformat="true" name="TOC Heading"&gt;  &lt;/w:LatentStyles&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 10]&gt; &lt;style&gt;  /* Style Definitions */  table.MsoNormalTable  {mso-style-name:"Table Normal";  mso-tstyle-rowband-size:0;  mso-tstyle-colband-size:0;  mso-style-noshow:yes;  mso-style-priority:99;  mso-style-parent:"";  mso-padding-alt:0in 5.4pt 0in 5.4pt;  mso-para-margin-top:0in;  mso-para-margin-right:0in;  mso-para-margin-bottom:10.0pt;  mso-para-margin-left:0in;  line-height:115%;  mso-pagination:widow-orphan;  font-size:11.0pt;  font-family:"Calibri","sans-serif";  mso-ascii-font-family:Calibri;  mso-ascii-theme-font:minor-latin;  mso-hansi-font-family:Calibri;  mso-hansi-theme-font:minor-latin;  mso-bidi-font-family:"Times New Roman";  mso-bidi-theme-font:minor-bidi;} &lt;/style&gt; &lt;![endif]--&gt;  &lt;p class="MsoNormal"&gt;While trying to troubleshoot an automated installer for the BizTalk ACME.Notifications application, my client was seeing this error:&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="color:#1F497D"&gt;Schema referenced by Map 'ACME.Notifications.Insertion.BizTalk.Transforms.Notification_to_InsertionRequest' has been deleted. The local, cached version of the BizTalk Server group configuration is out of date. You must refresh the BizTalk Server group configuration before making further changes.&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;We saw it in the log of the automated installation, and then when we tried to use the BizTalk Administration Console to view the application, we also saw the error. The error also prevented us from removing DLLs from the ACME.Notifications application.&lt;/p&gt;    &lt;p class="MsoNormal"&gt;The map named in the error is the only schema where I actually changed the name of one of the schemas in the map. I think that the map reference got broken when we installed the new schema DLL which no longer had the old map name, and at that point BizTalk choked – in a way that was unrecoverable.&lt;/p&gt;    &lt;p class="MsoNormal"&gt;We tried running the auto installer again, but that did not resolve the issue. We also tried installing this hotfix: &lt;a href="http://support.microsoft.com/kb/2516201"&gt;http://support.microsoft.com/kb/2516201&lt;/a&gt;, which references the same error message, but that did not resolve the issue, even after re-deploying.&lt;/p&gt;    &lt;p class="MsoNormal"&gt;In order to fix this, we had to go into the database BizTalkMgmtDb and delete the relevant map from the table bt_MapSpec. Since this table does not list the names of the maps, I found the relevant schema by looking that the field “outspec_docspec_name”, which had the old name of the schema. Then I used the BizTalk Management Console to delete all of the DLLs, followed by redeploying, and everything started working again.&lt;/p&gt;      &lt;p class="MsoNormal"&gt;In order to prevent this from being a possible issue in the future, we rewrote the installer so that it deletes the DLLs from BizTalk before trying to add in the latest versions.&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/21774696-4736649336988707203?l=stevestechnotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevestechnotes.blogspot.com/feeds/4736649336988707203/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=21774696&amp;postID=4736649336988707203' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/21774696/posts/default/4736649336988707203'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/21774696/posts/default/4736649336988707203'/><link rel='alternate' type='text/html' href='http://stevestechnotes.blogspot.com/2011/06/schema-referenced-by-maphas-been.html' title='Schema referenced by Map...has been deleted'/><author><name>Steve Harclerode</name><uri>http://www.blogger.com/profile/01048793793830514398</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_NWdMoFXGm5U/Sp2oRQ30x-I/AAAAAAAAACE/vYCnIUTkZM8/S220/274450548.bin.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-21774696.post-2048073823107627305</id><published>2011-05-11T11:26:00.000-07:00</published><updated>2011-05-13T13:52:14.756-07:00</updated><title type='text'>Beware of .CS Files</title><content type='html'>I just had the joy of debugging a thorny issue in BizTalk 2010. I spent quite a while wondering why a property schema I had changed was not showing up in the Admin Console with the changes. I even went to the trouble to delete everything from the GAC using gacutil (the BizTalk Assembly Viewer isn't supported on my 64 bit operating system). Still the schema was unchanged.&lt;br /&gt;&lt;br /&gt;It finally occurred to me to look at the .CS file corresponding to the problem XSD file. The .CS file had not changed at all, and the attribute on it was read-only. Deleting it from the file system just caused me to get other errors when I compiled.&lt;br /&gt;&lt;br /&gt;Then I looked in TFS, and I realized that a co-worker had added the .CS file there. When I deleted the .CS file from TFS, the issue was resolved. Now the schema changes show up in the Admin Console.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/21774696-2048073823107627305?l=stevestechnotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevestechnotes.blogspot.com/feeds/2048073823107627305/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=21774696&amp;postID=2048073823107627305' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/21774696/posts/default/2048073823107627305'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/21774696/posts/default/2048073823107627305'/><link rel='alternate' type='text/html' href='http://stevestechnotes.blogspot.com/2011/05/beware-of-cs-files.html' title='Beware of .CS Files'/><author><name>Steve Harclerode</name><uri>http://www.blogger.com/profile/01048793793830514398</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_NWdMoFXGm5U/Sp2oRQ30x-I/AAAAAAAAACE/vYCnIUTkZM8/S220/274450548.bin.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-21774696.post-2316708887876143825</id><published>2011-04-22T14:15:00.000-07:00</published><updated>2011-04-22T14:55:08.030-07:00</updated><title type='text'>BizTalk 2010 SQL Adapter</title><content type='html'>I'm finally working with BizTalk 2010, after hearing about it for quite a while. I love the new mapper.&lt;br /&gt;&lt;br /&gt;I was using the new WCF-SQL Adapter. I like the new way of doing things, it seems much easier than to use than the old one. In order to invoke it, I right clicked the project and then choose Add / Add Generated Items. Then I clicked Consumer Adapter Service and clicked Add.&lt;br /&gt;&lt;br /&gt;On the new dialog box, under &lt;span style="font-weight: bold;"&gt;Select a binding&lt;/span&gt; I chose &lt;span style="font-weight: bold;"&gt;sqlBinding&lt;/span&gt;, and then clicked &lt;span style="font-weight:bold;"&gt;Configure&lt;/span&gt;. On the popup, I chose &lt;span style="font-weight: bold;"&gt;Windows &lt;/span&gt;security. On the &lt;span style="font-weight: bold;"&gt;URI Properties&lt;/span&gt; tab, I entered values for &lt;span style="font-weight: bold;"&gt;Server&lt;/span&gt; and &lt;span style="font-weight: bold;"&gt;InitialCatalog&lt;/span&gt;, and then clicked OK. Back to the &lt;span style="font-weight: bold;"&gt;Consume Adapter Service&lt;/span&gt; dialog, where I clicked Connect, which refreshed some metadata below. Using the tree under &lt;span style="font-weight: bold;"&gt;Select a Category&lt;/span&gt;, I navigated to &lt;span style="font-weight: bold;"&gt;Strongly-Typed Procedures&lt;/span&gt;. I then clicked on my stored proc under &lt;span style="font-weight: bold;"&gt;Available categories and operations&lt;/span&gt; and clicked Add. I entered a filename prefix for the new schemas, and clicked OK.&lt;br /&gt;&lt;br /&gt;Two new schemas were created, along with a binding file for the WCF port. The schema file that I use for creating messages, mapping, etc. ends with &lt;span style="font-weight: bold;"&gt;...TypedProcedure.dbo.xsd&lt;/span&gt;. There's another schema that appears to create a schema that has the types for records to be returned from the proc. One is for stored procs returning one record, and another for stored procs returning multiple records. By default, the &lt;span style="font-weight: bold;"&gt;...TypedProcedure.dbo.xsd&lt;/span&gt; uses the type for single records, but it looks as though it would be pretty easy to set it up for multiple records.&lt;br /&gt;&lt;br /&gt;So I created my messages and imported the binding file &lt;span style="font-weight: bold;"&gt;WcfSendPort_SqlAdapterBinding_Custom.bindinginfo.xml&lt;/span&gt; using BizTalk Admin Console. When I first tried sending a message through the port, I was surprised to see the following message:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;The adapter failed to transmit message going to send port "WcfSendPort_SqlAdapterBinding_TypedProcedures_dbo_Custom" with URL "mssql://localhost//StevesTest?". It will be retransmitted after the retry interval specified for this Send Port. Details:"Microsoft.ServiceModel.Channels.Common.UnsupportedOperationException: The action "&amp;lt;BtsActionMapping xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;  &amp;lt;Operation Name="GetByAccountNo" Action="TypedProcedure/dbo/GetByAccountNo" /&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;&amp;lt;/BtsActionMapping&amp;gt;" was not understood.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Server stack trace: &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;   at System.Runtime.AsyncResult.End[TAsyncResult](IAsyncResult result)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;   at System.ServiceModel.Channels.ServiceChannel.SendAsyncResult.End(SendAsyncResult result)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;   at System.ServiceModel.Channels.ServiceChannel.EndCall(String action, Object[] outs, IAsyncResult result)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;   at System.ServiceModel.Channels.ServiceChannel.EndRequest(IAsyncResult result)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Exception rethrown at [0]: &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;   at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData&amp;amp; msgData, Int32 type)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;   at System.ServiceModel.Channels.IRequestChannel.EndRequest(IAsyncResult result)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;   at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfClient`2.RequestCallback(IAsyncResult result)".&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I don't remember where I found the answer to this, but it turns out that in the send port, in the SOAP action header, you have to specify the &lt;span style="font-weight: bold;"&gt;Operation Name&lt;/span&gt;  as the same value that the Operation is inside of the Orchestration send port. By default in the Orchestration, it is &lt;span style="font-weight: bold;"&gt;Operation_1&lt;/span&gt;. By default when the binding for the port was created, it was &lt;span style="font-weight: bold;"&gt;GetByAccountNo&lt;/span&gt;, the name of the stored proc. When I made the name of the Operation on the port inside the orchestration the same as the Operation Name in the binding, all was well.&lt;br /&gt;&lt;br /&gt;This is actually the first time I can remember that the name of the Operation inside of an Orchestration in BizTalk had significance. Until now I have always left the Operation name as the default.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/21774696-2316708887876143825?l=stevestechnotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevestechnotes.blogspot.com/feeds/2316708887876143825/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=21774696&amp;postID=2316708887876143825' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/21774696/posts/default/2316708887876143825'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/21774696/posts/default/2316708887876143825'/><link rel='alternate' type='text/html' href='http://stevestechnotes.blogspot.com/2011/04/biztalk-2010-sql-adapter.html' title='BizTalk 2010 SQL Adapter'/><author><name>Steve Harclerode</name><uri>http://www.blogger.com/profile/01048793793830514398</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_NWdMoFXGm5U/Sp2oRQ30x-I/AAAAAAAAACE/vYCnIUTkZM8/S220/274450548.bin.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-21774696.post-9114229720368203571</id><published>2011-02-04T15:17:00.000-08:00</published><updated>2011-02-10T14:16:47.427-08:00</updated><title type='text'>SSR Report Fun</title><content type='html'>I was working on an SSRS Report recently that needed to select a bunch of, shall we say, Widgets, and the filter criterion was to select one or more Widget Managers. Each widget manager ID is a GUID. Fairly easy to do in SSRS. Here's the basic query:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;SELECT * FROM Widget W&lt;br /&gt;WHERE WM.WidgetManagerId IN (@WidgetManagers)&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;And here's the query to select the Widget Managers:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;SELECT FirstName + ' ' + LastName AS WidgetManagerName, WidgetManagerId&lt;br /&gt;FROM WidgetManager&lt;br /&gt;ORDER BY WidgetManagerName&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Here's what the parameter definition looks like:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_NWdMoFXGm5U/TUyU4RMbFPI/AAAAAAAAAEQ/CwlSOG7Habw/s1600/WidgetManagerParam1.JPG"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; cursor: pointer; width: 320px; height: 251px;" src="http://3.bp.blogspot.com/_NWdMoFXGm5U/TUyU4RMbFPI/AAAAAAAAAEQ/CwlSOG7Habw/s320/WidgetManagerParam1.JPG" alt="" id="BLOGGER_PHOTO_ID_5569990533559555314" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;This works okay, but for my purposes there were 2 issues. First of all, my client wanted all items to be selected by default. That's an easy problem to handle, all I need to do is to set the &lt;span style="font-weight: bold;"&gt;Default values&lt;/span&gt; for the WidgetManagers report parameter to the same dataset I use for &lt;span style="font-weight: bold;"&gt;Available values&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;Unfortunately, that query ran really slowly. When I looked at the query using SQL Profiler, it looked like this:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;SELECT * FROM Widget W&lt;br /&gt;INNER JOIN WidgetManager WM ON&lt;br /&gt;W.WidgetManagerId = WM.WidgetManagerId&lt;br /&gt;WHERE WM.WidgetManagerId IN&lt;br /&gt;(N'0fa07056-8e50-43a0-b72d-000a68d17be1',&lt;br /&gt;N'8eff8f59-ca6a-4eed-a434-016a8831c7ec',&lt;br /&gt;N'2a3a885e-8fb2-4e8b-b55a-02a7225a1143',&lt;br /&gt;...)&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;I only showed 3 of the GUIDS, but the query sent to SQL had all 1000+ of them inline in the query. No wonder it was slow.&lt;br /&gt;&lt;br /&gt;I'll skip to the final solution. I changed the query for the Widget Managers to look like this:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;SELECT 'All Widget Managers' AS WidgetManagerName,&lt;br /&gt;'00000000-0000-0000-0000-000000000000' AS WidgetManagerId, 1 AS OrderBy&lt;br /&gt;UNION&lt;br /&gt;SELECT FirstName + ' ' + LastName AS WidgetManagerName,&lt;br /&gt;WidgetManagerId, 2 AS OrderBy&lt;br /&gt;FROM WidgetManager&lt;br /&gt;ORDER BY OrderBy, WidgetManagerName&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Then I changed the query for the Widgets themselves to look like this:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;DECLARE @WidgetManagerCount AS INT&lt;br /&gt;SET @WidgetManagerCount = (SELECT COUNT(*) FROM WidgetManager&lt;br /&gt;WHERE WidgetManagerId IN (@WidgetManagers))&lt;br /&gt;&lt;br /&gt;SELECT * FROM Widget W&lt;br /&gt;WHERE&lt;br /&gt;(1 =&lt;br /&gt;CASE&lt;br /&gt;WHEN @WidgetManagerCount = 0 THEN 1&lt;br /&gt;ELSE&lt;br /&gt;  CASE&lt;br /&gt;  WHEN W.WidgetManagerId IN (@WidgetManagers) THEN 1&lt;br /&gt;  ELSE 0&lt;br /&gt;  END&lt;br /&gt;END)&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;And finally, I changed the report parameter to look like this:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_NWdMoFXGm5U/TUyg29jEQlI/AAAAAAAAAEY/f9lOLf_cMsY/s1600/WidgetManagerParam2.JPG"&gt;&lt;img style="cursor: pointer; width: 320px; height: 251px;" src="http://2.bp.blogspot.com/_NWdMoFXGm5U/TUyg29jEQlI/AAAAAAAAAEY/f9lOLf_cMsY/s320/WidgetManagerParam2.JPG" alt="" id="BLOGGER_PHOTO_ID_5570003705245483602" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The basic idea is that when the report first comes up, "All Widget Managers" is chosen, and all other Widget Managers are unchecked. When the Widget query runs, @WidgetManagerCount will be set to 0, and only the top part of the outer case statement will be evaluated, and all Widgets will display on the report.&lt;br /&gt;&lt;br /&gt;If any other Widget Managers are checked, @WidgetManagerCount will then be greater than zero, which will cause the inner case statement to be evaluated for each Widget. If a Widget Manager has been checked, all related Widgets will be displayed on the report.&lt;br /&gt;&lt;br /&gt;This version of the report ran much, much faster than the original. What I'm showing above is a stripped down version of the report, but the real one had 4 filter criteria, and a couple of those filter criteria had thousands of choices.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/21774696-9114229720368203571?l=stevestechnotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevestechnotes.blogspot.com/feeds/9114229720368203571/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=21774696&amp;postID=9114229720368203571' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/21774696/posts/default/9114229720368203571'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/21774696/posts/default/9114229720368203571'/><link rel='alternate' type='text/html' href='http://stevestechnotes.blogspot.com/2011/02/ssr-report-fun.html' title='SSR Report Fun'/><author><name>Steve Harclerode</name><uri>http://www.blogger.com/profile/01048793793830514398</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_NWdMoFXGm5U/Sp2oRQ30x-I/AAAAAAAAACE/vYCnIUTkZM8/S220/274450548.bin.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_NWdMoFXGm5U/TUyU4RMbFPI/AAAAAAAAAEQ/CwlSOG7Habw/s72-c/WidgetManagerParam1.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-21774696.post-5383083670222116149</id><published>2010-12-20T15:25:00.000-08:00</published><updated>2010-12-20T15:30:35.372-08:00</updated><title type='text'>SSRS Report #Error</title><content type='html'>Often when I go to add a field to an SSRS Report, I see #Error when I first try to display the field. The solution is simple, I just forgot to add .Value to the end of the expression for the field.&lt;br /&gt;&lt;br /&gt;I normally wouldn't consider something so insignificant to be blog-worthy, but today I spent about a while trying to figure it out before a co-worker reminded me. I'm putting it here so I can find it in the future! Hopefully it will help someone else.&lt;br /&gt;&lt;br /&gt;I discovered today that a search for &lt;span style="font-style:italic;"&gt;SSRS Report #Error&lt;/span&gt; doesn't bring up much that's helpful, I found a few links that mentioned "divide by zero" issues.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/21774696-5383083670222116149?l=stevestechnotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevestechnotes.blogspot.com/feeds/5383083670222116149/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=21774696&amp;postID=5383083670222116149' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/21774696/posts/default/5383083670222116149'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/21774696/posts/default/5383083670222116149'/><link rel='alternate' type='text/html' href='http://stevestechnotes.blogspot.com/2010/12/ssrs-report-error.html' title='SSRS Report #Error'/><author><name>Steve Harclerode</name><uri>http://www.blogger.com/profile/01048793793830514398</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_NWdMoFXGm5U/Sp2oRQ30x-I/AAAAAAAAACE/vYCnIUTkZM8/S220/274450548.bin.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-21774696.post-5610372441403024211</id><published>2010-09-10T07:34:00.000-07:00</published><updated>2010-09-29T17:25:40.361-07:00</updated><title type='text'>Nailed by BizTalk</title><content type='html'>I got nailed by what seems to be a BizTalk bug yesterday. I found a resolution on &lt;a href="http://fehlberg.wordpress.com/2009/11/11/biztalk-map-bug-causes-inconsistent-results/"&gt;Victor Fehlberg's blog&lt;/a&gt;. Thanks, Victor! The issue occurs when deploying an MSI that has a map that uses an external assembly. If the map was created when the external assembly was compiled with Debug configuration, the map won't be able to find the assembly compiled with the Release configuration.&lt;br /&gt;&lt;br /&gt;Victor's issue was slightly different, so here is the (very ambiguous) error message that I saw. I'm including it here to make it easy to search with Google, and so that I can find this in the future:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;Event Type: Error&lt;br /&gt;Event Source: BizTalk Server 2006&lt;br /&gt;Event Category: BizTalk Server 2006 &lt;br /&gt;Event ID: 5753&lt;br /&gt;Date:  9/9/2010&lt;br /&gt;Time:  5:00:37 PM&lt;br /&gt;User:  N/A&lt;br /&gt;Computer: ACMEDEV1&lt;br /&gt;Description:&lt;br /&gt;A message received by adapter "FILE" on receive location "Rloc_Recs_FF" &lt;br /&gt;with URI "C:\acme-inbound\ACME_CT\Inbound Flat File\*.*" is suspended. &lt;br /&gt; Error details: The system cannot find the file specified. (Exception from HRESULT:&lt;br /&gt; 0x80070002) &lt;br /&gt; MessageId:  {5AFADD6F-6C98-4818-8554-13B17D0B22E9}&lt;br /&gt; InstanceID: {99470432-7526-4CB1-8FC0-7ECDA8C2F08E}&lt;br /&gt;&lt;br /&gt;For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;I resolved the issue by opening the map in my text editor and replacing all instances of "\obj\Debug\" with "\obj\Release\"&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/21774696-5610372441403024211?l=stevestechnotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevestechnotes.blogspot.com/feeds/5610372441403024211/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=21774696&amp;postID=5610372441403024211' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/21774696/posts/default/5610372441403024211'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/21774696/posts/default/5610372441403024211'/><link rel='alternate' type='text/html' href='http://stevestechnotes.blogspot.com/2010/09/nailed-by-biztalk.html' title='Nailed by BizTalk'/><author><name>Steve Harclerode</name><uri>http://www.blogger.com/profile/01048793793830514398</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_NWdMoFXGm5U/Sp2oRQ30x-I/AAAAAAAAACE/vYCnIUTkZM8/S220/274450548.bin.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-21774696.post-6829569648753886492</id><published>2010-08-20T14:38:00.000-07:00</published><updated>2010-08-20T14:48:06.905-07:00</updated><title type='text'>Using Notepad after Schema Changes</title><content type='html'>Often I want to make changes to a schema that I'm using in BizTalk. Typically I will change a node name (or two), or I'll change the namespace.&lt;br /&gt;&lt;br /&gt;That will break any maps that reference the schema, and I'll sometimes get error messages if I compile an orchestration that uses the schema. Even worse, if I have some xpath expression in an orchestration, I may not figure that out that it's broken until run time.&lt;br /&gt;&lt;br /&gt;I end up using a simple text editor like notepad to edit the map file(s) and orchestration file(s) directly, so I won't have to track down all of the usages of the changed node (or namespace) in the schema. I can just use simple search and replace (although I do check each replace instance before I actually do it). I don't work much with other BizTalk people these days, so I don't know if my approach is common...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/21774696-6829569648753886492?l=stevestechnotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevestechnotes.blogspot.com/feeds/6829569648753886492/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=21774696&amp;postID=6829569648753886492' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/21774696/posts/default/6829569648753886492'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/21774696/posts/default/6829569648753886492'/><link rel='alternate' type='text/html' href='http://stevestechnotes.blogspot.com/2010/08/using-notepad-after-schema-changes.html' title='Using Notepad after Schema Changes'/><author><name>Steve Harclerode</name><uri>http://www.blogger.com/profile/01048793793830514398</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_NWdMoFXGm5U/Sp2oRQ30x-I/AAAAAAAAACE/vYCnIUTkZM8/S220/274450548.bin.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-21774696.post-2218169097747741508</id><published>2010-08-10T17:22:00.001-07:00</published><updated>2010-08-11T09:44:47.236-07:00</updated><title type='text'>BizTalk Error "...is an invalid XPath expression..." when using Table Looping functoid</title><content type='html'>I was building a BizTalk map today that uses a Table Looping functoid. It's been a while since I have used that functoid, and I thought I had everything setup fairly well. I went to test the map, and here's an error that I saw. The names have been changed to protect the innocent:&lt;br /&gt;&lt;pre&gt;C:\dev\Acme Development\BizTalk\Code\Acme.Customer\Acme.Customer.Maps\TestCases_FF_to_TestCase.btm: &lt;br /&gt;error btm1050: XSL transform error: Unable to write output instance to the following &lt;br /&gt;&lt;file: documents="" and="" local="" xml=""&gt;. XSLT compile error at (55,45). See InnerException for details. &lt;br /&gt;'userCSharp:ConvertToXsDateTime(string($var:))' is an invalid XPath expression. &lt;br /&gt;userCSharp:ConvertToXsDateTime(string($var:))' has an invalid qualified name.&lt;/file:&gt;&lt;/pre&gt;&lt;br /&gt;ConvertToXsDateTime() is a function that I put inside of a scripting functoid, and one of the Table Extractor functoids feeds into it.&lt;br /&gt;&lt;br /&gt;The issue was that I forgot to drag the output of the Table Looping functoid directly to the node I want to repeat. The output of the Table Looping functoid tells the map how many of the destination node it should produce.&lt;br /&gt;&lt;br /&gt;I figured this out by changing the output of the Table Extractor functoids to feed directly into the destination field (instead of into my Scripting functoid), and observing that running the test didn't produce any useful output.&lt;br /&gt;&lt;br /&gt;I want to record this here in my blog, since I've seen this error before, and I likely will again.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/21774696-2218169097747741508?l=stevestechnotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevestechnotes.blogspot.com/feeds/2218169097747741508/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=21774696&amp;postID=2218169097747741508' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/21774696/posts/default/2218169097747741508'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/21774696/posts/default/2218169097747741508'/><link rel='alternate' type='text/html' href='http://stevestechnotes.blogspot.com/2010/08/i-was-building-biztalk-map-today-that.html' title='BizTalk Error &quot;...is an invalid XPath expression...&quot; when using Table Looping functoid'/><author><name>Steve Harclerode</name><uri>http://www.blogger.com/profile/01048793793830514398</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_NWdMoFXGm5U/Sp2oRQ30x-I/AAAAAAAAACE/vYCnIUTkZM8/S220/274450548.bin.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-21774696.post-4840232906523287803</id><published>2010-07-29T11:00:00.000-07:00</published><updated>2010-07-29T11:58:55.142-07:00</updated><title type='text'>System.MissingMethodException was unhandled</title><content type='html'>I have been creating a "string array" for use in a BizTalk orchestration. My first version was quick and dirty, and I didn't implement the IEnumerator interface.&lt;br /&gt;&lt;br /&gt;Later, I decided to implement IEnumerator (and IEnumerable) so that it would be more recognizable to the next person reading my code. Everything compiled and a test program started, but the above exception was thrown when the client tried to call the Reset() method.&lt;br /&gt;&lt;br /&gt;One thing that I didn't realize was related was that the debugger wouldn't step into my code. I saw the message below when I tried to do that:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;---------------------------&lt;br /&gt;Microsoft Visual Studio&lt;br /&gt;---------------------------&lt;br /&gt;The following module was built either with optimizations enabled or without debug information:&lt;br /&gt;&lt;br /&gt;C:\WINDOWS\assembly\GAC_MSIL\AtlasReo.BizTalk.Utils\1.0.0.0__799aa29801fe6d60\AtlasReo.BizTalk.Utils.dll&lt;br /&gt;&lt;br /&gt;To debug this module, change its project build configuration to Debug mode. To&lt;br /&gt;suppress this message, disable the 'Warn if no user code on launch' debugger option.&lt;br /&gt;---------------------------&lt;br /&gt;OK&lt;br /&gt;---------------------------&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;As many people reading this have probably figured out by now, I had an older version of my string array class in the GAC. Oops.&lt;br /&gt;&lt;br /&gt;Pulling the assembly out of the GAC solved the first issue, and then I could also run the debugger on the assembly code.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/21774696-4840232906523287803?l=stevestechnotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevestechnotes.blogspot.com/feeds/4840232906523287803/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=21774696&amp;postID=4840232906523287803' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/21774696/posts/default/4840232906523287803'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/21774696/posts/default/4840232906523287803'/><link rel='alternate' type='text/html' href='http://stevestechnotes.blogspot.com/2010/07/systemmissingmethodexception-was.html' title='System.MissingMethodException was unhandled'/><author><name>Steve Harclerode</name><uri>http://www.blogger.com/profile/01048793793830514398</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_NWdMoFXGm5U/Sp2oRQ30x-I/AAAAAAAAACE/vYCnIUTkZM8/S220/274450548.bin.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-21774696.post-2991946235366481733</id><published>2010-07-28T15:39:00.001-07:00</published><updated>2010-07-28T15:47:18.237-07:00</updated><title type='text'>BizTalk "Errors exist for one or more children."</title><content type='html'>I used to see the error "Errors exist for one or more children." a lot in BizTalk 2004 when I was creating an orchestration. The error wasn't valid, because I could usually get rid of it by saving and then deleting code from an Expression shape, then compiling, then copying the code back, and compiling again.&lt;br /&gt;&lt;br /&gt;I had not yet encountered this issue with BizTalk 2006 until today. This time the error was tagged to my Loop shape. I was able to fix the error by deleting the code from an Expression shape inside of the loop, and proceeding as I describe above. I'm just glad that I didn't have a large number of expression shapes inside of my Loop, because there was no way for me to identify which Expression was causing the error.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/21774696-2991946235366481733?l=stevestechnotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevestechnotes.blogspot.com/feeds/2991946235366481733/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=21774696&amp;postID=2991946235366481733' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/21774696/posts/default/2991946235366481733'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/21774696/posts/default/2991946235366481733'/><link rel='alternate' type='text/html' href='http://stevestechnotes.blogspot.com/2010/07/biztalk-errors-exist-for-one-or-more.html' title='BizTalk &quot;Errors exist for one or more children.&quot;'/><author><name>Steve Harclerode</name><uri>http://www.blogger.com/profile/01048793793830514398</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_NWdMoFXGm5U/Sp2oRQ30x-I/AAAAAAAAACE/vYCnIUTkZM8/S220/274450548.bin.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-21774696.post-9124462384014816321</id><published>2010-07-27T15:40:00.000-07:00</published><updated>2010-07-27T16:16:54.845-07:00</updated><title type='text'>BizTalk 2006 Envelopes</title><content type='html'>I've been working on a BizTalk 2006 project lately. I was pleasantly surprised to find out that using an envelope schema for debatching is easier than I remembered from when I worked with 2004.&lt;br /&gt;&lt;br /&gt;In my case, I had a schema whose records looked something like this:&lt;br /&gt;&amp;lt;root&amp;gt;&lt;br /&gt;&amp;lt;header&amp;gt;child elements omitted!&amp;lt;/header&amp;gt;&lt;br /&gt;&amp;lt;body&amp;gt;child elements omitted!&amp;lt;/body&amp;gt;&lt;br /&gt;&amp;lt;/root&amp;gt;&lt;br /&gt;&lt;br /&gt;All I did was to create 3 schemas, one for the envelope, and one each for the header and the body. The envelope schema had the Envelope property of the Schema node set to "Yes", and the Body Xpath property of the "root" node set to:&lt;br /&gt;&lt;br /&gt;/*[local-name()='root' and namespace-uri()='']&lt;br /&gt;&lt;br /&gt;I created the schemas for the header and the body directly from samples I made by cutting and pasting from the large message.&lt;br /&gt;&lt;br /&gt;I then deployed the schemas, set up a receive port / location, and 2 send ports with filters to grab the messages based on the receive port and the message type. Here are the results:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_NWdMoFXGm5U/TE9oNaFR6FI/AAAAAAAAAC4/fxN-FKilFSI/s1600/split_messages.jpg"&gt;&lt;img style="cursor: pointer; width: 320px; height: 219px;" src="http://4.bp.blogspot.com/_NWdMoFXGm5U/TE9oNaFR6FI/AAAAAAAAAC4/fxN-FKilFSI/s320/split_messages.jpg" alt="" id="BLOGGER_PHOTO_ID_5498728249591720018" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I remember this being more difficult in BTS 2004, I think I created a pipeline component to make this work. I'd like to test this out, but I don't currently have access to a BTS 2004 installation.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/21774696-9124462384014816321?l=stevestechnotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevestechnotes.blogspot.com/feeds/9124462384014816321/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=21774696&amp;postID=9124462384014816321' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/21774696/posts/default/9124462384014816321'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/21774696/posts/default/9124462384014816321'/><link rel='alternate' type='text/html' href='http://stevestechnotes.blogspot.com/2010/07/biztalk-2006-envelopes.html' title='BizTalk 2006 Envelopes'/><author><name>Steve Harclerode</name><uri>http://www.blogger.com/profile/01048793793830514398</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_NWdMoFXGm5U/Sp2oRQ30x-I/AAAAAAAAACE/vYCnIUTkZM8/S220/274450548.bin.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_NWdMoFXGm5U/TE9oNaFR6FI/AAAAAAAAAC4/fxN-FKilFSI/s72-c/split_messages.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-21774696.post-5190298603877516893</id><published>2010-04-29T15:36:00.000-07:00</published><updated>2010-04-29T16:14:49.522-07:00</updated><title type='text'>Microsoft Enterprise Library Caching Gotcha</title><content type='html'>Recently, a developer where I work added caching to some methods that retrieve contacts from a table in our database. Afterwords, a tester complained that when he went to one screen that allows selecting a contact, he saw the text "[Select a contact]" repeated. Not only that, every time he returned to that screen, the problem became worse.&lt;br /&gt;&lt;br /&gt;Before caching was added, the method that retrieves the list of contacts got them from the database, then it added the text "[Select a contact]" to the beginning of the list. When caching was added, the list was retrieved from the cache (if available), and then the text "[Select a contact]" was added to the beginning.&lt;br /&gt;&lt;br /&gt;It turns out that when a list is added to the cache, and then &lt;span style="font-weight: bold;"&gt;later&lt;/span&gt; the list is modified, that modified list will be returned the next time the cache is accessed. Here is some sample code to make it more clear:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;private void btnTestCaching_Click(object sender, EventArgs e)&lt;br /&gt;{&lt;br /&gt;  List&amp;lt;string&amp;gt; testList = TestCaching(1);&lt;br /&gt;  PrintList(testList);&lt;br /&gt;  testList = TestCaching(2);&lt;br /&gt;  PrintList(testList);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;private void PrintList(List&amp;lt;string&amp;gt; testList)&lt;br /&gt;{&lt;br /&gt;  foreach (string s in testList)&lt;br /&gt;  {&lt;br /&gt;      Debug.WriteLine(s);&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;private List&amp;lt;string&amp;gt; TestCaching(int id)&lt;br /&gt;{&lt;br /&gt;  ICacheManager cache = CacheFactory.GetCacheManager();&lt;br /&gt;  List&amp;lt;string&amp;gt; testList = cache["TestList"] as List&amp;lt;string&amp;gt;;&lt;br /&gt;  if (testList == null)&lt;br /&gt;  {&lt;br /&gt;      testList = new List&amp;lt;string&amp;gt;();&lt;br /&gt;      testList.Add("Test 1");&lt;br /&gt;      testList.Add("Test 2");&lt;br /&gt;      testList.Add("Test 3");&lt;br /&gt;&lt;br /&gt;      AbsoluteTime expiry = new AbsoluteTime(new TimeSpan(2, 0, 0, 0));&lt;br /&gt;      cache.Add("TestList", testList, CacheItemPriority.High, null, new ICacheItemExpiration[] { expiry });&lt;br /&gt;  }&lt;br /&gt;  testList.Add("[Select a contact] " + id.ToString());&lt;br /&gt;  return testList;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;I added a counter to make it slightly more clear what's happening. Here's the output from Visual Studio:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;Test 1&lt;br /&gt;Test 2&lt;br /&gt;Test 3&lt;br /&gt;[Select a contact] 1&lt;br /&gt;Test 1&lt;br /&gt;Test 2&lt;br /&gt;Test 3&lt;br /&gt;[Select a contact] 1&lt;br /&gt;[Select a contact] 2&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;I was surprised by the outcome. I thought that the list would be persisted only when cache.Add() is called, apparently that's not the case.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/21774696-5190298603877516893?l=stevestechnotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevestechnotes.blogspot.com/feeds/5190298603877516893/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=21774696&amp;postID=5190298603877516893' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/21774696/posts/default/5190298603877516893'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/21774696/posts/default/5190298603877516893'/><link rel='alternate' type='text/html' href='http://stevestechnotes.blogspot.com/2010/04/microsoft-enterprise-library-caching.html' title='Microsoft Enterprise Library Caching Gotcha'/><author><name>Steve Harclerode</name><uri>http://www.blogger.com/profile/01048793793830514398</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_NWdMoFXGm5U/Sp2oRQ30x-I/AAAAAAAAACE/vYCnIUTkZM8/S220/274450548.bin.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-21774696.post-6486969182094347925</id><published>2010-04-15T15:50:00.001-07:00</published><updated>2010-04-15T16:12:06.090-07:00</updated><title type='text'>Viewing GAC Assemblies in an Explorer Window</title><content type='html'>I saw a neat trick somewhere on the internet...at the moment I can't find the original source. I like to give attributions where possible, but oh well.&lt;br /&gt;&lt;br /&gt;As many developers probably know, it's possible to navigate to the GAC  by using the command line to go to C:\Windows\Assembly (this is on  Windows Server 2003).&lt;br /&gt;&lt;br /&gt;However, it's also possible to get Explorer  to show items in the GAC. All of the assemblies I have created with  Visual Studio end up in the GAC_MSIL folder. I can take the following  steps to view them: click Start / Run, then key in  "%SYSTEMROOT%\assembly\gac_msil", and click OK.&lt;br /&gt;&lt;br /&gt;An Explorer  window will pop up showing all of the assemblies in that part of the  GAC:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_NWdMoFXGm5U/S8eay8MoolI/AAAAAAAAACw/oKZKGH5_vRI/s1600/gac.jpg"&gt;&lt;img style="cursor: pointer; width: 644px; height: 482px;" src="http://1.bp.blogspot.com/_NWdMoFXGm5U/S8eay8MoolI/AAAAAAAAACw/oKZKGH5_vRI/s320/gac.jpg" alt="" id="BLOGGER_PHOTO_ID_5460503273153274450" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Why would you want to do this? This trick allows you to debug a DLL directly from the GAC. You can now navigate to the exact location of the DLL, and then drop the .PDB in the same folder. If you then have the project for the DLL open in Visual Studio, you can attach to the process calling your DLL and set breakpoints, etc.&lt;br /&gt;&lt;br /&gt;This doesn't always work smoothly, but there are some situations where it was the only way to get the job done. In particular, if the client for the DLL is a program like BizTalk or SharePoint, it's the only way I could debug the DLL.&lt;br /&gt;&lt;br /&gt;I have encountered at least one time when I had to reboot to be able to set breakpoints, but it beat the hell out of my alternatives.&lt;br /&gt;&lt;br /&gt;Remember to remove the PDB from the GAC before you try to UN-install your DLL.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/21774696-6486969182094347925?l=stevestechnotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevestechnotes.blogspot.com/feeds/6486969182094347925/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=21774696&amp;postID=6486969182094347925' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/21774696/posts/default/6486969182094347925'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/21774696/posts/default/6486969182094347925'/><link rel='alternate' type='text/html' href='http://stevestechnotes.blogspot.com/2010/04/viewing-gac-assemblies-in-explorer.html' title='Viewing GAC Assemblies in an Explorer Window'/><author><name>Steve Harclerode</name><uri>http://www.blogger.com/profile/01048793793830514398</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_NWdMoFXGm5U/Sp2oRQ30x-I/AAAAAAAAACE/vYCnIUTkZM8/S220/274450548.bin.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_NWdMoFXGm5U/S8eay8MoolI/AAAAAAAAACw/oKZKGH5_vRI/s72-c/gac.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-21774696.post-6973979601655010310</id><published>2010-02-11T13:09:00.000-08:00</published><updated>2010-04-29T16:35:04.086-07:00</updated><title type='text'>T-SQL UPDATE with FROM</title><content type='html'>I'm putting the following query here where I can find it again...it basically shows how the T-SQL "UPDATE" statement works with the FROM option. It's from a response to an old newsgroup post of mine -- thanks to David Pendleton!&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;UPDATE dest&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;SET accountNumber = src.ACCT&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;FROM Vendor dest&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;INNER JOIN zCustomer src on dest.[name] = src.CUNA&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/21774696-6973979601655010310?l=stevestechnotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevestechnotes.blogspot.com/feeds/6973979601655010310/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=21774696&amp;postID=6973979601655010310' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/21774696/posts/default/6973979601655010310'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/21774696/posts/default/6973979601655010310'/><link rel='alternate' type='text/html' href='http://stevestechnotes.blogspot.com/2010/02/t-sql-update-with-from.html' title='T-SQL UPDATE with FROM'/><author><name>Steve Harclerode</name><uri>http://www.blogger.com/profile/01048793793830514398</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_NWdMoFXGm5U/Sp2oRQ30x-I/AAAAAAAAACE/vYCnIUTkZM8/S220/274450548.bin.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-21774696.post-6709394532762942035</id><published>2010-02-11T13:02:00.000-08:00</published><updated>2010-08-14T18:52:55.629-07:00</updated><title type='text'>SQL UPDATE With FROM Option</title><content type='html'>I'm putting the following query here where I can find it again...it basically shows how the T-SQL "UPDATE" statement works with the FROM option. It's from a response to a an old newsgroup post of mine -- thanks to David Pendleton.&lt;br /&gt;&lt;br /&gt;UPDATE dest&lt;br /&gt;SET accountNumber = src.ACCT&lt;br /&gt;FROM Vendor dest&lt;br /&gt;INNER  JOIN zCustomer src on dest.[name] = src.CUNA&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/21774696-6709394532762942035?l=stevestechnotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevestechnotes.blogspot.com/feeds/6709394532762942035/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=21774696&amp;postID=6709394532762942035' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/21774696/posts/default/6709394532762942035'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/21774696/posts/default/6709394532762942035'/><link rel='alternate' type='text/html' href='http://stevestechnotes.blogspot.com/2010/02/sql-update-with-from-option.html' title='SQL UPDATE With FROM Option'/><author><name>Steve Harclerode</name><uri>http://www.blogger.com/profile/01048793793830514398</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_NWdMoFXGm5U/Sp2oRQ30x-I/AAAAAAAAACE/vYCnIUTkZM8/S220/274450548.bin.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-21774696.post-5614032609041469798</id><published>2009-04-27T18:03:00.001-07:00</published><updated>2010-04-29T16:41:43.992-07:00</updated><title type='text'></title><content type='html'>Today I was working with a pipeline component which encrypted fields in an XML message, for sensitive information. I realized that I needed to use it with a Flat File disassembler, which means that the original message was not XML, so I had to put my component after the Flat File disassembler. For various reasons, I wanted to use my component no later than the Dissasembler stage for this scenario.&lt;br /&gt;&lt;br /&gt;So first, I added IDisassemblerComponent to the list of interfaces being implemented in my pipeline component class.&lt;br /&gt;&lt;br /&gt;Then, I added the following code:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;      private bool beginMessage = false;&lt;br /&gt;      private IPipelineContext pContext;&lt;br /&gt;      private IBaseMessage pInMsg;&lt;br /&gt;&lt;br /&gt;      void IDisassemblerComponent.Disassemble(IPipelineContext pContext, IBaseMessage pInMsg)&lt;br /&gt;      {&lt;br /&gt;          beginMessage = true;&lt;br /&gt;          this.pContext = pContext;&lt;br /&gt;          this.pInMsg = pInMsg;&lt;br /&gt;      }&lt;br /&gt;&lt;br /&gt;      IBaseMessage IDisassemblerComponent.GetNext(IPipelineContext pContext)&lt;br /&gt;      {&lt;br /&gt;          if (beginMessage)&lt;br /&gt;          {&lt;br /&gt;              beginMessage = false;&lt;br /&gt;              return Execute(pContext, pInMsg);&lt;br /&gt;          }&lt;br /&gt;          else&lt;br /&gt;          {&lt;br /&gt;              return null;&lt;br /&gt;          }&lt;br /&gt;      }&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;This will only work if the previous disassembler is supposed to produce one message.&lt;br /&gt;&lt;br /&gt;&lt;hr /&gt;&lt;br /&gt;&lt;br /&gt;4/29/2010 - Changed the code to reflect changes suggested by Johan Rex...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/21774696-5614032609041469798?l=stevestechnotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevestechnotes.blogspot.com/feeds/5614032609041469798/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=21774696&amp;postID=5614032609041469798' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/21774696/posts/default/5614032609041469798'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/21774696/posts/default/5614032609041469798'/><link rel='alternate' type='text/html' href='http://stevestechnotes.blogspot.com/2009/04/today-i-was-working-with-pipeline.html' title=''/><author><name>Steve Harclerode</name><uri>http://www.blogger.com/profile/01048793793830514398</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_NWdMoFXGm5U/Sp2oRQ30x-I/AAAAAAAAACE/vYCnIUTkZM8/S220/274450548.bin.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-21774696.post-3524532468869536054</id><published>2008-10-29T16:11:00.000-07:00</published><updated>2008-10-29T16:14:58.074-07:00</updated><title type='text'>Find a Specific Value Anywhere in a SQL Server Database</title><content type='html'>I can't tell you how often in the past I could have used this script from David Yardy's blog:&lt;br /&gt;&lt;a href="http://blog.davidyardy.com/archive/2008/08/16/sql-server-ndash-find-field-value-in-database.aspx"&gt;http://blog.davidyardy.com/archive/2008/08/16/sql-server-ndash-find-field-value-in-database.aspx&lt;br /&gt;&lt;/a&gt;I can find a string value anywhere it exists in a field in my database. As he says, it can easily be modified to search for values that are not strings.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/21774696-3524532468869536054?l=stevestechnotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevestechnotes.blogspot.com/feeds/3524532468869536054/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=21774696&amp;postID=3524532468869536054' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/21774696/posts/default/3524532468869536054'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/21774696/posts/default/3524532468869536054'/><link rel='alternate' type='text/html' href='http://stevestechnotes.blogspot.com/2008/10/find-specific-value-anywhere-in-sql.html' title='Find a Specific Value Anywhere in a SQL Server Database'/><author><name>Steve Harclerode</name><uri>http://www.blogger.com/profile/01048793793830514398</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_NWdMoFXGm5U/Sp2oRQ30x-I/AAAAAAAAACE/vYCnIUTkZM8/S220/274450548.bin.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-21774696.post-2273397303057734870</id><published>2008-10-09T15:05:00.000-07:00</published><updated>2008-10-09T17:39:37.182-07:00</updated><title type='text'></title><content type='html'>Today I was attempting to use the Session object to exchange information between two ASP .Net pages. I received the following exception when I tried to assign something to it:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;System.Web.HttpException was unhandled by user code&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;  Message="Session state can only be used when enableSessionState is set to true, either in a configuration file or in the Page directive. Please also make sure that System.Web.SessionStateModule or a custom session state module is included in the &lt;configuration&gt;\\&lt;system.web&gt;\\&lt;httpmodules&gt; section in the application configuration."&lt;/httpmodules&gt;&lt;/system.web&gt;&lt;/configuration&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;  Source="System.Web"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;  ErrorCode=-2147467259&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;  StackTrace:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;       at System.Web.UI.Page.get_Session()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;       at AddToCart.SaveCustomFields() in c:\Inetpub\wwwroot\StarterSite\AddToCart.aspx.cs:line 485&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;       at AddToCart.AddItemToCart() in c:\Inetpub\wwwroot\StarterSite\AddToCart.aspx.cs:line 490&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;       at AddToCart.btnAddToCart_Click(Object sender, EventArgs e) in c:\Inetpub\wwwroot\StarterSite\AddToCart.aspx.cs:line 300&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;       at System.Web.UI.WebControls.Button.OnClick(EventArgs e)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;       at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;       at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;       at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;       at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;       at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Based on information I found on the web, I first tried to set&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt; EnableSessionState="True"&lt;/span&gt;&lt;/span&gt; on every page that needed to use the session, and that didn't cure the issue.&lt;br /&gt;&lt;br /&gt;Next, I tried setting &lt;span style=";font-family:courier new;font-size:85%;"  &gt;&amp;lt;pages enableSessionState="true"&amp;gt;&lt;/span&gt; in the Web.config file under configuration/system.web. That didn't fix it either.&lt;br /&gt;&lt;br /&gt;Finally, what worked was to put this into the Web.config:&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;&amp;lt;sessionState mode="InProc"&amp;gt;&amp;lt;/sessionState&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;(also under configuration/system.web).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/21774696-2273397303057734870?l=stevestechnotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevestechnotes.blogspot.com/feeds/2273397303057734870/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=21774696&amp;postID=2273397303057734870' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/21774696/posts/default/2273397303057734870'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/21774696/posts/default/2273397303057734870'/><link rel='alternate' type='text/html' href='http://stevestechnotes.blogspot.com/2008/10/today-i-was-attempting-to-use-session.html' title=''/><author><name>Steve Harclerode</name><uri>http://www.blogger.com/profile/01048793793830514398</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_NWdMoFXGm5U/Sp2oRQ30x-I/AAAAAAAAACE/vYCnIUTkZM8/S220/274450548.bin.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-21774696.post-3950583877756060709</id><published>2008-09-04T17:17:00.000-07:00</published><updated>2008-09-04T17:37:27.506-07:00</updated><title type='text'>SQL Server 2000 - Finding a Field in a Database</title><content type='html'>Today I was looking for a field in a SQL Server 2000 database which had lots of tables. I knew the name of the field, but I didn't know the table name. So I modified the code contained in &lt;span style="font-weight: bold;font-size:100%;" &gt;&lt;span style="font-family:courier new;"&gt;master.dbo.sp_columns&lt;/span&gt;&lt;/span&gt; to find it. It turns out that in my case, I was looking for a field that didn't exist. Hopefully you'll have better luck.&lt;br /&gt;&lt;br /&gt;To use this, replace the words &lt;span style="font-weight: bold;"&gt;your field here&lt;/span&gt; in the next-to-last line.&lt;span style="font-size:78%;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;      &lt;br /&gt;&lt;span style="font-size:78%;"&gt;&lt;span style="font-family:courier new;"&gt;        SELECT&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            TABLE_QUALIFIER = convert(sysname,DB_NAME()),&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            TABLE_OWNER = convert(sysname,USER_NAME(o.uid)),&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            TABLE_NAME = convert(sysname,o.name),&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            COLUMN_NAME = convert(sysname,c.name),&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            d.DATA_TYPE,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            convert (sysname,case&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;                when t.xusertype &gt; 255 then t.name&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;                else d.TYPE_NAME collate database_default&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            end) TYPE_NAME,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            convert(int,case&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;                when d.DATA_TYPE in (6,7) then d.data_precision         /* FLOAT/REAL */&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;                else OdbcPrec(c.xtype,c.length,c.xprec)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            end) "PRECISION",&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            convert(int,case&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;                when type_name(d.ss_dtype) IN ('numeric','decimal') then    /* decimal/numeric types */&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;                    OdbcPrec(c.xtype,c.length,c.xprec)+2&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;                else&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;                    isnull(d.length, c.length)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            end) LENGTH,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            SCALE = convert(smallint, OdbcScale(c.xtype,c.xscale)),&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            d.RADIX,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            NULLABLE = convert(smallint, ColumnProperty (c.id, c.name, 'AllowsNull')),&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            REMARKS = convert(varchar(254),null),    /* Remarks are NULL */&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            COLUMN_DEF = text,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            d.SQL_DATA_TYPE,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            d.SQL_DATETIME_SUB,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            CHAR_OCTET_LENGTH = isnull(d.length, c.length)+d.charbin,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            ORDINAL_POSITION = convert(int,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;                       (&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;                        select count(*)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;                        from syscolumns sc&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;                        where sc.id     =  c.id&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;                          AND sc.number =  c.number&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;                          AND sc.colid  &lt;= c.colid&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;                        )),&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            IS_NULLABLE = convert(varchar(254),&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;                substring('NO YES',(ColumnProperty (c.id, c.name, 'AllowsNull')*3)+1,3)),&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            SS_DATA_TYPE = c.type&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        FROM&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            sysobjects o,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            master.dbo.spt_datatype_info d,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            systypes t,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            syscolumns c&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            LEFT OUTER JOIN syscomments m on c.cdefault = m.id&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;                AND m.colid = 1&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        WHERE&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;--            o.id = @table_id&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            c.id = o.id&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            AND t.xtype = d.ss_dtype&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            AND c.length = isnull(d.fixlen, c.length)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            AND (o.type not in ('P', 'FN', 'TF', 'IF') OR (o.type in ('TF', 'IF') and c.number = 0))&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            AND isnull(d.AUTO_INCREMENT,0) = isnull(ColumnProperty (c.id, c.name, 'IsIdentity'),0)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            AND c.xusertype = t.xusertype&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            AND c.name like '%your field here%'&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/21774696-3950583877756060709?l=stevestechnotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevestechnotes.blogspot.com/feeds/3950583877756060709/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=21774696&amp;postID=3950583877756060709' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/21774696/posts/default/3950583877756060709'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/21774696/posts/default/3950583877756060709'/><link rel='alternate' type='text/html' href='http://stevestechnotes.blogspot.com/2008/09/sql-server-2000-finding-field-in.html' title='SQL Server 2000 - Finding a Field in a Database'/><author><name>Steve Harclerode</name><uri>http://www.blogger.com/profile/01048793793830514398</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_NWdMoFXGm5U/Sp2oRQ30x-I/AAAAAAAAACE/vYCnIUTkZM8/S220/274450548.bin.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-21774696.post-2472218243412919590</id><published>2008-02-13T09:14:00.000-08:00</published><updated>2008-02-13T09:27:28.202-08:00</updated><title type='text'>Deploy Problem From Within Visual Studio</title><content type='html'>Yesterday I was trying to deploy a BizTalk solution from within Visual Studio and I saw all kinds of strange errors. I started trimming down the app, deleting schemas, pipelines, and I still saw errors. Then I deleted the entire application in the BizTalk Console, and when I tried to deploy I saw this error in Visual Studio:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family: courier new;"&gt;Error 25 Failed to add resource(s). Change requests failed for some  &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;resources. BizTalkAssemblyResourceManager failed to complete end type change  &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;request. Failed to update binding information. Party 'PartyName' enlisted  &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;under role  &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;'ResaleReportReceiver(MyCompany.B2B.ResaleReport.Process.SendResaleReportRoleLink_Type)'  &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;has not bound all the operations of role link port types.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The last thing I tried was to go through each project and to set Redeploy= false, and then delete the project. That worked.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/21774696-2472218243412919590?l=stevestechnotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevestechnotes.blogspot.com/feeds/2472218243412919590/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=21774696&amp;postID=2472218243412919590' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/21774696/posts/default/2472218243412919590'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/21774696/posts/default/2472218243412919590'/><link rel='alternate' type='text/html' href='http://stevestechnotes.blogspot.com/2008/02/deploy-problem-from-within-visual.html' title='Deploy Problem From Within Visual Studio'/><author><name>Steve Harclerode</name><uri>http://www.blogger.com/profile/01048793793830514398</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_NWdMoFXGm5U/Sp2oRQ30x-I/AAAAAAAAACE/vYCnIUTkZM8/S220/274450548.bin.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-21774696.post-7429989197866533472</id><published>2008-02-06T11:07:00.000-08:00</published><updated>2008-07-28T16:08:20.825-07:00</updated><title type='text'></title><content type='html'>I was trying to get a send port working in a BizTalk app the other day, but it kept failing with the following message:&lt;br /&gt;&lt;br /&gt;                      &lt;p class="MsoNormal"&gt;&lt;span style=";font-family:&amp;quot;;font-size:9;"  &gt;Event Type:  Error&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;Event Source: BizTalk Server 2006&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;Event Category:     BizTalk Server 2006 &lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;Event ID:    5754&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;Date:        2/5/2008&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;Time:        6:06:56 PM&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;User:        N/A&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;Computer:    ACME31&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;Description:&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;A message sent to adapter "FILE" on send port "ACME.B2B.ResaleReport.Port.Snd.Http.OneWay.Test.eBI.Steve" with URI "C:\Dev\ACME.B2B.ResaleReport\OneWayPorts\DB2\%MessageID%.xml" is suspended. &lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;Error details: The system cannot find the file specified. (Exception from HRESULT: 0x80070002) &lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;MessageId:  {4E99E4FF-5E09-441E-8AB2-2A83FB49B3A6}&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;InstanceID: {0BFBB93E-3352-4354-A1C7-A153FE90A42C}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;span style=";font-family:&amp;quot;;font-size:9;"  &gt;For more information, see Help and Support Center at &lt;a href="http://go.microsoft.com/fwlink/events.asp"&gt;http://go.microsoft.com/fwlink/events.asp&lt;/a&gt;.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;When I removed the map from the send port, I was able to get a message out with no errors.&lt;br /&gt;&lt;br /&gt;I was stumped until I tried to run the map inside of Visual Studio, and then I saw this message:&lt;br /&gt;&lt;span style=";font-family:&amp;quot;;font-size:9;"  &gt;Invoking component...&lt;br /&gt;C:\Dev\ACME.B2B.ResaleReport\ACME.B2B.ResaleReport.Transforms.Premier\ResaleReport_To_EDI867.btm: error btm1067: The external assembly with the fully qualified name "ACME.B2B.ResaleReport.Utilities, Version=1.1.0.0, Culture=neutral, PublicKeyToken=ffee3e80c6a877dd" cannot be invoked. Make sure this assembly is in GAC.&lt;br /&gt;Test Map used the following file: &lt;file: xml=""&gt; as input to the map.&lt;br /&gt;Test Map success for map file C:\Dev\ACME.B2B.ResaleReport\ACME.B2B.ResaleReport.Transforms.Premier\ResaleReport_To_EDI867.btm. The output is stored in the following file: &lt;file: xml=""&gt;&lt;br /&gt;Component invocation succeeded.&lt;/file:&gt;&lt;/file:&gt;&lt;/span&gt;&lt;span style=";font-family:&amp;quot;;font-size:9;"  &gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;From this, it was easy to see that there were some custom functoids in the map that were not deployed to the GAC. I deployed the DLL containing the functoids, and the error was fixed.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/21774696-7429989197866533472?l=stevestechnotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevestechnotes.blogspot.com/feeds/7429989197866533472/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=21774696&amp;postID=7429989197866533472' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/21774696/posts/default/7429989197866533472'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/21774696/posts/default/7429989197866533472'/><link rel='alternate' type='text/html' href='http://stevestechnotes.blogspot.com/2008/02/i-was-trying-to-get-send-port-working.html' title=''/><author><name>Steve Harclerode</name><uri>http://www.blogger.com/profile/01048793793830514398</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_NWdMoFXGm5U/Sp2oRQ30x-I/AAAAAAAAACE/vYCnIUTkZM8/S220/274450548.bin.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-21774696.post-1250615072529611883</id><published>2007-09-17T13:02:00.000-07:00</published><updated>2007-10-30T11:04:04.998-07:00</updated><title type='text'></title><content type='html'>I was helping a client upgrade their BizTalk Server 2004 machine from an evaluation version of the SAP Adapter to the paid version. We got an interesting error warning in the Application Event Log right after the upgrade:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;Event Type:    Warning&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Event Source:  SQLSERVERAGENT&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Event Category:        Job Engine &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Event ID:      208&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Date:          9/17/2007&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Time:          2:09:03 PM&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;User:          N/A&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Computer: XXXXXX&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Description:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;SQL Server Scheduled Job 'MessageBox_Message_ManageRefCountLog_BizTalkMsgBoxDb' (0xD3864F44666B084B85AE11128905F6AE) - Status: Failed - Invoked on: 2007-09-17 14:09:03 - Message: The job failed.  The Job was invoked by Schedule 19 (Schedule).  The last step to run was step 1 (Purge).&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;This warning repeated every minute.&lt;br /&gt;&lt;br /&gt;The problem was that when we installed the adapter, the job mentioned above had it's owner changed from the local BizTalk administrator to the "regular" BizTalk user. We changed the user to match all of the other BizTalk jobs in SQL, and no more warning messages.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/21774696-1250615072529611883?l=stevestechnotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevestechnotes.blogspot.com/feeds/1250615072529611883/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=21774696&amp;postID=1250615072529611883' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/21774696/posts/default/1250615072529611883'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/21774696/posts/default/1250615072529611883'/><link rel='alternate' type='text/html' href='http://stevestechnotes.blogspot.com/2007/09/i-was-helping-client-upgrade-their.html' title=''/><author><name>Steve Harclerode</name><uri>http://www.blogger.com/profile/01048793793830514398</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_NWdMoFXGm5U/Sp2oRQ30x-I/AAAAAAAAACE/vYCnIUTkZM8/S220/274450548.bin.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-21774696.post-8184798308019528343</id><published>2007-03-01T13:09:00.000-08:00</published><updated>2007-03-01T13:25:19.686-08:00</updated><title type='text'>EDI R2 Issue (Not a Bug)</title><content type='html'>I recently implemented two outbound EDI transactions for a client, an 852 and an 867 to a single customer. I found that I was only able to send a single value for the GS01 element to a particular partner, even though I had entered a line for each transaction in the EDI setup for that partner.&lt;br /&gt;&lt;br /&gt;In the EDI setup parameters for a partner (X12 Properties/Party as Interchange Receiver/X12 Interchange Envelope Definition/GS and ST Segment Definition), you can enter multiple lines to set up GS segments for different transactions for that partner. Normally, for an 867 the GS01 element should have the value “PT”, and the 852 should have the value “PD”. What actually happened is that if a particular line was set to be the “default”, the values on that line were being used for all transactions. And there is no way to avoid setting one of the lines as default.&lt;br /&gt;&lt;br /&gt;The problem in this case went back to the EDI R2 tutorial. I blindly copied the parameters for my transactions from the outbound parameters that they had set up for the partner named "THEM". The target namespace was set to &lt;pre&gt;http://schemas.microsoft.com/Edi/X12&lt;/pre&gt;, whereas for my configuration it needed to be set to &lt;pre&gt;http://schemas.microsoft.com/Edi/X12/2006&lt;/pre&gt;. The ST1 value, version, and namespace are all used to identify the line that applies to the particular outbound transaction, and the rest of the parameters on that line are then used to build the GS segment. This is clearly specified later on in the documentation, on a page called "Configuring X12 Interchange Envelope Generation" under:&lt;br /&gt;&lt;em&gt;Development &gt; Developing BizTalk Server EDI Solutions &gt; Configuring a Party for an EDI Solution &gt; Configuring X12-Specific Party Properties&lt;/em&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/21774696-8184798308019528343?l=stevestechnotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevestechnotes.blogspot.com/feeds/8184798308019528343/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=21774696&amp;postID=8184798308019528343' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/21774696/posts/default/8184798308019528343'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/21774696/posts/default/8184798308019528343'/><link rel='alternate' type='text/html' href='http://stevestechnotes.blogspot.com/2007/03/edi-r2-issue-not-bug.html' title='EDI R2 Issue (Not a Bug)'/><author><name>Steve Harclerode</name><uri>http://www.blogger.com/profile/01048793793830514398</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_NWdMoFXGm5U/Sp2oRQ30x-I/AAAAAAAAACE/vYCnIUTkZM8/S220/274450548.bin.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-21774696.post-8945135025104404907</id><published>2007-02-21T17:03:00.000-08:00</published><updated>2007-03-01T13:09:00.729-08:00</updated><title type='text'>BizTalk Orchestration Error Message</title><content type='html'>Sometimes when I'm editing an &lt;b&gt;Expression&lt;/b&gt; shape in an orchestration, I see a little red exclamation point, which shows the following when moused over: "The expression that you have entered is not valid. Click to edit in the Expression Editor". Usually, when I click on the shape, it's easy to see what the trouble is.&lt;br /&gt;&lt;br /&gt;However, there are times when clicking on the shape doesn't show anything that looks incorrect. If that wasn't strange enough, there are times when the orchestration will compile even though it shows the error in the orchestration designer. And stranger still is something that I just noticed -- when I took out a send shape immediately following the Expression shape, the orchestration would no longer compile.&lt;br /&gt;&lt;br /&gt;I have found 3 possible causes. This isn't intended to be an exhaustive list:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;This seems to occur most often when I try to wrap a string onto more than one line by using the "+" operator.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;In the orchestration view, one of the items will show an error. This should be pretty easy to fix from the orchestration view.&lt;/li&gt;&lt;li&gt;Variables with identical names are declared in more than one scope. I'm not sure why this is a problem, but it does seem to be sometimes.&lt;/li&gt;&lt;/ul&gt;Another similar (vague) error that shows up sometimes during compilation is "errors exist for one or more children". One of the causes of this error is this code that is used to obtain the GUID of the currently running orchestration:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;orchName = Microsoft.XLANGs.Core.Service.RootService.ServiceId&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Thanks to Scott Colestock for pointing this out. He suggests using the following code instead:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;YourOrchName(Microsoft.XLANGs.BaseTypes.InstanceId) &lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/21774696-8945135025104404907?l=stevestechnotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevestechnotes.blogspot.com/feeds/8945135025104404907/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=21774696&amp;postID=8945135025104404907' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/21774696/posts/default/8945135025104404907'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/21774696/posts/default/8945135025104404907'/><link rel='alternate' type='text/html' href='http://stevestechnotes.blogspot.com/2007/02/biztalk-orchestration-error-message.html' title='BizTalk Orchestration Error Message'/><author><name>Steve Harclerode</name><uri>http://www.blogger.com/profile/01048793793830514398</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_NWdMoFXGm5U/Sp2oRQ30x-I/AAAAAAAAACE/vYCnIUTkZM8/S220/274450548.bin.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-21774696.post-7958308107397320181</id><published>2007-02-01T18:00:00.000-08:00</published><updated>2007-02-01T18:09:54.929-08:00</updated><title type='text'>Where Are Those Darned R2 EDI Schemas</title><content type='html'>For some reason, I keep forgetting this...BizTalk R2 EDI schemas are kept in an executable ZIP file (EXE extension) at C:\Program Files\Microsoft BizTalk Server 2006\XSD_Schema\EDIMicrosoftEdiXSDTemplates.exe.&lt;br /&gt;&lt;br /&gt;By the way, the new BizTalk EDI support in R2 is way better than in previous versions. They have schemas for every X12 EDI document I could want, plus lots more. There's also support for EDIFACT, which I haven't had the privilege of using yet...&lt;br /&gt;&lt;br /&gt;Setting up the EDI transactions is also much easier. Actually, there are some transactions that I never was able to set up using the old EDI system. &lt;br /&gt;&lt;br /&gt;To compare the old EDI system to the new, it took me less than 1/2 the time to set up a real life outbound 810 transaction. Not bad.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/21774696-7958308107397320181?l=stevestechnotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevestechnotes.blogspot.com/feeds/7958308107397320181/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=21774696&amp;postID=7958308107397320181' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/21774696/posts/default/7958308107397320181'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/21774696/posts/default/7958308107397320181'/><link rel='alternate' type='text/html' href='http://stevestechnotes.blogspot.com/2007/02/where-are-those-darned-r2-edi-schemas.html' title='Where Are Those Darned R2 EDI Schemas'/><author><name>Steve Harclerode</name><uri>http://www.blogger.com/profile/01048793793830514398</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_NWdMoFXGm5U/Sp2oRQ30x-I/AAAAAAAAACE/vYCnIUTkZM8/S220/274450548.bin.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-21774696.post-117020245422049240</id><published>2007-01-30T16:07:00.000-08:00</published><updated>2007-01-30T17:12:33.323-08:00</updated><title type='text'>Note About BizTalk xpath Function</title><content type='html'>I just wanted to archive some sample code here...I've used the xpath function in BizTalk orchestrations fairly often, but it always takes me a couple of tries to get it right.&lt;br /&gt;&lt;br /&gt;Here's a snippet that I have used successfully to assign a value to a field in an EDI 810 document:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;n104Path = "/*[local-name()='X12_00401_810']" +&lt;br /&gt;    "/*[local-name()='N1Loop1'][3]" +&lt;br /&gt;    "/*[local-name()='N1']/*[local-name()='N104']";&lt;br /&gt;xpath(Edi810, n104Path) = Response.myField;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Here's another that I have used to extract the value from the same field in an EDI 810 document (there's a difference in the xpath expression, here I'm using the XPath string() function):&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;// check n104 element (under "ship to")&lt;br /&gt;n104Path = "string(/*[local-name()='X12_00401_810']" +&lt;br /&gt;    "/*[local-name()='N1Loop1'][3]" +&lt;br /&gt;    "/*[local-name()='N1']/*[local-name()='N104'])";&lt;br /&gt;n104String = (System.String)xpath(Edi810,n104Path);&lt;br /&gt;n104String = n104String.Trim();&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;I have seen examples that look like the following, but when I try them the string value is just null:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;n104Path = "/*[local-name()='X12_00401_810']" +&lt;br /&gt;    "/*[local-name()='N1Loop1'][3]" +&lt;br /&gt;    "/*[local-name()='N1']/*[local-name()='N104']/text()";&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/21774696-117020245422049240?l=stevestechnotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevestechnotes.blogspot.com/feeds/117020245422049240/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=21774696&amp;postID=117020245422049240' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/21774696/posts/default/117020245422049240'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/21774696/posts/default/117020245422049240'/><link rel='alternate' type='text/html' href='http://stevestechnotes.blogspot.com/2007/01/note-about-biztalk-xpath-function.html' title='Note About BizTalk xpath Function'/><author><name>Steve Harclerode</name><uri>http://www.blogger.com/profile/01048793793830514398</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_NWdMoFXGm5U/Sp2oRQ30x-I/AAAAAAAAACE/vYCnIUTkZM8/S220/274450548.bin.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-21774696.post-115783629192430813</id><published>2006-09-09T13:51:00.000-07:00</published><updated>2006-09-09T14:11:31.933-07:00</updated><title type='text'></title><content type='html'>I found 2 links that I want to keep here, for my future reference. If someone else uses them, I ask that they deposit $10,000 in my swiss bank account...(doesn't hurt to ask, right)?&lt;br /&gt;&lt;br /&gt;&lt;a href="http://blogs.msdn.com/dhtoran/archive/2005/07/07/436395.aspx"&gt;The first one&lt;/a&gt;, from David Hurtado's blog, shows how to promote context properties within an orchestration. It also has a link to Jon Flander's blog to show how to do this in a pipeline component (which I believe you could now use inside an orchestration with BizTalk 2006).&lt;br /&gt;&lt;br /&gt;&lt;a href="http://blog.eliasen.dk/PermaLink,guid,e6a6448a-b15e-4697-8d33-5b28f1d0a47e.aspx"&gt;The second link&lt;/a&gt; is to Jan Eliasen's blog. I've been tearing my hair out because for most of DTD's that I get from customers, when I import them into Visual Studio and use the schema editor, all of the nodes show up at the top level. Jan showed me how to get the schema to show up in VS in a clean, heirarchical way.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/21774696-115783629192430813?l=stevestechnotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevestechnotes.blogspot.com/feeds/115783629192430813/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=21774696&amp;postID=115783629192430813' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/21774696/posts/default/115783629192430813'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/21774696/posts/default/115783629192430813'/><link rel='alternate' type='text/html' href='http://stevestechnotes.blogspot.com/2006/09/i-found-2-links-that-i-want-to-keep.html' title=''/><author><name>Steve Harclerode</name><uri>http://www.blogger.com/profile/01048793793830514398</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_NWdMoFXGm5U/Sp2oRQ30x-I/AAAAAAAAACE/vYCnIUTkZM8/S220/274450548.bin.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-21774696.post-114140964725753949</id><published>2006-03-03T09:58:00.000-08:00</published><updated>2006-03-03T13:56:52.270-08:00</updated><title type='text'>BizTalk Pipelines Factoid</title><content type='html'>I'm sitting in the BizTalk 2006 Deep Dive training in Redmond right now, and the instructor told me some stuff that I don't remember seeing elsewhere. So I'm going to document this for myself and others.&lt;br /&gt;&lt;br /&gt;The provided XMLTransmit pipeline will ensure that an incoming document is well formed XML, but it won't validate the document against a schema. In order to validate against a schema, you need to create a pipeline and do one of two things:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Drop an &lt;strong&gt;XML disassembler&lt;/strong&gt; component into the pipeline, set the "Validate document structure" property to false, and then drop an &lt;strong&gt;XML validator&lt;/strong&gt; component as well. This will validate the XML document against any schema that is deployed to your host.&lt;/li&gt;&lt;li&gt;Drop only an &lt;strong&gt;XML disassembler&lt;/strong&gt; into the pipeline, set the "Validate document structure" property to true, and then add one or more schemas to the "Document schemas" property.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;Note that if you use the XML validator component as desribed above, you don't have to specify a schema. However, if you do specify a schema (or schemas) in this component, the pipeline will then validate only against that specific schema (or schemas).&lt;br /&gt;&lt;br /&gt;If you do choose to use a port to validate according to a schema, BizTalk 2006 will make it easier. In BTS 2006, pipelines support parameters, and you can override the schema(s) that are used.&lt;br /&gt;&lt;br /&gt;BTW, I'm using the word "factoid" in the title because I figure if &lt;strong&gt;functoid&lt;/strong&gt; is a word, than factoid must also be.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/21774696-114140964725753949?l=stevestechnotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevestechnotes.blogspot.com/feeds/114140964725753949/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=21774696&amp;postID=114140964725753949' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/21774696/posts/default/114140964725753949'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/21774696/posts/default/114140964725753949'/><link rel='alternate' type='text/html' href='http://stevestechnotes.blogspot.com/2006/03/biztalk-pipelines-factoid.html' title='BizTalk Pipelines Factoid'/><author><name>Steve Harclerode</name><uri>http://www.blogger.com/profile/01048793793830514398</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_NWdMoFXGm5U/Sp2oRQ30x-I/AAAAAAAAACE/vYCnIUTkZM8/S220/274450548.bin.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-21774696.post-113970571975623018</id><published>2006-02-11T16:40:00.000-08:00</published><updated>2006-02-11T17:16:21.030-08:00</updated><title type='text'>BizTalk Mapper - Looping Tricks</title><content type='html'>This post is intended to demonstrate 2 ways of using the looping functoid. One is pretty obvious, and the other shows a use for the looping functoid that requires a bit of help from a logical functoid.&lt;br /&gt;&lt;br /&gt;Along the way I'll also show how a value mapping functoid works.&lt;br /&gt;&lt;br /&gt;I have created 2 schemas intended to represent the status of a previously sent purchase order. POS.xsd is the output from a Line of Business (LOB) application, and PO_Status is intended to be sent to the customer. The LineItem node in POS.xsd and the Product node in POStatus.xsd both repeat 1 to unbounded times. Here's how the map looks:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/6659/2205/1600/loopingMap1.jpg"&gt;&lt;img style="cursor: pointer;" src="http://photos1.blogger.com/blogger/6659/2205/400/loopingMap1.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;The red functoid is a String Concatenate functoid, which has 3 inputs - ShipperName, a constant " - ", and ServiceLevel. The DateShipped element is mapped straight across, or "as is".&lt;br /&gt;&lt;br /&gt;The turquoise functoids are Greater Than (GT) functoids. The first input you can see on the screen for the upper GT functoid is the QuantityOrdered element, and the second input is "0". This functoid will return true if the value in QuantityOrdered is more than 0. The output of this functoid is mapped into 2 Value Mapping (VM) functoids. A value mapping functoid will return it's second input only if the value of the first input is 0. So the uppermost VM functoid will return its second input (the string "Ordered", which you can't see) if the value in QuantityOrdered is &amp;gt; 0, and that is mapped into GlobalQuantityTypeCode. The second VM functoid will return its second input (QuantityOrdered) if QuantityOrdered is &amp;gt; 0, and that value is mapped into ProductQuantity.&lt;br /&gt;&lt;br /&gt;And Here's a sample of the input XML:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;ns0:PurchaseOrderStatus xmlns:ns0="http://Test.POS"&amp;gt;&lt;br /&gt; &amp;lt;ShipperName&amp;gt;UPS&amp;lt;/ShipperName&amp;gt;&lt;br /&gt; &amp;lt;ServiceLevel&amp;gt;2nd Day&amp;lt;/ServiceLevel&amp;gt;&lt;br /&gt; &amp;lt;DateShipped&amp;gt;05/17/2005&amp;lt;/DateShipped&amp;gt;&lt;br /&gt; &amp;lt;LineItem&amp;gt;&lt;br /&gt;   &amp;lt;ItemNumber&amp;gt;X-12&amp;lt;/ItemNumber&amp;gt;&lt;br /&gt;   &amp;lt;QuantityOrdered&amp;gt;10&amp;lt;/QuantityOrdered&amp;gt;&lt;br /&gt;   &amp;lt;QuantityShipped&amp;gt;5&amp;lt;/QuantityShipped&amp;gt;&lt;br /&gt;   &amp;lt;QuantityBackordered&amp;gt;5&amp;lt;/QuantityBackordered&amp;gt;&lt;br /&gt;   &amp;lt;QuantityCancelled&amp;gt;0&amp;lt;/QuantityCancelled&amp;gt;&lt;br /&gt; &amp;lt;/LineItem&amp;gt;&lt;br /&gt; &amp;lt;LineItem&amp;gt;&lt;br /&gt;   &amp;lt;ItemNumber&amp;gt;A-24-P&amp;lt;/ItemNumber&amp;gt;&lt;br /&gt;   &amp;lt;QuantityOrdered&amp;gt;200&amp;lt;/QuantityOrdered&amp;gt;&lt;br /&gt;   &amp;lt;QuantityShipped&amp;gt;200&amp;lt;/QuantityShipped&amp;gt;&lt;br /&gt;   &amp;lt;QuantityBackordered&amp;gt;0&amp;lt;/QuantityBackordered&amp;gt;&lt;br /&gt;   &amp;lt;QuantityCancelled&amp;gt;0&amp;lt;/QuantityCancelled&amp;gt;&lt;br /&gt; &amp;lt;/LineItem&amp;gt;&lt;br /&gt; &amp;lt;LineItem&amp;gt;&lt;br /&gt;   &amp;lt;ItemNumber&amp;gt;T-707F&amp;lt;/ItemNumber&amp;gt;&lt;br /&gt;   &amp;lt;QuantityOrdered&amp;gt;12&amp;lt;/QuantityOrdered&amp;gt;&lt;br /&gt;   &amp;lt;QuantityShipped&amp;gt;0&amp;lt;/QuantityShipped&amp;gt;&lt;br /&gt;   &amp;lt;QuantityBackordered&amp;gt;6&amp;lt;/QuantityBackordered&amp;gt;&lt;br /&gt;   &amp;lt;QuantityCancelled&amp;gt;6&amp;lt;/QuantityCancelled&amp;gt;&lt;br /&gt; &amp;lt;/LineItem&amp;gt;&lt;br /&gt;&amp;lt;/ns0:PurchaseOrderStatus&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Notice in the Visual Studio output window above that there is an error. This occurred when I tried to test the map you see above. The warning immediately below the error reads in full: "The destination node "GlobalOrderQuantityTypeCode" has multiple inputs but none of its ancestors is connected to a looping functoid." &lt;br /&gt;&lt;br /&gt;This error can be easily remedied by adding a looping functoid, which can be found in the Toolbox under Advanced Functoids:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/6659/2205/1600/loopingMap2.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;" src="http://photos1.blogger.com/blogger/6659/2205/400/loopingMap2.jpg" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;In the image above, you can see that I have added a purple functoid (the Looping functoid) that connects the LineItem node in the source schema with the Product node in the destination schema. But there's still an error. What I've done in effect is to tell BizTalk, for every LineItem in node in a source document, create a Product node in the output document. But I'm going to have to also account for the fact that within 1 Product node in the output, there are possibly multiple OrderStatusQuantity nodes.&lt;br /&gt;&lt;br /&gt;Here's another attempt:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/6659/2205/1600/loopingMap3.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;" src="http://photos1.blogger.com/blogger/6659/2205/400/loopingMap3.jpg" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;I have put another Looping functoid on the map, and connected the QuantityOrdered and QuantityShipped node outputs to it. What does this do? Essentially, it says that whenever you have an input node, create another OrderStatusQuantity node. Well if I'm so clever, why am I still getting an error? Because other functoids that I've explained above say to only create the nodes under OrderStatusQuantity node if the source value is greater than 0. QuantityShipped in the 3rd LineItem in the sample XML is 0, so I'm essentially telling BizTalk to create an OrderStatusQuantity node, but don't create its children. Since the children are required in the schema, I get an error.&lt;br /&gt;&lt;br /&gt;Let's try one more time:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/6659/2205/1600/loopingMap4.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;" src="http://photos1.blogger.com/blogger/6659/2205/400/loopingMap4.jpg" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;Finally! If you look closely at the map, you can see that I've drawn lines from the GT functoids to the OrderStatusQuantity node. This shows a very useful property of logical functoids. If you map the output of  a logical functoid to a node, it will act to suppress the production of that node when the output of the logical functoid is false. So the OrderStatusQuantity node will be created if and only if the QuantityOrdered or the QuantityShipped field contains a value greater than 0.&lt;br /&gt;&lt;br /&gt;Here's the XML output. Note that in the last Product node, there is only one OrderStatusQuantity:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;ns0:PO_Status xmlns:ns0="http://Test.POStatusOut"&amp;gt;&lt;br /&gt;   &amp;lt;ShipDate&amp;gt;05/17/2005&amp;lt;/ShipDate&amp;gt;&lt;br /&gt;   &amp;lt;ShippedVia&amp;gt;UPS - 2nd Day&amp;lt;/ShippedVia&amp;gt;&lt;br /&gt;   &amp;lt;Product&amp;gt;&lt;br /&gt;      &amp;lt;ProductIdentifier&amp;gt;X-12&amp;lt;/ProductIdentifier&amp;gt;&lt;br /&gt;      &amp;lt;OrderStatusQuantity&amp;gt;&lt;br /&gt;         &amp;lt;GlobalOrderQuantityTypeCode&amp;gt;Ordered&amp;lt;/GlobalOrderQuantityTypeCode&amp;gt;&lt;br /&gt;         &amp;lt;ProductQuantity&amp;gt;10&amp;lt;/ProductQuantity&amp;gt;&lt;br /&gt;      &amp;lt;/OrderStatusQuantity&amp;gt;&lt;br /&gt;      &amp;lt;OrderStatusQuantity&amp;gt;&lt;br /&gt;         &amp;lt;GlobalOrderQuantityTypeCode&amp;gt;Shipped&amp;lt;/GlobalOrderQuantityTypeCode&amp;gt;&lt;br /&gt;         &amp;lt;ProductQuantity&amp;gt;5&amp;lt;/ProductQuantity&amp;gt;&lt;br /&gt;      &amp;lt;/OrderStatusQuantity&amp;gt;&lt;br /&gt;   &amp;lt;/Product&amp;gt;&lt;br /&gt;   &amp;lt;Product&amp;gt;&lt;br /&gt;      &amp;lt;ProductIdentifier&amp;gt;A-24-P&amp;lt;/ProductIdentifier&amp;gt;&lt;br /&gt;      &amp;lt;OrderStatusQuantity&amp;gt;&lt;br /&gt;         &amp;lt;GlobalOrderQuantityTypeCode&amp;gt;Ordered&amp;lt;/GlobalOrderQuantityTypeCode&amp;gt;&lt;br /&gt;         &amp;lt;ProductQuantity&amp;gt;200&amp;lt;/ProductQuantity&amp;gt;&lt;br /&gt;      &amp;lt;/OrderStatusQuantity&amp;gt;&lt;br /&gt;      &amp;lt;OrderStatusQuantity&amp;gt;&lt;br /&gt;         &amp;lt;GlobalOrderQuantityTypeCode&amp;gt;Shipped&amp;lt;/GlobalOrderQuantityTypeCode&amp;gt;&lt;br /&gt;         &amp;lt;ProductQuantity&amp;gt;200&amp;lt;/ProductQuantity&amp;gt;&lt;br /&gt;      &amp;lt;/OrderStatusQuantity&amp;gt;&lt;br /&gt;   &amp;lt;/Product&amp;gt;&lt;br /&gt;   &amp;lt;Product&amp;gt;&lt;br /&gt;      &amp;lt;ProductIdentifier&amp;gt;T-707F&amp;lt;/ProductIdentifier&amp;gt;&lt;br /&gt;      &amp;lt;OrderStatusQuantity&amp;gt;&lt;br /&gt;         &amp;lt;GlobalOrderQuantityTypeCode&amp;gt;Ordered&amp;lt;/GlobalOrderQuantityTypeCode&amp;gt;&lt;br /&gt;         &amp;lt;ProductQuantity&amp;gt;12&amp;lt;/ProductQuantity&amp;gt;&lt;br /&gt;      &amp;lt;/OrderStatusQuantity&amp;gt;&lt;br /&gt;   &amp;lt;/Product&amp;gt;&lt;br /&gt;&amp;lt;/nso:PO_Status&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/21774696-113970571975623018?l=stevestechnotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevestechnotes.blogspot.com/feeds/113970571975623018/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=21774696&amp;postID=113970571975623018' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/21774696/posts/default/113970571975623018'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/21774696/posts/default/113970571975623018'/><link rel='alternate' type='text/html' href='http://stevestechnotes.blogspot.com/2006/02/biztalk-mapper-looping-tricks.html' title='BizTalk Mapper - Looping Tricks'/><author><name>Steve Harclerode</name><uri>http://www.blogger.com/profile/01048793793830514398</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_NWdMoFXGm5U/Sp2oRQ30x-I/AAAAAAAAACE/vYCnIUTkZM8/S220/274450548.bin.jpg'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-21774696.post-113906833774756853</id><published>2006-02-04T07:38:00.000-08:00</published><updated>2006-02-04T07:52:17.760-08:00</updated><title type='text'>What's My Blog?</title><content type='html'>I've been reflecting on "what my blog is about". I used to reflect on my life in the same way, but never came to a definite conclusion. So I'm narrowing the focus of my question to just the blog.&lt;br /&gt;:-)&lt;br /&gt;&lt;br /&gt;My intention is to write about some technical items that should be easy, but weren't necessarily (at least to me). A lot of what I write might look like it's for beginners, but if it took more than a little research to find it, I think it's worth writing down.&lt;br /&gt;&lt;br /&gt;Hopefully you'll either agree, or read someone else's blog.&lt;br /&gt;;-)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/21774696-113906833774756853?l=stevestechnotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevestechnotes.blogspot.com/feeds/113906833774756853/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=21774696&amp;postID=113906833774756853' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/21774696/posts/default/113906833774756853'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/21774696/posts/default/113906833774756853'/><link rel='alternate' type='text/html' href='http://stevestechnotes.blogspot.com/2006/02/whats-my-blog.html' title='What&apos;s My Blog?'/><author><name>Steve Harclerode</name><uri>http://www.blogger.com/profile/01048793793830514398</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_NWdMoFXGm5U/Sp2oRQ30x-I/AAAAAAAAACE/vYCnIUTkZM8/S220/274450548.bin.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-21774696.post-113893561760736491</id><published>2006-02-02T18:50:00.000-08:00</published><updated>2006-02-03T00:20:16.490-08:00</updated><title type='text'>BizTalk 2006 SMTP Adapter</title><content type='html'>I found a couple of great articles on using the SMTP adapter on Richard Seroter's blog &lt;a href="http://blogs.msdn.com/richardbpi/archive/2005/08/15/451760.aspx"&gt;here&lt;/a&gt;, and Tomas Restrepo's blog &lt;a href="http://www.winterdom.com/weblog/archives/000532.html"&gt;here&lt;/a&gt;. What follows are a couple of things that I had to find elsewhere.&lt;br /&gt;For the following examples, I assume you've already created 2 multipart messages EmailIn and EmailOut, each with a body part and an attachment part called Remainder. EmailIn has been used to receive an email using the POP3 adapter (see my previous post), and EmailOut is for sending an email out via SMTP. I also assume that you've at least partly built the EmailOut message, see the 2 links above if you don't know how.&lt;br /&gt;&lt;br /&gt;To set the filename for the attachment:&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;EmailOut.Remainder(MIME.FileName) = "MySpecialTitle.XML";&lt;/span&gt;&lt;br /&gt;To set the subject of the outgoing email from the incoming email:&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;EmailOut(SMTP.Subject) = EmailIn(POP3.Subject);&lt;/span&gt;&lt;span style="font-family:courier new;"&gt; &lt;/span&gt;&lt;br /&gt;&lt;/span&gt;By the way, these need to be done in a constructor for EmailOut.&lt;br /&gt;&lt;br /&gt;To send your email to an address that is to be configured at run-time, assuming that you've managed to get the correct address into the variable &lt;span style="font-family:courier new;"&gt;emailAddress&lt;/span&gt;:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Creating a dyamic port&lt;/li&gt;&lt;li&gt;Create an expression shape&lt;/li&gt;&lt;li&gt;Enter code that looks like this in the expression shape:&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;DynamicPort(Microsoft.XLANGs.BaseTypes.Address) = "mailto:" + emailAddress;&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;It took me a while to figure out how this could work, my guess is that the "&lt;span style="font-family:courier new;"&gt;mailto:&lt;/span&gt;" prefix somehow indicates to BizTalk that it should use SMTP for that port, just as http tells your browser to use port 80.&lt;br /&gt;&lt;br /&gt;Hopefully you can extrapolate other things that you might need from the links and these examples.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/21774696-113893561760736491?l=stevestechnotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevestechnotes.blogspot.com/feeds/113893561760736491/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=21774696&amp;postID=113893561760736491' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/21774696/posts/default/113893561760736491'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/21774696/posts/default/113893561760736491'/><link rel='alternate' type='text/html' href='http://stevestechnotes.blogspot.com/2006/02/biztalk-2006-smtp-adapter.html' title='BizTalk 2006 SMTP Adapter'/><author><name>Steve Harclerode</name><uri>http://www.blogger.com/profile/01048793793830514398</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_NWdMoFXGm5U/Sp2oRQ30x-I/AAAAAAAAACE/vYCnIUTkZM8/S220/274450548.bin.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-21774696.post-113876306555963364</id><published>2006-01-31T18:31:00.000-08:00</published><updated>2006-02-09T18:02:30.186-08:00</updated><title type='text'>BizTalk 2006 POP3 Adapter</title><content type='html'>There are a few things that I've learned recently while using the latest BizTalk 2006 beta. I'll start by listing a few things that might help someone who is using the new POP3 Adapter. This information was gathered from other web pages, news groups, and my own experience.&lt;br /&gt;&lt;br /&gt;Using the POP3 adapter to receive a message where the XML attachment is all that you care about is about as easy as using any other adapter. I've seen information about this in other places, so I won't copy it here.&lt;br /&gt;&lt;br /&gt;To use the POP3 adapter to receive an email with attachments in an orchestration (where the number of attachments is fixed and known) and you intend to have access to &lt;span style="font-weight: bold;"&gt;all&lt;/span&gt; parts of the email:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Create a multipart type in the orchestration, one part for the email body and one for each attachment.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Make each part of the multipart type an XmlDocument, even if the body of the message is not XML. I've seen articles that make me think it might be important for the body part of the multipart type to be created first, although I haven't tested it any other way.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Since Visual Studio will sort the parts of the multipart type by name (although the actual order of the parts in the ODX file is unaffected), I recommend naming the parts something that will maintain the same order, for example "BodyPart" and "Remainder1", "Remainder2", etc.&lt;/li&gt;&lt;li&gt;In the orchestration, to use any of the incoming parts that are XML, you can simply assign that body part to your message (it took me a while to discover that [for my purposes, anyway] XmlDocument is assignment compatible with any message that is of an XML schema type).&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;When I first tried receiving a POP3 message in an orchestration, I received the following error message:&lt;br /&gt;&lt;span style="font-family:times new roman;"&gt;&lt;span style="color: rgb(102, 0, 204);"&gt;Multi-part message 'EmailIn' has body part '{AE9F5DD0-CE12-49C3-B9B3-577D3B134EBB}', expected body part '{3FB96D26-27B3-44A1-9606-CFBEA88A668D}.&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;When I created the receive port, I had left the body part index set to 0 in the receive location. My thinking was that since I wasn't going to select just a part of the message, I could leave it at the default. Well, my thinking was wrong -- the error went away when I changed the body part index to 1, and I was able to receive the email in the orchestration.&lt;br /&gt;&lt;br /&gt;2/9/2006 - There's more on the POP3 adapter from Richard Seroter &lt;a href="http://blogs.msdn.com/richardbpi/archive/2006/02/03/524484.aspx"&gt;here&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/21774696-113876306555963364?l=stevestechnotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevestechnotes.blogspot.com/feeds/113876306555963364/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=21774696&amp;postID=113876306555963364' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/21774696/posts/default/113876306555963364'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/21774696/posts/default/113876306555963364'/><link rel='alternate' type='text/html' href='http://stevestechnotes.blogspot.com/2006/01/biztalk-2006-pop3-adapter.html' title='BizTalk 2006 POP3 Adapter'/><author><name>Steve Harclerode</name><uri>http://www.blogger.com/profile/01048793793830514398</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_NWdMoFXGm5U/Sp2oRQ30x-I/AAAAAAAAACE/vYCnIUTkZM8/S220/274450548.bin.jpg'/></author><thr:total>0</thr:total></entry></feed>
