<?xml version="1.0" encoding="UTF-8" standalone="no"?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:blogger="http://schemas.google.com/blogger/2008" xmlns:gd="http://schemas.google.com/g/2005" xmlns:georss="http://www.georss.org/georss" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/" xmlns:thr="http://purl.org/syndication/thread/1.0" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-3729574054547172121</atom:id><lastBuildDate>Sat, 04 Apr 2026 22:42:43 +0000</lastBuildDate><category>Biztalk</category><category>Biztalk Adapter</category><category>Oracle</category><category>Orchestration</category><category>ASP.Net</category><category>C#</category><category>Deployment</category><category>Unicode</category><category>Unit Test</category><category>WebServices</category><category>Asynchronous</category><category>COM+</category><category>Database</category><category>Debug</category><category>Delegate</category><category>Developer Tools</category><category>Documentation</category><category>FTP</category><category>Non Technical</category><category>RSS</category><category>RSSReader</category><category>SQL</category><category>SQL CE</category><category>XML</category><category>ADO.Net</category><category>CLOB</category><category>Cache</category><category>CodePage</category><category>CodePlex</category><category>Configuration</category><category>Cookie</category><category>DebugView</category><category>Design Pattern</category><category>Dynamic Data</category><category>Excel</category><category>Export</category><category>Expresso</category><category>FckEditor</category><category>Generic</category><category>Google Gears</category><category>Google Notebook</category><category>Google Reader</category><category>GridView</category><category>IIS7</category><category>IISDiagnostic</category><category>Javascript</category><category>Korean</category><category>Language Packs</category><category>Limitation</category><category>Linq</category><category>MSBuild</category><category>Memory Leak</category><category>Migration</category><category>Mobile</category><category>ODBC</category><category>ODP.Net</category><category>ORM</category><category>Opinions</category><category>Podcast</category><category>Proxy</category><category>Refactoring</category><category>Reflector</category><category>Regex</category><category>Role Link</category><category>SOAPHeader</category><category>SQL Express</category><category>SSL</category><category>SSO</category><category>Serialization</category><category>Stored Procedure</category><category>SubSonic</category><category>ThreadPool</category><category>Threading</category><category>TipsNTricks</category><category>Twitter</category><category>VS Express</category><category>WCF</category><category>WMI</category><category>WinDbg</category><category>XMLType</category><category>XPATH</category><category>YAGNI</category><title>Technical Issues &amp; Solutions</title><description>Technical issues and their solutions based on the problems that I encountered in IT development.</description><link>http://bembengarifin-tech.blogspot.com/</link><managingEditor>noreply@blogger.com (Bembeng Arifin)</managingEditor><generator>Blogger</generator><openSearch:totalResults>47</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><language>en-us</language><itunes:explicit>no</itunes:explicit><itunes:subtitle>Technical issues and their solutions based on the problems that I encountered in IT development.</itunes:subtitle><itunes:owner><itunes:email>noreply@blogger.com</itunes:email></itunes:owner><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3729574054547172121.post-8672676851103548553</guid><pubDate>Thu, 02 Oct 2008 11:07:00 +0000</pubDate><atom:updated>2008-10-03T19:05:25.210+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Non Technical</category><title>Looking back, Looking ahead, and Moving on</title><description>Whoah, it's been almost 2 months since my last posts.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Reason&lt;/span&gt;&lt;br /&gt;I have joined a new company last month, so it's been quite busy with the new work items, however unfortunately, haven't really played much with programming lately, I was assigned to do some migrations, so more manual works have to be done on that ;)&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;Looking Back&lt;/span&gt;&lt;/div&gt;&lt;div&gt;Well, I would say that I started blogging more frequently since a year ago, and most of them were related to &lt;a href="http://bembengarifin-tech.blogspot.com/search/label/Biztalk"&gt;BizTalk&lt;/a&gt;. It's been fun indeed, thinking the cases / scenarios where we want them to be implemented using Biztalk. And the number of times I have to explain : "NO, it doesn't work that way, the receive location and the send port are not directly linked to each other, there is a message box in the middle of those two and bla bla bla" I'm gonna miss that though haha :P &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;Looking Ahead&lt;/span&gt;&lt;/div&gt;&lt;div&gt;The role that I have in the new company is still my favorite one : DEVELOPER, can't get enough of it really haha, glad that I'm going to learn new stuffs and understand the business side as well, i guess that's the upside of moving from one company to another, you'll face similar but different problems ;) however I don't think I will be blogging about BizTalk anymore for the time being, because the work will be more on .Net and SQL :)&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;Moving On&lt;/span&gt;&lt;/div&gt;&lt;div&gt;Just when blogger actually added inline comments as a feature, for a particular reason I need to move my blog activities to other site :| just to let you know that I will be blogging at &lt;a href="http://bembengarifin.wordpress.com/"&gt;http://bembengarifin.wordpress.com/,&lt;/a&gt;&lt;/div&gt;&lt;div&gt;The purpose stays the same, to post all the gotchas that i found in software development, so you don't spend hours/days like I did to solve the issue and can have more times to spend with your family and friends :)&lt;br /&gt;&lt;br /&gt;I would like to thank you for visiting this blog and I'll see you on the other &lt;a href="http://bembengarifin.wordpress.com/"&gt;site&lt;/a&gt; ;)&lt;br /&gt;&lt;/div&gt;</description><link>http://bembengarifin-tech.blogspot.com/2008/10/looking-back-looking-ahead-and-moving.html</link><author>noreply@blogger.com (Bembeng Arifin)</author><thr:total>10</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3729574054547172121.post-5393693876372098581</guid><pubDate>Fri, 08 Aug 2008 17:51:00 +0000</pubDate><atom:updated>2009-01-30T16:21:36.298+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">C#</category><category domain="http://www.blogger.com/atom/ns#">Database</category><category domain="http://www.blogger.com/atom/ns#">SQL</category><category domain="http://www.blogger.com/atom/ns#">SQL CE</category><title>Generate Script &amp; Export Data From SQL CE (Compact Edition) 3.5</title><description>Several months ago I &lt;a href="http://bembengarifin-tech.blogspot.com/2008/02/aspnet-dynamic-data-sql-compact-edition.html"&gt;migrated my family financial and expense information from excel file to SQL CE 3.5&lt;/a&gt;.&lt;br /&gt;SQL CE is indeed good enough for data entry purpose, but after a while, I felt that it is not good enough for reporting purpose.&lt;br /&gt;So I decided that it's better to use the &lt;a href="http://www.microsoft.com/sqlserver/2008/en/us/express.aspx"&gt;SQL Server Express&lt;/a&gt; instead.&lt;br /&gt;&lt;br /&gt;Now the first problem that I had : How to migrate the tables along with the data from SQL CE 3.5 to SQL Server Express?&lt;br /&gt;&lt;br /&gt;I have been &lt;a href="http://www.google.com.sg/search?q=export+sqlce+3.5&amp;amp;btnG=Search&amp;amp;hl=en&amp;amp;sa=2"&gt;googling&lt;/a&gt; around for a while, but haven't really found a good one for this, which make me realized that there are more ways to get the data from SQL Server to SQL CE but not the other way around duhh :|&lt;br /&gt;&lt;br /&gt;So later, I decided to code it myself ;)&lt;br /&gt;&lt;br /&gt;When browsing around the net, I found about &lt;a href="http://msdn.microsoft.com/en-us/library/ms186778.aspx"&gt;Information Schema View&lt;/a&gt; that is available in SQL Server, and fortunately it is also available in the SQL CE 3.5 ;) (before I found out about the view, I was using Linq Attributes to generate the table creation ouccch)&lt;br /&gt;So now by using the view, I generate the script for the SQL CE 3.5 database file (.sdf).&lt;br /&gt;&lt;br /&gt;In summary, the code will :&lt;br /&gt;1. Generate Table Creation Script&lt;br /&gt;2. Generate Insert Statement for the data in all of the tables&lt;br /&gt;3. Generate script to assign the Primary Keys for the tables&lt;br /&gt;4. Generate script to assign the foreign keys / references for the tables&lt;div&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;** Update 5. Generate script to assign Indexes for the tables&lt;/span&gt;&lt;br /&gt;&lt;div&gt;6. Save the script into the output file &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;br /&gt;So here's a little peek of how to use the tool, I'm using Northwind.sdf file in the example below :&lt;br /&gt;There are 2 parameters to pass in ;&lt;br /&gt;1. Connection String to the sdf file&lt;br /&gt;2. Output File Name for the script&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="text-align: center; clear: both;"&gt;&lt;/div&gt;&lt;div class="separator" style="text-align: center; clear: both;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkpKWOggZdvx1e3zeP8YRHxS1j_1MJ_jao2vmI7o-hkNcSuSiJ5A96ygU8x69VKumBrQ1yjBUTW53VKjWlonS9jckKIQdwH-NWVCqXrsoeNRt_u32JgE7GBxaxZYa8oSSGdwQlnB-zLszA/s1600-h/Generate.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkpKWOggZdvx1e3zeP8YRHxS1j_1MJ_jao2vmI7o-hkNcSuSiJ5A96ygU8x69VKumBrQ1yjBUTW53VKjWlonS9jckKIQdwH-NWVCqXrsoeNRt_u32JgE7GBxaxZYa8oSSGdwQlnB-zLszA/s400/Generate.JPG" alt="" id="BLOGGER_PHOTO_ID_5250351691925780610" border="0" /&gt;&lt;/a&gt;&lt;/div&gt;Note : If you get any access denied when trying to open the Northwind.sdf file, &lt;a href="http://forums.microsoft.com/msdn/ShowPost.aspx?PostID=2787313&amp;amp;SiteID=1"&gt;here&lt;/a&gt; is why and the solution.&lt;br /&gt;&lt;br /&gt;After the Northwind.sql file has been generated :&lt;br /&gt;1. Create the SQL Server database file (.mdf)&lt;br /&gt;2. Open the Northwind.sql script into your &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=C243A5AE-4BD1-4E3D-94B8-5A0F62BF7796"&gt;SQL Server Management Studio&lt;/a&gt; or Visual Studio (Since I'm currently using &lt;a href="http://www.microsoft.com/express/sp1/default.aspx#sql"&gt;SQL Epxress 2008 CTP&lt;/a&gt;, there is no management studio yet for now) and just execute them, if everything's ok (finger crossed), you will see this kind of message below and you're done :)&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="text-align: center; clear: both;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9fw2cnyP1fPnzT2Fy7JHh3a2ycj23XlBBZ5oCqsimOLHOmGcvp1s3qX_lBahlsnS7cSpUaefWKqs9PgvMUdtGH9NTBT0uDWnJpAR9GmHQJ0YMs37YbWtgbUjQsYTd3L4cdPzJpQtxm_Ol/s1600-h/Northwind.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9fw2cnyP1fPnzT2Fy7JHh3a2ycj23XlBBZ5oCqsimOLHOmGcvp1s3qX_lBahlsnS7cSpUaefWKqs9PgvMUdtGH9NTBT0uDWnJpAR9GmHQJ0YMs37YbWtgbUjQsYTd3L4cdPzJpQtxm_Ol/s400/Northwind.JPG" alt="" id="BLOGGER_PHOTO_ID_5250351930810165282" border="0" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Please note :&lt;br /&gt;1. The tool will not generate the database for you, it will only generate the scripts to execute&lt;br /&gt;2. Currently I purposely convert nchar and nvarchar data type to varchar in the table creation script. I don't see any purpose of using them unless if storing unicode characters in the table.&lt;br /&gt;3. I haven't handled Image / BLOB data type for generating data (Insert Statement).&lt;br /&gt;&lt;br /&gt;Ok now, stop talking and just give me the download link :P&lt;br /&gt;&lt;br /&gt;Here is the executable file :&lt;br /&gt;&lt;span style="font-style: italic;"&gt;**Removed: Please get the files from &lt;/span&gt;&lt;a style="font-style: italic;" href="http://www.codeplex.com/ExportSqlCE"&gt;CodePlex&lt;/a&gt;&lt;span style="font-style: italic;"&gt; site&lt;/span&gt;&lt;span style="font-style: italic;"&gt; instead&lt;/span&gt;&lt;span style="font-style: italic;"&gt;.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;And here is the code, if you want to see what's running inside :&lt;br /&gt;&lt;span style="font-style: italic;"&gt;**Removed: Please get the files from &lt;/span&gt;&lt;a style="font-style: italic;" href="http://www.codeplex.com/ExportSqlCE"&gt;CodePlex&lt;/a&gt;&lt;span style="font-style: italic;"&gt; site instead.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;**Updates: &lt;/span&gt;&lt;/span&gt;&lt;a href="http://erikej.blogspot.com/"&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;Erik EJ&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt; has provided the newer version of this at &lt;/span&gt;&lt;/span&gt;&lt;a href="http://www.codeplex.com/ExportSqlCE"&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;CodePlex&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt; website, I really recommend that you get the files from there. Huge thanks to &lt;/span&gt;&lt;/span&gt;&lt;a href="http://erikej.blogspot.com/"&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;Erik&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt; to make this utility tool better and to make it possible for others to contribute&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt; &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;Hope it helps ;)&lt;br /&gt;and do leave a comment if you have any feedback or find any bugs, Thanks ;)&lt;/div&gt;&lt;/div&gt;</description><link>http://bembengarifin-tech.blogspot.com/2008/08/generate-script-export-data-from-sql-ce.html</link><author>noreply@blogger.com (Bembeng Arifin)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkpKWOggZdvx1e3zeP8YRHxS1j_1MJ_jao2vmI7o-hkNcSuSiJ5A96ygU8x69VKumBrQ1yjBUTW53VKjWlonS9jckKIQdwH-NWVCqXrsoeNRt_u32JgE7GBxaxZYa8oSSGdwQlnB-zLszA/s72-c/Generate.JPG" width="72"/><thr:total>33</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3729574054547172121.post-2159929739549930742</guid><pubDate>Wed, 30 Jul 2008 15:46:00 +0000</pubDate><atom:updated>2008-07-31T00:07:45.857+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">C#</category><category domain="http://www.blogger.com/atom/ns#">Design Pattern</category><category domain="http://www.blogger.com/atom/ns#">Refactoring</category><category domain="http://www.blogger.com/atom/ns#">Unit Test</category><title>Great series of Separation of Concern by Jimmy Bogard</title><description>I just finished reading &lt;a href="http://www.lostechies.com/blogs/jimmy_bogard/archive/2008/07/17/separation-of-concerns-by-example-part-5.aspx"&gt;Jimmy Bogard's 5 series of Separation of Concern by example&lt;/a&gt; and they are just too awesome to be missed out.&lt;br /&gt;&lt;br /&gt;The series :&lt;br /&gt;# Separation of Concerns - how not to do it&lt;br /&gt;# Separation of Concerns by example: Part 1 - Refactoring away from static class&lt;br /&gt;# Separation of Concerns by example: Part 2 - Specialized interface for Cache&lt;br /&gt;# Separation of Concerns by example: Part 3 - Creating the repository&lt;br /&gt;# Separation of Concerns by example: Part 4 - Fixing a bug with unit test&lt;br /&gt;# Separation of Concerns by example: Part 5 - Dependency Injection with StructureMap&lt;br /&gt;&lt;br /&gt;The best thing that I like about them is that they are based on a real world example :D&lt;br /&gt;Enuf said, go and see for your self ;)</description><link>http://bembengarifin-tech.blogspot.com/2008/07/great-series-of-separation-of-concern.html</link><author>noreply@blogger.com (Bembeng Arifin)</author><thr:total>1</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3729574054547172121.post-1493916473171330878</guid><pubDate>Mon, 28 Jul 2008 02:21:00 +0000</pubDate><atom:updated>2008-07-28T10:21:15.699+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">C#</category><category domain="http://www.blogger.com/atom/ns#">Generic</category><title>C# 2.0 Generic Collection Sort By Value</title><description>&lt;p&gt;&lt;/p&gt;  &lt;p&gt;I’m working on a web application prototype and I’m using some dummy data in xml form because it is simple and I don’t want to care about the database for a prototype ;)&lt;/p&gt;  &lt;p&gt;Let say this is my sample data :&lt;/p&gt;  &lt;table cellspacing="0" cellpadding="2" width="400" border="1"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="400"&gt;         &lt;p&gt;&lt;font face="Courier New"&gt;&amp;lt;root&amp;gt;              &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;member id=&amp;quot;1&amp;quot; name=&amp;quot;Jeff&amp;quot; /&amp;gt;               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;member id=&amp;quot;2&amp;quot; name=&amp;quot;Fred&amp;quot; /&amp;gt;               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;member id=&amp;quot;3&amp;quot; name=&amp;quot;Greg&amp;quot; /&amp;gt;               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;member id=&amp;quot;4&amp;quot; name=&amp;quot;Andy&amp;quot; /&amp;gt;               &lt;br /&gt;&amp;lt;/root&amp;gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;I have some drop down lists or combo boxes to fill in with this kind of data in the form, and I want them to be sorted based on the description (name) not based on the key (id).&lt;/p&gt;  &lt;p&gt;Since the data come from xml file, it may not be sorted that way, so I need to find a way to sort the data first and then bind the values to the drop down lists.&lt;/p&gt;  &lt;p&gt;Firstly I thought it will be very simple, only need to create a class which implements IComparer for this and use it in the available generic collection types. However, it only true at the new IComparer class, but not on the generic collection part, I found out that SortedDictionary&amp;lt;TKey, TValue&amp;gt; and SortedList&amp;lt;TKey, TValue&amp;gt; will use the key to sort, even though we can specify the IComparer in the constructor.&lt;/p&gt;  &lt;p&gt;So based on the &lt;a href="http://forums.msdn.microsoft.com/en-US/netfxbcl/thread/94ae3545-dfbc-40a8-b083-4f426047d8fd" target="_blank"&gt;forum discussion&lt;/a&gt;, I found that we can use a generic List&amp;lt;T&amp;gt; to perform sorting and we can use KeyValuePair&amp;lt;TKey, TValue&amp;gt;as the type of T.&lt;/p&gt;  &lt;p&gt;Here is the SortByValueComparer class which implements IComparer :&lt;/p&gt;  &lt;table cellspacing="0" cellpadding="2" width="652" border="1"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="650"&gt;         &lt;p&gt;&lt;font face="Courier New"&gt;public class SortByValueComparer&amp;lt;TKey, TValue&amp;gt; : IComparer&amp;lt;KeyValuePair&amp;lt;TKey, TValue&amp;gt;&amp;gt;              &lt;br /&gt;{               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; #region IComparer&amp;lt;KeyValuePair&amp;lt;TKey, TValue&amp;gt;&amp;gt; Members &lt;/font&gt;&lt;/p&gt;          &lt;p&gt;&lt;font face="Courier New"&gt;&amp;#160;&amp;#160;&amp;#160; public int Compare(KeyValuePair&amp;lt;TKey, TValue&amp;gt; x, KeyValuePair&amp;lt;TKey, TValue&amp;gt; y)              &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; {               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; return Comparer&amp;lt;TValue&amp;gt;.Default.Compare(x.Value, y.Value);               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; } &lt;/font&gt;&lt;/p&gt;          &lt;p&gt;&lt;font face="Courier New"&gt;&amp;#160;&amp;#160;&amp;#160; #endregion              &lt;br /&gt;}&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;Then we can use List&amp;lt;T&amp;gt; such as :&lt;/p&gt;  &lt;table cellspacing="0" cellpadding="2" width="647" border="1"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="645"&gt;         &lt;p&gt;&lt;font face="Courier New"&gt;[Fact]              &lt;br /&gt;public void Test_ListSort()               &lt;br /&gt;{               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; List&amp;lt;KeyValuePair&amp;lt;string, string&amp;gt;&amp;gt; l = new List&amp;lt;KeyValuePair&amp;lt;string, string&amp;gt;&amp;gt;();               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; l.Add(new KeyValuePair&amp;lt;string, string&amp;gt;(&amp;quot;1&amp;quot;, &amp;quot;Jeff&amp;quot;));               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; l.Add(new KeyValuePair&amp;lt;string, string&amp;gt;(&amp;quot;2&amp;quot;, &amp;quot;Fred&amp;quot;));               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; l.Add(new KeyValuePair&amp;lt;string, string&amp;gt;(&amp;quot;3&amp;quot;, &amp;quot;Greg&amp;quot;));               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; l.Add(new KeyValuePair&amp;lt;string, string&amp;gt;(&amp;quot;4&amp;quot;, &amp;quot;Andy&amp;quot;)); &lt;/font&gt;&lt;/p&gt;          &lt;p&gt;&lt;font face="Courier New"&gt;&amp;#160;&amp;#160;&amp;#160; Assert.Equal(l[0].Value, &amp;quot;Jeff&amp;quot;);              &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; Assert.Equal(l[1].Value, &amp;quot;Fred&amp;quot;);               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; Assert.Equal(l[2].Value, &amp;quot;Greg&amp;quot;);               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; Assert.Equal(l[3].Value, &amp;quot;Andy&amp;quot;); &lt;/font&gt;&lt;/p&gt;          &lt;p&gt;&lt;font face="Courier New"&gt;&amp;#160;&amp;#160;&amp;#160; // Sort the collection based on the value              &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; l.Sort(new SortByValueComparer&amp;lt;string, string&amp;gt;()); &lt;/font&gt;&lt;/p&gt;          &lt;p&gt;&lt;font face="Courier New"&gt;&amp;#160;&amp;#160;&amp;#160; Assert.Equal(l[0].Value, &amp;quot;Andy&amp;quot;);              &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; Assert.Equal(l[1].Value, &amp;quot;Fred&amp;quot;);               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; Assert.Equal(l[2].Value, &amp;quot;Greg&amp;quot;);               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; Assert.Equal(l[3].Value, &amp;quot;Jeff&amp;quot;);               &lt;br /&gt;}&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;However, I felt that the code is a bit cluttered, so I add a new Custom List class which implements List&amp;lt;T&amp;gt; :&lt;/p&gt;  &lt;table cellspacing="0" cellpadding="2" width="651" border="1"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="649"&gt;         &lt;p&gt;&lt;font face="Courier New"&gt;public class CustomList&amp;lt;TKey, TValue&amp;gt; : List&amp;lt;KeyValuePair&amp;lt;TKey, TValue&amp;gt;&amp;gt;              &lt;br /&gt;{               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; public CustomList() : base() { }               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; public CustomList(int capacity) : base(capacity) { } &lt;/font&gt;&lt;/p&gt;          &lt;p&gt;&lt;font face="Courier New"&gt;&amp;#160;&amp;#160;&amp;#160; public void AddEntry(TKey key, TValue value)              &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; {               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; this.Add(new KeyValuePair&amp;lt;TKey, TValue&amp;gt;(key, value));               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; } &lt;/font&gt;&lt;/p&gt;          &lt;p&gt;&lt;font face="Courier New"&gt;&amp;#160;&amp;#160;&amp;#160; public void SortByValue()              &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; {               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; this.Sort(new SortByValueComparer&amp;lt;TKey, TValue&amp;gt;());               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; }               &lt;br /&gt;}&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;So I can use it like this :&lt;/p&gt;  &lt;table cellspacing="0" cellpadding="2" width="651" border="1"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="649"&gt;         &lt;p&gt;&lt;font face="Courier New"&gt;[Fact]              &lt;br /&gt;public void Test_CustomList()               &lt;br /&gt;{               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; CustomList&amp;lt;string, string&amp;gt; l = new CustomList&amp;lt;string, string&amp;gt;();               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; l.AddEntry(&amp;quot;1&amp;quot;, &amp;quot;Jeff&amp;quot;);               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; l.AddEntry(&amp;quot;2&amp;quot;, &amp;quot;Fred&amp;quot;);               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; l.AddEntry(&amp;quot;3&amp;quot;, &amp;quot;Greg&amp;quot;);               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; l.AddEntry(&amp;quot;4&amp;quot;, &amp;quot;Andy&amp;quot;); &lt;/font&gt;&lt;/p&gt;          &lt;p&gt;&lt;font face="Courier New"&gt;&amp;#160;&amp;#160;&amp;#160; Assert.Equal(l[0].Value, &amp;quot;Jeff&amp;quot;);              &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; Assert.Equal(l[1].Value, &amp;quot;Fred&amp;quot;);               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; Assert.Equal(l[2].Value, &amp;quot;Greg&amp;quot;);               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; Assert.Equal(l[3].Value, &amp;quot;Andy&amp;quot;); &lt;/font&gt;&lt;/p&gt;          &lt;p&gt;&lt;font face="Courier New"&gt;&amp;#160;&amp;#160;&amp;#160; // Sort the collection based on the value              &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; l.SortByValue(); &lt;/font&gt;&lt;/p&gt;          &lt;p&gt;&lt;font face="Courier New"&gt;&amp;#160;&amp;#160;&amp;#160; Assert.Equal(l[0].Value, &amp;quot;Andy&amp;quot;);              &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; Assert.Equal(l[1].Value, &amp;quot;Fred&amp;quot;);               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; Assert.Equal(l[2].Value, &amp;quot;Greg&amp;quot;);               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; Assert.Equal(l[3].Value, &amp;quot;Jeff&amp;quot;);               &lt;br /&gt;}&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;Hope this helps ;)&lt;/p&gt;  </description><link>http://bembengarifin-tech.blogspot.com/2008/07/c-20-generic-collection-sort-by-value.html</link><author>noreply@blogger.com (Bembeng Arifin)</author><thr:total>2</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3729574054547172121.post-7534400371376410783</guid><pubDate>Thu, 26 Jun 2008 04:10:00 +0000</pubDate><atom:updated>2008-06-26T12:16:32.796+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Asynchronous</category><category domain="http://www.blogger.com/atom/ns#">C#</category><category domain="http://www.blogger.com/atom/ns#">Delegate</category><category domain="http://www.blogger.com/atom/ns#">Threading</category><category domain="http://www.blogger.com/atom/ns#">ThreadPool</category><category domain="http://www.blogger.com/atom/ns#">Unit Test</category><title>Testing Concurrency using ThreadPool (Multithread)</title><description>&lt;p&gt;&lt;/p&gt;  &lt;p&gt;There are times when we need to test our code in concurrent manner where there are some numbers of instances running simultaneously.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh5.ggpht.com/bembengarifin/SGMWmIHRPVI/AAAAAAAAAkM/T1cwgYU4p98/s1600-h/Concurrency%5B20%5D.gif"&gt;&lt;img title="Concurrency" style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="199" alt="Concurrency" src="http://lh5.ggpht.com/bembengarifin/SGMWnCEpICI/AAAAAAAAAkQ/La4CbPKVkFk/Concurrency_thumb%5B22%5D.gif?imgmax=800" width="633" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;This is different with the invocation such as below code where the method will be executed in sequential manner, this kind of test may be useful to test how long it may take to execute the method.&lt;/p&gt;  &lt;table cellspacing="0" cellpadding="2" width="629" border="1"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="627"&gt;         &lt;p&gt;&lt;font face="Courier New"&gt;for (int iTest = 0; iTest &amp;lt; 100; iTest++)              &lt;br /&gt;{               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; TestingMethodA();               &lt;br /&gt;}&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;For this testing concurrency, I’m using &lt;a href="http://www.albahari.com/threading/index.html" target="_blank"&gt;Joseph Albahari’s Threading in C#&lt;/a&gt; articles in &lt;a href="http://www.albahari.com/threading/part3.html#_Thread_Pooling" target="_blank"&gt;ThreadPooling section&lt;/a&gt; as references to the MultiThreadRunner class that I created.&lt;/p&gt;  &lt;p&gt;Code below in plain English : Submit 5 invocations of TestingMethodA with 10 maximum concurrent threads.&lt;/p&gt;  &lt;table cellspacing="0" cellpadding="2" width="629" border="1"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="627"&gt;         &lt;p&gt;&lt;font face="Courier New"&gt;MultiThreadRunner runner = new MultiThreadRunner();&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;br /&gt;runner.Run(new MultiThreadRunner.ParameterlessMethodDelegate(TestingMethodA), 5, 10);&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;The MultiThreadRunner class : &lt;/p&gt;  &lt;table cellspacing="0" cellpadding="2" width="629" border="1"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="627"&gt;         &lt;p&gt;&lt;font face="Courier New" size="1"&gt;class MultiThreadRunner              &lt;br /&gt;{               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; static object workerLocker = new object();               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; static int runningWorkers = 0; &lt;/font&gt;&lt;/p&gt;          &lt;p&gt;&lt;font face="Courier New" size="1"&gt;&amp;#160;&amp;#160;&amp;#160; /// &amp;lt;summary&amp;gt;              &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; /// The delegate is to be used as a placeholder for a parameterless method to invoke               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; /// &amp;lt;/summary&amp;gt;               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; public delegate void ParameterlessMethodDelegate();               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; /// &amp;lt;summary&amp;gt;               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; /// An overload to Run method, set the concurrentNoOfInstances to a default no               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; /// &amp;lt;/summary&amp;gt;               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; /// &amp;lt;param name=&amp;quot;myMethod&amp;quot;&amp;gt;The method to be invoke, passed as a delegate&amp;lt;/param&amp;gt;               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; /// &amp;lt;param name=&amp;quot;noOfInvocations&amp;quot;&amp;gt;Total no of invocations to execute&amp;lt;/param&amp;gt;               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; public void Run(Delegate myMethod, int noOfInvocations)               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; {               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; this.Run(myMethod, noOfInvocations, 0);               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; }               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; /// &amp;lt;summary&amp;gt;               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; /// The method will submit the method into the ThreadPool               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; /// &amp;lt;/summary&amp;gt;               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; /// &amp;lt;param name=&amp;quot;myMethod&amp;quot;&amp;gt;The method to be invoke, passed as a delegate&amp;lt;/param&amp;gt;               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; /// &amp;lt;param name=&amp;quot;noOfInvocations&amp;quot;&amp;gt;Total no of invocations to execute&amp;lt;/param&amp;gt;               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; /// &amp;lt;param name=&amp;quot;concurrentNoOfInstances&amp;quot;&amp;gt;Concurrent no of instances -&amp;gt; ThreadPool.MinThreads&amp;lt;/param&amp;gt;               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; public void Run(Delegate myMethod, int noOfInvocations, int concurrentNoOfInstances)               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; {               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; int iRow = runningWorkers = noOfInvocations;               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; int iStartWorker, iEndWorker, iCompletion; &lt;/font&gt;&lt;/p&gt;          &lt;p&gt;&lt;font face="Courier New" size="1"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; // Adjust the min threads              &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; SetMinThreads(concurrentNoOfInstances);               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; ThreadPool.GetAvailableThreads(out iStartWorker, out iCompletion);               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Debug.WriteLine(string.Format(&amp;quot;Available Threads, Start : {0}&amp;quot;, iStartWorker)); &lt;/font&gt;&lt;/p&gt;          &lt;p&gt;&lt;font face="Courier New" size="1"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; for (int i = 1; i &amp;lt;= iRow; i++)              &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; ThreadPool.QueueUserWorkItem(new System.Threading.WaitCallback(InvokeMethod), myMethod);               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Debug.WriteLine(&amp;quot;Submitted a queue : &amp;quot; + i.ToString());               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; } &lt;/font&gt;&lt;/p&gt;          &lt;p&gt;&lt;font face="Courier New" size="1"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; lock (workerLocker)              &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; while (runningWorkers &amp;gt; 0) Monitor.Wait(workerLocker);               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; } &lt;/font&gt;&lt;/p&gt;          &lt;p&gt;&lt;font face="Courier New" size="1"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; ThreadPool.GetAvailableThreads(out iEndWorker, out iCompletion);              &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Debug.WriteLine(string.Format(&amp;quot;All threads have been completed, Start : {0} - End : {1} - Completion : {2}&amp;quot;, iStartWorker, iEndWorker, iCompletion));               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; } &lt;/font&gt;&lt;/p&gt;          &lt;p&gt;&lt;font face="Courier New" size="1"&gt;&amp;#160;&amp;#160;&amp;#160; /// &amp;lt;summary&amp;gt;              &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; /// Set the ThreadPool Mininum Threads, this is to avoid a delay bottleneck, please refer to &lt;/font&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/system.threading.threadpool.aspx"&gt;&lt;font face="Courier New" size="1"&gt;http://msdn.microsoft.com/en-us/library/system.threading.threadpool.aspx&lt;/font&gt;&lt;/a&gt;             &lt;br /&gt;&lt;font face="Courier New" size="1"&gt;&amp;#160;&amp;#160;&amp;#160; /// &amp;lt;/summary&amp;gt;              &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; /// &amp;lt;param name=&amp;quot;concurrentNoOfInstances&amp;quot;&amp;gt;&amp;lt;/param&amp;gt;               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; private void SetMinThreads(int concurrentNoOfInstances)               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; {               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; int iMaxWorker, iMinWorker, iCompletion; &lt;/font&gt;&lt;/p&gt;          &lt;p&gt;&lt;font face="Courier New" size="1"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; ThreadPool.GetMaxThreads(out iMaxWorker, out iCompletion);              &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; ThreadPool.GetMinThreads(out iMinWorker, out iCompletion); &lt;/font&gt;&lt;/p&gt;          &lt;p&gt;&lt;font face="Courier New" size="1"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; if (concurrentNoOfInstances != 0)              &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; if (concurrentNoOfInstances &amp;gt; iMaxWorker)               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; ThreadPool.SetMinThreads(iMaxWorker, iCompletion);               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Debug.WriteLine(&amp;quot;The requested concurrent no of instances is higher than max threads, set the min threads as max threads : &amp;quot; + iMaxWorker);               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; else               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; ThreadPool.SetMinThreads(concurrentNoOfInstances, iCompletion);               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Debug.WriteLine(&amp;quot;Set the min threads to &amp;quot; + concurrentNoOfInstances);               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; else               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Debug.WriteLine(&amp;quot;Using the default min threads : &amp;quot; + iMinWorker);               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; }               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; /// &amp;lt;summary&amp;gt;               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; /// To invoke the method               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; /// &amp;lt;/summary&amp;gt;               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; /// &amp;lt;param name=&amp;quot;myMethod&amp;quot;&amp;gt;&amp;lt;/param&amp;gt;               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; private void InvokeMethod(object myMethod)               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; {               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Debug.WriteLine(&amp;quot;Invoke the method in thread : &amp;quot; + Thread.CurrentThread.ManagedThreadId);               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; ((Delegate)myMethod).DynamicInvoke(null);               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; lock (workerLocker)               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; runningWorkers--; Monitor.Pulse(workerLocker);               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; }               &lt;br /&gt;}&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;or get the complete project from here : &lt;/p&gt; &lt;iframe style="border-right: #dde5e9 1px solid; padding-right: 0px; border-top: #dde5e9 1px solid; padding-left: 0px; padding-bottom: 0px; margin: 3px; border-left: #dde5e9 1px solid; width: 240px; padding-top: 0px; border-bottom: #dde5e9 1px solid; height: 66px; background-color: #ffffff" marginwidth="0" marginheight="0" src="http://cid-41c0c9ecd9d35c8f.skydrive.live.com/embedrowdetail.aspx/Public/ConcurrencyWorker.zip" frameborder="0" scrolling="no"&gt;&lt;/iframe&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Hope this helps with your test as well :D&lt;/p&gt;  </description><link>http://bembengarifin-tech.blogspot.com/2008/06/testing-concurrency-using-threadpool.html</link><author>noreply@blogger.com (Bembeng Arifin)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="http://lh5.ggpht.com/bembengarifin/SGMWnCEpICI/AAAAAAAAAkQ/La4CbPKVkFk/s72-c/Concurrency_thumb%5B22%5D.gif?imgmax=800" width="72"/><thr:total>2</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3729574054547172121.post-819817056753631871</guid><pubDate>Wed, 25 Jun 2008 10:04:00 +0000</pubDate><atom:updated>2008-06-25T18:04:32.637+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">C#</category><category domain="http://www.blogger.com/atom/ns#">Delegate</category><title>Passing method using delegate</title><description>&lt;p&gt;I was doing some code refactoring today and this is one of the things that fits nicely to remove those repetitive codes.&lt;/p&gt;  &lt;p&gt;I have lines of code below as an example where I process some data based on certain key. &lt;/p&gt;  &lt;table cellspacing="0" cellpadding="2" width="562" border="1"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="560"&gt;         &lt;p&gt;&lt;font face="Courier New"&gt;private void ProcessData()             &lt;br /&gt;{              &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; string theKey;              &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; Key key = new Key(&amp;quot;A&amp;quot;, &amp;quot;B&amp;quot;);&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/p&gt;          &lt;p&gt;&lt;font face="Courier New"&gt;&amp;#160;&amp;#160;&amp;#160; theKey = key.KeyA;             &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; Console.WriteLine(&amp;quot;Processing data with key : {0}&amp;quot;, theKey); &lt;/font&gt;&lt;/p&gt;          &lt;p&gt;&lt;font face="Courier New"&gt;&amp;#160;&amp;#160;&amp;#160; theKey = key.KeyB;             &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; Console.WriteLine(&amp;quot;Processing data with key : {0}&amp;quot;, theKey); &lt;/font&gt;&lt;/p&gt;          &lt;p&gt;&lt;font face="Courier New"&gt;&amp;#160;&amp;#160;&amp;#160; theKey = key.KeyA + key.KeyB;             &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; Console.WriteLine(&amp;quot;Processing data with key : {0}&amp;quot;, theKey);              &lt;br /&gt;}&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;This looks simple enough, but imagine what would happen if i replace “the processing data with key…” line with 20 real codes, they suddenly become 60 lines which are repetitive, doing the same thing using the key ;)&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;So this is what I came out with, create a delegate which receives Key object then create 3 new methods which have the same signature as the delegate and will have the logic to construct the key.&lt;/p&gt;  &lt;table cellspacing="0" cellpadding="2" width="564" border="1"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="562"&gt;         &lt;p&gt;&lt;font face="Courier New"&gt;private delegate string AssignKeyDelegate(Key key);             &lt;br /&gt;private string AssignKeyA(Key key)              &lt;br /&gt;{              &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; return key.KeyA;              &lt;br /&gt;}              &lt;br /&gt;private string AssignKeyB(Key key)              &lt;br /&gt;{              &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; return key.KeyB;              &lt;br /&gt;}              &lt;br /&gt;private string AssignKeyAB(Key key)              &lt;br /&gt;{              &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; return key.KeyA + key.KeyB;              &lt;br /&gt;}&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;By using this, I can process the data and construct the key based on the appropriate method which is specified in the parameter using the delegate.&lt;/p&gt;  &lt;table cellspacing="0" cellpadding="2" width="564" border="1"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="562"&gt;         &lt;p&gt;&lt;font face="Courier New"&gt;private void Run()             &lt;br /&gt;{              &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; ProcessData(new AssignKeyDelegate(AssignKeyA));              &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; ProcessData(new AssignKeyDelegate(AssignKeyB));              &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; ProcessData(new AssignKeyDelegate(AssignKeyAB));              &lt;br /&gt;}              &lt;br /&gt;private void ProcessData(AssignKeyDelegate del)              &lt;br /&gt;{              &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; Key key = new Key(&amp;quot;A&amp;quot;, &amp;quot;B&amp;quot;);&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; string theKey = del(key);              &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; Console.WriteLine(&amp;quot;Processing data with key : {0}&amp;quot;, theKey);              &lt;br /&gt;}&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;I provided the sample code above as a basic example only, there are many solutions that may come out with this kind of code :) The purpose is only to describe another feature that we can do with delegate.&lt;/p&gt;  &lt;p&gt;Hope this helps :)&lt;/p&gt;  </description><link>http://bembengarifin-tech.blogspot.com/2008/06/passing-method-using-delegate.html</link><author>noreply@blogger.com (Bembeng Arifin)</author><thr:total>1</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3729574054547172121.post-2912525645804911024</guid><pubDate>Wed, 25 Jun 2008 08:52:00 +0000</pubDate><atom:updated>2008-06-25T16:52:25.213+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Asynchronous</category><category domain="http://www.blogger.com/atom/ns#">COM+</category><title>Asynchronous Delegate in Serviced Component COM+</title><description>&lt;p&gt;I’m currently assigned to optimize a COM+ performance which is storing some data in the cache. The loading time will take around 2-3 minutes.&lt;/p&gt;  &lt;p&gt;Since it is loading data from different tables and they are not related one with another, I’m thinking of using &lt;a href="http://www.albahari.com/threading/part3.html#_Asynch_Delegates" target="_blank"&gt;Asynchronous Delegate&lt;/a&gt; for the loading process so they can be loaded in separate threads.&lt;/p&gt;  &lt;p&gt;This is what we should get if we use delegates&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh4.ggpht.com/bembengarifin/SGIHPSToFvI/AAAAAAAAAj0/-ATAoz0VIV8/s1600-h/Async%20Normal%5B10%5D.gif"&gt;&lt;img title="Async Normal" style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="108" alt="Async Normal" src="http://lh4.ggpht.com/bembengarifin/SGIHQlw3MZI/AAAAAAAAAj4/Ru9g3SZRrSo/Async%20Normal_thumb%5B6%5D.gif?imgmax=800" width="426" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Load Data A, Load Data B, and Load Data C are executed using delegates : &lt;/p&gt;  &lt;table cellspacing="0" cellpadding="2" width="570" border="1"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="568"&gt;         &lt;p&gt;&lt;font face="Courier New"&gt;LoadDataDelegate loadDataA = new LoadDataDelegate(LoadDataA);              &lt;br /&gt;IAsyncResult result1 = loadDataA.BeginInvoke(null, null); &lt;/font&gt;&lt;/p&gt;          &lt;p&gt;&lt;font face="Courier New"&gt;LoadDataDelegate loadDataB = new LoadDataDelegate(LoadDataB);              &lt;br /&gt;IAsyncResult result2 = loadDataB.BeginInvoke(null, null); &lt;/font&gt;&lt;/p&gt;          &lt;p&gt;&lt;font face="Courier New"&gt;LoadDataDelegate loadDataC = new LoadDataDelegate(LoadDataC);              &lt;br /&gt;IAsyncResult result3 = loadDataC.BeginInvoke(null, null); &lt;/font&gt;&lt;/p&gt;          &lt;p&gt;&lt;font face="Courier New"&gt;// Wait the results to complete              &lt;br /&gt;loadDataA.EndInvoke(result1);               &lt;br /&gt;loadDataB.EndInvoke(result2);               &lt;br /&gt;loadDataC.EndInvoke(result3);&lt;/font&gt;&amp;#160;&amp;#160; &lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New"&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;Turned out after I deployed the component to COM+, all the delegates ran in only single thread as sequentially / synchronously. &lt;/p&gt;  &lt;p&gt;Only if I create a new thread explicitly, it will create a new thread.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh5.ggpht.com/bembengarifin/SGIHRETuUmI/AAAAAAAAAj8/EfFmReBTSK8/s1600-h/Async%20COM%2B%5B9%5D.gif"&gt;&lt;img title="Async COM " style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="121" alt="Async COM " src="http://lh6.ggpht.com/bembengarifin/SGIHSF4DDoI/AAAAAAAAAkA/PQgt4uOmLfk/Async%20COM%2B_thumb%5B5%5D.gif?imgmax=800" width="426" border="0" /&gt;&lt;/a&gt;&amp;#160; &lt;/p&gt;  &lt;p&gt;Load Data A is being executed in a new thread, Load Data B, and Load Data C are executed using delegates but they were executed in the same thread synchronously.&lt;/p&gt;  &lt;table cellspacing="0" cellpadding="2" width="570" border="1"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="568"&gt;         &lt;p&gt;&lt;font face="Courier New"&gt;Thread loadDataA = new Thread(new ThreadStart(LoadDataA));              &lt;br /&gt;loadDataA.Start(); &lt;/font&gt;&lt;/p&gt;          &lt;p&gt;&lt;font face="Courier New"&gt;LoadDataDelegate loadDataB = new LoadDataDelegate(LoadDataB);              &lt;br /&gt;IAsyncResult result2 = loadDataB.BeginInvoke(null, null); &lt;/font&gt;&lt;/p&gt;          &lt;p&gt;&lt;font face="Courier New"&gt;LoadDataDelegate loadDataC = new LoadDataDelegate(LoadDataC);              &lt;br /&gt;IAsyncResult result3 = loadDataC.BeginInvoke(null, null); &lt;/font&gt;&lt;/p&gt;          &lt;p&gt;&lt;font face="Courier New"&gt;// Wait the results to complete              &lt;br /&gt;loadDataA.Join();               &lt;br /&gt;loadDataB.EndInvoke(result2);               &lt;br /&gt;loadDataC.EndInvoke(result3);&lt;/font&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;I haven’t really found the reason why for COM+ deployment will have this behavior for delegate asynchronous invocation :(&lt;/p&gt;  &lt;p&gt;&lt;em&gt;Note: I’m currently not using this asynchronous operation for shared resources reason which requires major changes.&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;So my dearest readers, please show me the light if you know the reason, thanks ;)&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New"&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New"&gt;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/p&gt;  </description><link>http://bembengarifin-tech.blogspot.com/2008/06/asynchronous-delegate-in-serviced.html</link><author>noreply@blogger.com (Bembeng Arifin)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="http://lh4.ggpht.com/bembengarifin/SGIHQlw3MZI/AAAAAAAAAj4/Ru9g3SZRrSo/s72-c/Async%20Normal_thumb%5B6%5D.gif?imgmax=800" width="72"/><thr:total>2</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3729574054547172121.post-5151453081776244962</guid><pubDate>Thu, 19 Jun 2008 01:39:00 +0000</pubDate><atom:updated>2008-06-19T09:39:28.838+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">COM+</category><title>COM+ Catalog Error : Error code 800401E4 - Invalid syntax</title><description>&lt;p&gt;&lt;a href="http://lh3.ggpht.com/bembengarifin/SFm4yvoLABI/AAAAAAAAAjs/dsf6Ly_-pb0/s1600-h/COM%2B%5B9%5D.gif"&gt;&lt;img title="COM " style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="146" alt="COM " src="http://lh6.ggpht.com/bembengarifin/SFm4z8cll5I/AAAAAAAAAjw/api3s_MMIKE/COM%2B_thumb%5B7%5D.gif?imgmax=800" width="331" align="right" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;Got this weird error yesterday when trying to start up some COM+ applications in my PC where previously they were working just fine.&lt;/p&gt;  &lt;p&gt;Got the solution from &lt;a href="http://www.tech-archive.net/Archive/DotNet/microsoft.public.dotnet.framework.component_services/2005-10/msg00012.html" target="_blank"&gt;here&lt;/a&gt;.&lt;/p&gt;  </description><link>http://bembengarifin-tech.blogspot.com/2008/06/com-catalog-error-error-code-800401e4.html</link><author>noreply@blogger.com (Bembeng Arifin)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="http://lh6.ggpht.com/bembengarifin/SFm4z8cll5I/AAAAAAAAAjw/api3s_MMIKE/s72-c/COM%2B_thumb%5B7%5D.gif?imgmax=800" width="72"/><thr:total>1</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3729574054547172121.post-2490589603316927856</guid><pubDate>Tue, 17 Jun 2008 03:02:00 +0000</pubDate><atom:updated>2008-06-17T11:05:06.565+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Biztalk</category><category domain="http://www.blogger.com/atom/ns#">Biztalk Adapter</category><category domain="http://www.blogger.com/atom/ns#">FTP</category><title>Watch out for that blank space</title><description>&lt;p align="left"&gt;We have created a receive location with send port group as the subscriber and will send the message output using FILE adapter and FTP adapter.&lt;/p&gt;  &lt;p align="center"&gt;&lt;a href="http://lh6.ggpht.com/bembengarifin/SFcpVp8AY7I/AAAAAAAAAjc/SJXQEqhe4_w/s1600-h/Send%20Port%20Group%5B13%5D.gif"&gt;&lt;img title="Send Port Group" style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="268" alt="Send Port Group" src="http://lh6.ggpht.com/bembengarifin/SFcpWhvIuaI/AAAAAAAAAjg/-n2d83fDCwY/Send%20Port%20Group_thumb%5B11%5D.gif?imgmax=800" width="258" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;So yesterday, I got an email from the engineering site, they said that they were not able to process the file from the FTP drop.&amp;#160; &lt;/p&gt;  &lt;p&gt;Then they sent this output to me :&lt;/p&gt;  &lt;table cellspacing="0" cellpadding="2" width="400" border="1"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="398"&gt;&lt;font face="Courier New"&gt;$ cat FILEA.txt            &lt;br /&gt;cat: FILEA.txt: No such file or directory&lt;/font&gt;&lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;But if they used this, the file is actually there :&lt;/p&gt;  &lt;table cellspacing="0" cellpadding="2" width="400" border="1"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="400"&gt;&lt;font face="Courier New"&gt;$ more *            &lt;br /&gt;::::::::::::::             &lt;br /&gt;FILEA.txt             &lt;br /&gt;::::::::::::::             &lt;br /&gt;CONTENT FILE A&lt;/font&gt;&lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Another test :&lt;/p&gt;  &lt;table cellspacing="0" cellpadding="2" width="400" border="1"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="400"&gt;         &lt;p&gt;&lt;font face="Courier New"&gt;$ more FILEA.txt*              &lt;br /&gt;CONTENT FILE A&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;So from the test results above, you probably know what’s the cause right? :P&lt;/p&gt;  &lt;p&gt;See that in the target file name properties, there is a blank space behind the “txt”.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/bembengarifin/SFcpXfRGkKI/AAAAAAAAAjk/J5mL5UbBW10/s1600-h/Target%20File%20Name%5B6%5D.gif"&gt;&lt;img title="Target File Name" style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="31" alt="Target File Name" src="http://lh3.ggpht.com/bembengarifin/SFcpYNBzEeI/AAAAAAAAAjo/h1fa6IALfZE/Target%20File%20Name_thumb%5B2%5D.gif?imgmax=800" width="340" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;After removed the blank space, life is good again :D&lt;/p&gt;  </description><link>http://bembengarifin-tech.blogspot.com/2008/06/watch-out-for-that-blank-space.html</link><author>noreply@blogger.com (Bembeng Arifin)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="http://lh6.ggpht.com/bembengarifin/SFcpWhvIuaI/AAAAAAAAAjg/-n2d83fDCwY/s72-c/Send%20Port%20Group_thumb%5B11%5D.gif?imgmax=800" width="72"/><thr:total>1</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3729574054547172121.post-4965375091147533125</guid><pubDate>Thu, 12 Jun 2008 03:07:00 +0000</pubDate><atom:updated>2008-06-12T11:07:08.366+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Biztalk</category><category domain="http://www.blogger.com/atom/ns#">Developer Tools</category><title>BizTalk MsgBoxViewer</title><description>&lt;p&gt;While reading a &lt;a href="http://blogs.msdn.com/biztalkcpr/archive/2008/03/21/problems-occur-when-renaming-groups-in-biztalk-2006-and-how-to-ensure-that-they-don-t-affect-you.aspx" target="_blank"&gt;post&lt;/a&gt; from &lt;a href="http://blogs.msdn.com/biztalkcpr/default.aspx" target="_blank"&gt;One Blog for BizTalk Engineers&lt;/a&gt;, I found an interesting tool, &lt;a href="http://blogs.technet.com/jpierauc/pages/msgboxviewer.aspx" target="_blank"&gt;BizTalk MsgBoxViewer&lt;/a&gt;, built by Jean-Pierre Auconie, which can be used to monitor and generate reports for BizTalk. You can see a little bit of background of the tool at &lt;a href="http://blogs.technet.com/jpierauc/pages/why-this-blog-and-what-is-msgboxviewer.aspx" target="_blank"&gt;here&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;There are 2 user interfaces to use the tool, through GUI or console.&lt;/p&gt;  &lt;p&gt;This is a screen capture for the GUI&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh6.ggpht.com/bembengarifin/SFCSvqazSEI/AAAAAAAAAjE/wJVCTNLVvTc/s1600-h/BizTalk%20MsgBoxViewer%5B4%5D.gif"&gt;&lt;img title="BizTalk MsgBoxViewer" style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="357" alt="BizTalk MsgBoxViewer" src="http://lh4.ggpht.com/bembengarifin/SFCSw6SouwI/AAAAAAAAAjI/i0HmHAQBig8/BizTalk%20MsgBoxViewer_thumb%5B2%5D.gif?imgmax=800" width="498" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt; This is the screen capture for the console&lt;a href="http://lh3.ggpht.com/bembengarifin/SFCSypVYrtI/AAAAAAAAAjM/2BM7saxW67Y/s1600-h/BizTalk%20MsgBoxViewer%20-%20Console%5B6%5D.gif"&gt;&lt;img title="BizTalk MsgBoxViewer - Console" style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="266" alt="BizTalk MsgBoxViewer - Console" src="http://lh6.ggpht.com/bembengarifin/SFCS0bYY-2I/AAAAAAAAAjQ/OtcsYH_Q3to/BizTalk%20MsgBoxViewer%20-%20Console_thumb%5B4%5D.gif?imgmax=800" width="493" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;And here’s the generated report, I would say that I will need some time to chew the whole report out ;p&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh6.ggpht.com/bembengarifin/SFCS1jiX4II/AAAAAAAAAjU/GpKg_9XhCWU/s1600-h/BizTalk%20MsgBoxViewer%20Report%5B4%5D.gif"&gt;&lt;img title="BizTalk MsgBoxViewer Report" style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="359" alt="BizTalk MsgBoxViewer Report" src="http://lh6.ggpht.com/bembengarifin/SFCS2fl8xvI/AAAAAAAAAjY/CInswhP3I60/BizTalk%20MsgBoxViewer%20Report_thumb%5B2%5D.gif?imgmax=800" width="500" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;Go and check it out for your self, it’s definitely worth to try, especially with the “limited” information that we can get by using the BizTalk Administration Console or Health and Activity Tracking :P &lt;/p&gt;  </description><link>http://bembengarifin-tech.blogspot.com/2008/06/biztalk-msgboxviewer.html</link><author>noreply@blogger.com (Bembeng Arifin)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="http://lh4.ggpht.com/bembengarifin/SFCSw6SouwI/AAAAAAAAAjI/i0HmHAQBig8/s72-c/BizTalk%20MsgBoxViewer_thumb%5B2%5D.gif?imgmax=800" width="72"/><thr:total>1</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3729574054547172121.post-2264209173153781603</guid><pubDate>Thu, 12 Jun 2008 02:27:00 +0000</pubDate><atom:updated>2008-06-12T10:27:52.749+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Biztalk</category><category domain="http://www.blogger.com/atom/ns#">Documentation</category><title>Microsoft BizTalk Server Performance Optimization Guide</title><description>&lt;p&gt;&lt;/p&gt;  &lt;p&gt;For Biztalkers, you may want to spend a while to read the new &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=98ecf11a-9a8e-4939-8cef-2bc5536dc792&amp;amp;DisplayLang=en" target="_blank"&gt;Microsoft BizTalk Server Performance Optimization Guide&lt;/a&gt; white paper.&lt;/p&gt;  &lt;p&gt;I found this while reading a &lt;a href="http://seroter.wordpress.com/2008/06/11/new-biztalk-performance-wcf-whitepapers/" target="_blank"&gt;post&lt;/a&gt; from &lt;a href="http://seroter.wordpress.com/" target="_blank"&gt;Richard Seroter’s blog&lt;/a&gt; from my &lt;a href="http://www.google.com/reader/shared/06924871975542880977" target="_blank"&gt;google reader feeds&lt;/a&gt;.&lt;/p&gt;  </description><link>http://bembengarifin-tech.blogspot.com/2008/06/microsoft-biztalk-server-performance.html</link><author>noreply@blogger.com (Bembeng Arifin)</author><thr:total>1</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3729574054547172121.post-2859997621589375683</guid><pubDate>Thu, 29 May 2008 03:08:00 +0000</pubDate><atom:updated>2008-12-09T17:03:21.916+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Biztalk</category><category domain="http://www.blogger.com/atom/ns#">Biztalk Adapter</category><category domain="http://www.blogger.com/atom/ns#">Oracle</category><title>BizTalk Wrong Message Type / Schema Routing Problem?</title><description>This morning, we saw that numbers of orchestrations were suspended.&lt;br /&gt;After some investigations, we were quite surprised that the messages were sent to wrong orchestrations after being polled by the receive locations.&lt;br /&gt;&lt;br /&gt;Below is how the messages should be routed based on the message type / schema subscription.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifePP8E-TZUyo4ge-ZdEOqpHHeZ-k0_oGeEeIRRthMt8crkNjUODF78s0ZD_l6e8Ip4iSZyNzna7cz2UEZ0rZ4juY7QdSunOyO6wcrz49JoaYoUGQ_6dEgGhmzDZQnh6Kqys3QcuEMFyHf/s1600-h/Routing.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifePP8E-TZUyo4ge-ZdEOqpHHeZ-k0_oGeEeIRRthMt8crkNjUODF78s0ZD_l6e8Ip4iSZyNzna7cz2UEZ0rZ4juY7QdSunOyO6wcrz49JoaYoUGQ_6dEgGhmzDZQnh6Kqys3QcuEMFyHf/s400/Routing.gif" alt="" id="BLOGGER_PHOTO_ID_5205646735374761714" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;But what just happened to us was :&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4PK5ev7I-FiH0SULc4VJvFVnX86p9VXjXpppt_xFVBzA4ATVwXE06iEnyBFGqZ2AguYlg8pEo8WDLXZZzuW_Up4iZDjam3lWwFqIXPxLfojPd841K1gBkv7Epb4WMLrijeeUcRfbffGtn/s1600-h/Routing+Problem.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4PK5ev7I-FiH0SULc4VJvFVnX86p9VXjXpppt_xFVBzA4ATVwXE06iEnyBFGqZ2AguYlg8pEo8WDLXZZzuW_Up4iZDjam3lWwFqIXPxLfojPd841K1gBkv7Epb4WMLrijeeUcRfbffGtn/s400/Routing+Problem.gif" alt="" id="BLOGGER_PHOTO_ID_5205647830591422210" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;The data was polled correctly with the Database Alpha but later the message was constructed with the wrong message type / schema, which caused it to be delivered to the wrong orchestration :(&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiRQtmfFVInmqFenc3oc00QoamgrVMPbYW2olc_0bkRrqqgQmlmwMrpqfN1RQAuvcn5pLD7S9vdocrSHLZwHbiy2Bso6S384MOJ82xQaWp2jw0ZnoSIfxfD0Ku_25uKaZYT0d_FNv8sV05u/s1600-h/Routing+NativeSQL.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiRQtmfFVInmqFenc3oc00QoamgrVMPbYW2olc_0bkRrqqgQmlmwMrpqfN1RQAuvcn5pLD7S9vdocrSHLZwHbiy2Bso6S384MOJ82xQaWp2jw0ZnoSIfxfD0Ku_25uKaZYT0d_FNv8sV05u/s400/Routing+NativeSQL.gif" alt="" id="BLOGGER_PHOTO_ID_5205653018911915794" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;I have experienced this in the past with my testing box, however it only happened 1 time only and I can't think of at least a way to reproduce the problem.&lt;br /&gt;&lt;br /&gt;And BTW, the "Restart the host instance" magic solution saved the day as usual :P&lt;br /&gt;&lt;br /&gt;Tell me my dear readers, what i should say to my boss if he asks me about this? ;)</description><link>http://bembengarifin-tech.blogspot.com/2008/05/biztalk-wrong-message-type-schema.html</link><author>noreply@blogger.com (Bembeng Arifin)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifePP8E-TZUyo4ge-ZdEOqpHHeZ-k0_oGeEeIRRthMt8crkNjUODF78s0ZD_l6e8Ip4iSZyNzna7cz2UEZ0rZ4juY7QdSunOyO6wcrz49JoaYoUGQ_6dEgGhmzDZQnh6Kqys3QcuEMFyHf/s72-c/Routing.gif" width="72"/><thr:total>2</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3729574054547172121.post-5500485744316243474</guid><pubDate>Fri, 16 May 2008 08:19:00 +0000</pubDate><atom:updated>2008-12-09T17:03:21.986+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Biztalk</category><category domain="http://www.blogger.com/atom/ns#">Biztalk Adapter</category><category domain="http://www.blogger.com/atom/ns#">WebServices</category><title>BizTalk SOAP Adapter - Consuming Remote Web Services Bottleneck</title><description>This morning I was told by my colleague that he found hundreds of instances running in the BizTalk Server and from the look of it, most of them are the send port SOAP adapter instances.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjkzQ0pM0xsxjnDmfSCoMgQaDW1PhOI8rgVRyvibkA_Fcdz5Cfy05W5gGauvJi6UqNNFIGAdEcg_x1WepR47Hp2Ftgb7Nqg48r9fC0_wBUWCY4CtyFvBRhK3LH3yLhAD8v2qlmwO7nPqKB/s1600-h/Consume+Web+Services.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjkzQ0pM0xsxjnDmfSCoMgQaDW1PhOI8rgVRyvibkA_Fcdz5Cfy05W5gGauvJi6UqNNFIGAdEcg_x1WepR47Hp2Ftgb7Nqg48r9fC0_wBUWCY4CtyFvBRhK3LH3yLhAD8v2qlmwO7nPqKB/s400/Consume+Web+Services.gif" alt="" id="BLOGGER_PHOTO_ID_5200910786288773970" border="0" /&gt;&lt;/a&gt;We have an orchestration which consumes a web services, so the first thing that came to my mind is that it's gotta be the web services which can not handle the load.&lt;br /&gt;&lt;br /&gt;I was thinking that there's gotta be  hundreds of concurrent calls to the web services, then i tried to open up the Performance Counter -&gt; ASP.NET Apps v1.1.4322 -&gt; Requests Executing for the particular web services, i was surprised to see that there are only 2 requests executing concurrently :|&lt;br /&gt;&lt;br /&gt;Then my other colleage told me that there's a settings in the machine.config file for this, to limit the numbers of call to particular connection.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;&amp;lt;system.net&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt; &amp;lt;connectionManagement&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;  &amp;lt;add address="*" maxconnection="2"&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;  &amp;lt;add address = "http://www.contoso.com" maxconnection = "5" /&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;  &amp;lt;add address = "http://www.northwind.com" maxconnection = "2" /&amp;gt;  &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;  &amp;lt;add address = "200.200.200.1" maxconnection="12"&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt; &amp;lt;/connectionManagement&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;lt;/system.net&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;After changing this settings to a higher value, the instances were getting completed gradually and not building up anymore :)&lt;br /&gt;&lt;br /&gt;You can find more about this at :&lt;br /&gt;&lt;a href="http://channel9.msdn.com/wiki/default.aspx/PerformanceWiki.HowToTuneASPNET"&gt;http://channel9.msdn.com/wiki/default.aspx/PerformanceWiki.HowToTuneASPNET&lt;/a&gt;&lt;br /&gt;&lt;a href="http://support.microsoft.com/kb/821268"&gt;http://support.microsoft.com/kb/821268&lt;/a&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/aa560822.aspx"&gt;http://msdn.microsoft.com/en-us/library/aa560822.aspx&lt;/a&gt; / BizTalk 2006 Server Documentation -&gt; SOAP Adapter Configuration and Tuning Parameters&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/1tkaca2y.aspx"&gt;http://msdn.microsoft.com/en-us/library/1tkaca2y.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;However, in the &lt;a href="http://msdn.microsoft.com/en-us/library/aa560822.aspx"&gt;BizTalk 2006 Server Documentation&lt;/a&gt;, it states that the default is 20 where &lt;a href="http://msdn.microsoft.com/en-us/library/1tkaca2y.aspx"&gt;.Net Framework Documentation&lt;/a&gt; states only 2.&lt;br /&gt;&lt;br /&gt;Hope this helps anyone with the same issue ;)</description><link>http://bembengarifin-tech.blogspot.com/2008/05/biztalk-soap-adapter-consuming-remote.html</link><author>noreply@blogger.com (Bembeng Arifin)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjkzQ0pM0xsxjnDmfSCoMgQaDW1PhOI8rgVRyvibkA_Fcdz5Cfy05W5gGauvJi6UqNNFIGAdEcg_x1WepR47Hp2Ftgb7Nqg48r9fC0_wBUWCY4CtyFvBRhK3LH3yLhAD8v2qlmwO7nPqKB/s72-c/Consume+Web+Services.gif" width="72"/><thr:total>1</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3729574054547172121.post-2152764130755099752</guid><pubDate>Wed, 14 May 2008 01:11:00 +0000</pubDate><atom:updated>2008-12-09T17:03:22.853+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">TipsNTricks</category><category domain="http://www.blogger.com/atom/ns#">Unit Test</category><category domain="http://www.blogger.com/atom/ns#">VS Express</category><title>Running xUnit Console inside VS Express IDE</title><description>I just downloaded the &lt;a href="http://www.microsoft.com/express/sp1/"&gt;VS 2008 Express SP1&lt;/a&gt; yesterday, and got excited because now the &lt;a href="http://www.microsoft.com/express/sp1/download/#vwd"&gt;Visual Web Developer 2008 Express Edition&lt;/a&gt; supports Web Application and Class Library Projects, so more things can be done with the express edition, thanks to the VS Express team ;)&lt;br /&gt;&lt;br /&gt;Usually we can use the unit test inside the VS IDE itself by using &lt;a href="http://www.testdriven.net/"&gt;TestDriven.Net&lt;/a&gt;, however express edition will not support VS addins, so yeah it's the downside of it but anyway it's FREE, so live with it :P&lt;br /&gt;&lt;br /&gt;I'm currently using &lt;a href="http://www.codeplex.com/xunit"&gt;xUnit&lt;/a&gt; which comes with a GUI interface and a console runner, i find it always better if we can use it inside the VS IDE itself without having to switch program using ALT+TAB to run the GUI / Console runner.&lt;br /&gt;&lt;br /&gt;Wouldn't it be nicer if we can do it inside the IDE itself? So this is how i setup it in my VS IDE :&lt;br /&gt;1. Go to Tools -&gt; External Tools&lt;br /&gt;2. Add new menu :&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Title : x&amp;amp;Unit (&amp;amp; is used for shorcut keys)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Command : D:\Extension\xUnit\xunit.console.exe (This should be the your console runner location)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Arguments : $(BinDir)$(TargetName)$(TargetExt)&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-weight: bold;"&gt;**Updates&lt;/span&gt;&lt;span style="color: rgb(51, 51, 255);"&gt; :&lt;/span&gt; In VS2005 / VS2003 : $(ItemDir)bin\Debug\$(TargetName)$(TargetExt)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Check the Use Output window&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgax8ZAh1ssInu9jI8FoLiwJU7eyZI8wLoNXZvqLXCkDo-il-UqfZ8CQ4NROm8x0tqSrQ4ir8IrkBlUV71mw0Ue5Zj5FpeqAYiEhhWkpvf18JleQXIfp-n1KgzFvq0YSOJtNRr0HWOlvc2z/s1600-h/ExternalTools.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgax8ZAh1ssInu9jI8FoLiwJU7eyZI8wLoNXZvqLXCkDo-il-UqfZ8CQ4NROm8x0tqSrQ4ir8IrkBlUV71mw0Ue5Zj5FpeqAYiEhhWkpvf18JleQXIfp-n1KgzFvq0YSOJtNRr0HWOlvc2z/s400/ExternalTools.gif" alt="" id="BLOGGER_PHOTO_ID_5200039406143892258" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Now in the Tools menu, you can find the new x&lt;u&gt;U&lt;/u&gt;nit menu item.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjF2YhFlFrN2hl2JzlTNMxiCukVoPA1dDBGAGO4eP7vwtO3mA_MsZe7FV-YPrYHN2IXAmlg7yXp_QJEVCFUlaeMGKjEqg_ox0fFshnIDFyxZwsB4ldaFNbyhOW0jpRw0-8wNiH8sx4efGhp/s1600-h/ToolsMenu.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjF2YhFlFrN2hl2JzlTNMxiCukVoPA1dDBGAGO4eP7vwtO3mA_MsZe7FV-YPrYHN2IXAmlg7yXp_QJEVCFUlaeMGKjEqg_ox0fFshnIDFyxZwsB4ldaFNbyhOW0jpRw0-8wNiH8sx4efGhp/s400/ToolsMenu.gif" alt="" id="BLOGGER_PHOTO_ID_5200040235072580402" border="0" /&gt;&lt;/a&gt;So now, after you finish building the project, you only need to use the shortcut ALT T+U and it will out like this below :)&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5tcpjRr-pczsItUNsVSmc7fuSw5nEyHlrWTMKNa4HGgjrqDXy2WMiENha1z7K4Tc-KRVTM6WynfOI1xgVWygt-rlSuANGWdpAkuq3vNDojJPBbDMPWM3cr-DoAyJm8KpvEuys-2AJ0GnT/s1600-h/UnitTestIDE.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5tcpjRr-pczsItUNsVSmc7fuSw5nEyHlrWTMKNa4HGgjrqDXy2WMiENha1z7K4Tc-KRVTM6WynfOI1xgVWygt-rlSuANGWdpAkuq3vNDojJPBbDMPWM3cr-DoAyJm8KpvEuys-2AJ0GnT/s400/UnitTestIDE.gif" alt="" id="BLOGGER_PHOTO_ID_5200041459138259778" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(51, 51, 255);"&gt;**Updates :&lt;/span&gt;&lt;br /&gt;This is how to bind a keyboard shortcut to the unit test menu item, based on &lt;a href="http://distantsound-dev.blogspot.com/"&gt;Distant Sounds&lt;/a&gt;'s comment.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZg_tpqFfkL44F-kYny0l5SowP8akiLf98eZPjLLXeOU9Q8E1NfQXv2vahyphenhyphenHp66RQF7xCAwJhitMZODcakA7X8Xn3A-kceFQgiPl9fsKZsIMVWaeL-vqu9QRpTiqBBJIwVLwDq4ouXMBn2/s1600-h/Keyboard+-+Customize.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZg_tpqFfkL44F-kYny0l5SowP8akiLf98eZPjLLXeOU9Q8E1NfQXv2vahyphenhyphenHp66RQF7xCAwJhitMZODcakA7X8Xn3A-kceFQgiPl9fsKZsIMVWaeL-vqu9QRpTiqBBJIwVLwDq4ouXMBn2/s400/Keyboard+-+Customize.gif" alt="" id="BLOGGER_PHOTO_ID_5209696323018235490" border="0" /&gt;&lt;/a&gt;You will need to choose Tools.ExternalCommand(n), where n is the sequence order of your unit test menu item.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZR60nXLdEo9sg4R9A4bL-It1FaBcoRyhfKk8rZfLPRKbj2Cq84GhcGLchm4CJAnTdX1om_FmuIHu_jk_Id0mF7w7OX_QE_PD4dewLdObJFO-z5Zuhs3MhcrXUXGoBZKIo5YodMuA74fx7/s1600-h/Keyboard+-+Shortcuts.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZR60nXLdEo9sg4R9A4bL-It1FaBcoRyhfKk8rZfLPRKbj2Cq84GhcGLchm4CJAnTdX1om_FmuIHu_jk_Id0mF7w7OX_QE_PD4dewLdObJFO-z5Zuhs3MhcrXUXGoBZKIo5YodMuA74fx7/s400/Keyboard+-+Shortcuts.gif" alt="" id="BLOGGER_PHOTO_ID_5209696840917856562" border="0" /&gt;&lt;/a&gt;and then you get another option to execute the unit test ;)&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvDlZqhKTQkRnAxN1-jO4WRz-1o_6P3SiGrfm1oX43ukfFl_Teq4qDq2hbp_gKQmqDZm9Mtje3eUH7w7Vl4mRR57_EbzrfY2ISR9MUW_psoLbgSoGdwpu98bqPDi6mHjwjpq_evlDBq_TZ/s1600-h/Keyboard+-+Result.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvDlZqhKTQkRnAxN1-jO4WRz-1o_6P3SiGrfm1oX43ukfFl_Teq4qDq2hbp_gKQmqDZm9Mtje3eUH7w7Vl4mRR57_EbzrfY2ISR9MUW_psoLbgSoGdwpu98bqPDi6mHjwjpq_evlDBq_TZ/s400/Keyboard+-+Result.gif" alt="" id="BLOGGER_PHOTO_ID_5209697477296642242" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Hope this helps ;)</description><link>http://bembengarifin-tech.blogspot.com/2008/05/running-xunit-console-inside-vs-express.html</link><author>noreply@blogger.com (Bembeng Arifin)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgax8ZAh1ssInu9jI8FoLiwJU7eyZI8wLoNXZvqLXCkDo-il-UqfZ8CQ4NROm8x0tqSrQ4ir8IrkBlUV71mw0Ue5Zj5FpeqAYiEhhWkpvf18JleQXIfp-n1KgzFvq0YSOJtNRr0HWOlvc2z/s72-c/ExternalTools.gif" width="72"/><thr:total>5</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3729574054547172121.post-5929209295236411136</guid><pubDate>Wed, 07 May 2008 08:37:00 +0000</pubDate><atom:updated>2008-12-09T17:03:24.416+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Biztalk</category><category domain="http://www.blogger.com/atom/ns#">Biztalk Adapter</category><category domain="http://www.blogger.com/atom/ns#">FTP</category><title>Setup Local FTP Server for BizTalk 2006 FTP Adapter Development</title><description>Today, I was asked by my colleague to find out more about BizTalk 2006 FTP Adapter, because we may use that for future projects.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Setup my local PC with Windows XP Professional SP 2&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;1. Windows XP comes with built in FTP Site under the IIS Installation, you can install them through Add or Remove Programs -&gt; Add/Remove Windows Component.&lt;br /&gt;You can follow the steps from &lt;a href="http://www.mvps.org/marksxp/WindowsXP/IIS/iis1.php"&gt;Mark Salloway's post&lt;/a&gt; and &lt;a href="http://www.pcstats.com/articleview.cfm?articleID=1491"&gt;Mike D.'s article&lt;/a&gt; for FTP overview.&lt;br /&gt;&lt;br /&gt;2. Open Computer Management -&gt; System Tools -&gt; Local Users &amp;amp; Groups -&gt; Users&lt;br /&gt;&lt;br /&gt;3. Create a new local user named FTPUser with the password&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0zEHCDoyNLPKGnWpzX5VX-XjXRtRpoe7jUdt7U_dSxawTKF3-zmzP7fn_2-_OOXoT57vVxWDZIV9cFIaYn_gdWS-0PMganzc917aoiwiScS4OU6euqqm3uU5oRm2PHxErAffDKuyaLja1/s1600-h/FTPUser.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0zEHCDoyNLPKGnWpzX5VX-XjXRtRpoe7jUdt7U_dSxawTKF3-zmzP7fn_2-_OOXoT57vVxWDZIV9cFIaYn_gdWS-0PMganzc917aoiwiScS4OU6euqqm3uU5oRm2PHxErAffDKuyaLja1/s400/FTPUser.gif" alt="" id="BLOGGER_PHOTO_ID_5197552802716559986" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;4. Create a folder named BizAppFTP and several subfolders :&lt;br /&gt;&lt;ul&gt;&lt;li&gt;In -&gt; Receive Location&lt;/li&gt;&lt;li&gt;Out -&gt; Send Port&lt;/li&gt;&lt;li&gt;Log -&gt; FTP Adapter Log Folder&lt;/li&gt;&lt;li&gt;Sample -&gt; Contain sample files for input&lt;/li&gt;&lt;/ul&gt;Right click on the BizAppFTP Folder -&gt; Properties -&gt; Security Tab -&gt; Add FTPUser into the list and allow modify access.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhuzpJ4JKQ8jAdf5rxYdPQ7LL3nLPz9SW8sRRjXFYtHskbP4qpcR-QKq1F93sH7r5g_0YIE6DIbTehQTJl_j0lTeF_Sg2Yhzf2uhI9khqfCWAEUOorVFvmFYoC4wz_N1cKlJzefKkYMIWMV/s1600-h/BizAppFTP.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhuzpJ4JKQ8jAdf5rxYdPQ7LL3nLPz9SW8sRRjXFYtHskbP4qpcR-QKq1F93sH7r5g_0YIE6DIbTehQTJl_j0lTeF_Sg2Yhzf2uhI9khqfCWAEUOorVFvmFYoC4wz_N1cKlJzefKkYMIWMV/s400/BizAppFTP.gif" alt="" id="BLOGGER_PHOTO_ID_5197553090479368834" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;5. Open Computer Management -&gt; Services and Application -&gt; Internet Information Services -&gt; FTP Sites -&gt; Default FTP Site&lt;br /&gt;&lt;br /&gt;6. Create a virtual directory named BizApp and set the path to the previously created BizAppFTP folder. Check Read, Write, and Log visits options for the virtual directory.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhozf0paHpw3GfQwHLBo7HchH9rwZtA3OSv7nnsJAYkr0lwzGX8yCDlLPU75oEgSxzhpQ3H31HmhILteZH6WFjKpJIMCZRa276qexhB25CfJhoPOuvh5aw5oAiE6N7BfcekEx_ylS3afxaz/s1600-h/BizAppFTPSite.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhozf0paHpw3GfQwHLBo7HchH9rwZtA3OSv7nnsJAYkr0lwzGX8yCDlLPU75oEgSxzhpQ3H31HmhILteZH6WFjKpJIMCZRa276qexhB25CfJhoPOuvh5aw5oAiE6N7BfcekEx_ylS3afxaz/s400/BizAppFTPSite.gif" alt="" id="BLOGGER_PHOTO_ID_5197553305227733650" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;7. Open BizTalk Server 2006 Administration Console&lt;br /&gt;&lt;br /&gt;8. Create a one-way receive port named rp_TestFTP and a receive location rl_TestFTP and configure the adapter&lt;ul&gt;&lt;li&gt;File Mask : *.xml&lt;/li&gt;&lt;li&gt;Folder : BizApp/In&lt;/li&gt;&lt;li&gt;Log : D:\Temp\BizAppFTP\Log\Receive.Log&lt;/li&gt;&lt;li&gt;Password : (Fill this with FTPUser password)&lt;/li&gt;&lt;li&gt;Server : (Your server name / IP Address)&lt;/li&gt;&lt;li&gt;User Name : FTPUser&lt;/li&gt;&lt;/ul&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOwMQB1Lp68iq4ocoD1b4lJVHZq543OX04Pr0sAvFol2Pm0aoqcemqZHbCm8MXJf-OpRsOLFvD4HAHBMBB1Az9swrGu5ZSqsCn5juqJp3XQV9Wm_6LPKdspHL1b86B4IdlRo1qE0fAR78A/s1600-h/ReceivePortLocation.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOwMQB1Lp68iq4ocoD1b4lJVHZq543OX04Pr0sAvFol2Pm0aoqcemqZHbCm8MXJf-OpRsOLFvD4HAHBMBB1Az9swrGu5ZSqsCn5juqJp3XQV9Wm_6LPKdspHL1b86B4IdlRo1qE0fAR78A/s400/ReceivePortLocation.gif" alt="" id="BLOGGER_PHOTO_ID_5197553708954659490" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;9. Create a send port named sp_TestFTP and configure the adapter&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Folder : BizApp/Out&lt;/li&gt;&lt;li&gt;Log : D:\Temp\BizAppFTP\Log\Send.log&lt;/li&gt;&lt;li&gt;Password : (Fill this with FTPUser password)&lt;/li&gt;&lt;li&gt;Server : (Your server name / IP Address)&lt;/li&gt;&lt;li&gt;User Name : FTPUser&lt;/li&gt;&lt;/ul&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEii_kKw8F1rYZV7QNEC8-nHHOVkloKUjCoookQCTXvbh1GRqfg5e00ElqIycZ1pEmtL1qzGbBqLjceb3N8XHf-CHD_nz8ZYOUp6HVD3PqjCJ_xubxPL5v48SksOOBUd-DUlkSYrBRba6_n8/s1600-h/SendPort.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEii_kKw8F1rYZV7QNEC8-nHHOVkloKUjCoookQCTXvbh1GRqfg5e00ElqIycZ1pEmtL1qzGbBqLjceb3N8XHf-CHD_nz8ZYOUp6HVD3PqjCJ_xubxPL5v48SksOOBUd-DUlkSYrBRba6_n8/s400/SendPort.gif" alt="" id="BLOGGER_PHOTO_ID_5197554035372174002" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;10. Set the filter expression for the sp_TestFTP to subscribe the message from rp_TestFTP receive port.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEzmX3g3bfNXlenCmwl5jcmEUYSm2bY-lvbY829A9OfPlmSlNS2UEWMhyphenhyphenmL4MML_kTDfYYW1ryKxJMTBgmU4TZtxiFgKiwWOMDgrxEVspKCi6swEWK2Qd3-fwr8MrGuhtjZNRVnhkhoRgH/s1600-h/SendPortFilter.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEzmX3g3bfNXlenCmwl5jcmEUYSm2bY-lvbY829A9OfPlmSlNS2UEWMhyphenhyphenmL4MML_kTDfYYW1ryKxJMTBgmU4TZtxiFgKiwWOMDgrxEVspKCi6swEWK2Qd3-fwr8MrGuhtjZNRVnhkhoRgH/s400/SendPortFilter.gif" alt="" id="BLOGGER_PHOTO_ID_5197554267300408002" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Testing Time&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;1. Create a sample xml file in then sample folder with only &lt;root&gt; inside.&lt;br /&gt;&lt;/root&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjnKWyhXyECf2evXGsP_LEiUAcmFez5J45G8BDhK77cnmMV6pfScjg_P3SMpWZFrg9BfwU8ME33Wv4XAfd7YlAtmS7xQHKY-SZeSPydRJubpHjEbFjk72OItbp0BNCiHI8IV_gmVOC-LXDc/s1600-h/SampleFile.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjnKWyhXyECf2evXGsP_LEiUAcmFez5J45G8BDhK77cnmMV6pfScjg_P3SMpWZFrg9BfwU8ME33Wv4XAfd7YlAtmS7xQHKY-SZeSPydRJubpHjEbFjk72OItbp0BNCiHI8IV_gmVOC-LXDc/s400/SampleFile.gif" alt="" id="BLOGGER_PHOTO_ID_5197554662437399250" border="0" /&gt;&lt;/a&gt;&lt;root&gt;2. Copy and paste the file into the "In" folder&lt;br /&gt;&lt;/root&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjHLe9r1MwkR1WAvvBqLQBrkFciJScJr-mONQT4wi_JvHCP4uVtVZ2sCNlnd5HgtbbO12yI5mKQfK-nPBR6jyiG8m9m6ut1-Lf26FPtwRdFibWzTUR4L_Jmre4Gyh2_yEaSDk2BzfNfNiRd/s1600-h/In.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjHLe9r1MwkR1WAvvBqLQBrkFciJScJr-mONQT4wi_JvHCP4uVtVZ2sCNlnd5HgtbbO12yI5mKQfK-nPBR6jyiG8m9m6ut1-Lf26FPtwRdFibWzTUR4L_Jmre4Gyh2_yEaSDk2BzfNfNiRd/s400/In.gif" alt="" id="BLOGGER_PHOTO_ID_5197555079049226978" border="0" /&gt;&lt;/a&gt;&lt;root&gt;&lt;br /&gt;3. Depends on the polling interval, it will pick up the file through rl_TestFTP and then send the file directly to the "Out" folder through sp_TestFTP.&lt;br /&gt;&lt;br /&gt;4. The output file was generated and if you can see the Receive.Log and Send.Log for the FTP activities.&lt;br /&gt;&lt;/root&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhfYK014av3bIRvdcEXU0IaXn7wlhZTK1noLRPfE9c_dfBFCr1FH8xazr2-GTPlV1dBkqdRKq8Yoqs_6k8xFGCAZkd2ks0AfDkcuyECpQUC79HmJ4uHBVJt5eoz2ZrRqg6rT3_8kUEkSrl4/s1600-h/Out.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhfYK014av3bIRvdcEXU0IaXn7wlhZTK1noLRPfE9c_dfBFCr1FH8xazr2-GTPlV1dBkqdRKq8Yoqs_6k8xFGCAZkd2ks0AfDkcuyECpQUC79HmJ4uHBVJt5eoz2ZrRqg6rT3_8kUEkSrl4/s400/Out.gif" alt="" id="BLOGGER_PHOTO_ID_5197555113408965362" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgx-uVHwDvckrw6VLsVQ_8YYVRDU4lJuE8-TfYNdB9xcTdPSmwrIcq9W0DzWEmhrw0TZEuTW2TEyoR7qFIvyojDM6BkgTkc7ctAKy6Cju-svKX8cPLRXtC8WhbMlalCHybeQ2yqDADTz7oy/s1600-h/ReceiveLog.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgx-uVHwDvckrw6VLsVQ_8YYVRDU4lJuE8-TfYNdB9xcTdPSmwrIcq9W0DzWEmhrw0TZEuTW2TEyoR7qFIvyojDM6BkgTkc7ctAKy6Cju-svKX8cPLRXtC8WhbMlalCHybeQ2yqDADTz7oy/s400/ReceiveLog.gif" alt="" id="BLOGGER_PHOTO_ID_5197556406194121474" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicLfKetUN7EUIdpVfK_OA9Gd5ONdpFUlIs0kpEr8aMGw7i-63c0tBuhS-kzDbh0ZKaJpjzPjBPnto6TWrfQKUnvhk7z5tGCIlYpgN022-fmZgIQ2RAwm54XM9UwXDOoE2Nko1xOZ_690qo/s1600-h/SendLog.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicLfKetUN7EUIdpVfK_OA9Gd5ONdpFUlIs0kpEr8aMGw7i-63c0tBuhS-kzDbh0ZKaJpjzPjBPnto6TWrfQKUnvhk7z5tGCIlYpgN022-fmZgIQ2RAwm54XM9UwXDOoE2Nko1xOZ_690qo/s400/SendLog.gif" alt="" id="BLOGGER_PHOTO_ID_5197556406194121490" border="0" /&gt;&lt;/a&gt;Similar to FILE adapter, the adapter will try to get the file and delete the file, this is why you will need to have a user who has privilege to delete the file and by using this built in FTP, the security can be configured through NTFS.&lt;br /&gt;&lt;br /&gt;You may want to read more on the &lt;a href="http://msdn.microsoft.com/en-us/library/aa561215.aspx"&gt;FTP Adapter&lt;/a&gt; in the BizTalk documentation&lt;root&gt;, especially on the security part where it mentions "&lt;/root&gt;&lt;span style="font-style: italic;"&gt;FTP is, by nature, not secure: The user name, password, and other credentials traverse the network in clear text&lt;/span&gt;".&lt;br /&gt;&lt;br /&gt;I'll post more later when I have the project at hand.&lt;br /&gt;Hope this helps :)</description><link>http://bembengarifin-tech.blogspot.com/2008/05/setup-local-ftp-server-for-biztalk-2006.html</link><author>noreply@blogger.com (Bembeng Arifin)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0zEHCDoyNLPKGnWpzX5VX-XjXRtRpoe7jUdt7U_dSxawTKF3-zmzP7fn_2-_OOXoT57vVxWDZIV9cFIaYn_gdWS-0PMganzc917aoiwiScS4OU6euqqm3uU5oRm2PHxErAffDKuyaLja1/s72-c/FTPUser.gif" width="72"/><thr:total>5</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3729574054547172121.post-243310288071388311</guid><pubDate>Tue, 06 May 2008 04:26:00 +0000</pubDate><atom:updated>2008-12-09T17:03:26.173+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Biztalk</category><category domain="http://www.blogger.com/atom/ns#">SQL Express</category><title>BizTalk Server 2006 Development with SQL Express 2005 - Job Agent Replacement</title><description>BizTalk Server 2006 can be installed with the &lt;a href="http://www.microsoft.com/sql/editions/express/default.mspx"&gt;SQL Express 2005&lt;/a&gt; edition.&lt;br /&gt;&lt;br /&gt;I'm currently using &lt;a href="http://www.microsoft.com/sql/editions/express/default.mspx"&gt;SQL Express 2005&lt;/a&gt; for the development purpose because it is free so we don't have to worry about the licensing.&lt;br /&gt;&lt;br /&gt;The downside of using SQL Express 2005 is that the job agent is not available anymore, where BizTalk has several clean up jobs which need to run to optimize the database performance.&lt;br /&gt;Usually we don't have to worry about this since we're only using for development or testing purpose, but I'm currently investigating a problem with our singleton orchestration, we suspect that by using a singleton orchestration, some messages were cleaned up in the database after they are completed.&lt;br /&gt;&lt;br /&gt;So how to investigate this problem in my local development PC where we don't have running biztalk clean up jobs in SQL Express 2005?&lt;br /&gt;Luckly, I found this &lt;a href="http://www.mssqltips.com/tip.asp?tip=1083"&gt;article&lt;/a&gt; which mentions about &lt;a href="http://www.lazycoding.com/products.aspx"&gt;SQLScheduler&lt;/a&gt;.&lt;br /&gt;It's free and we can have unlimited instances with unlimited jobs :)&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCbV5n-GfHBkBHDhi-3TqqUzaFLC7bWJInIddTKemCm8kLig4icCqXJFYPX28qfYw37BE4r4Obo-jp6s38VN6XGjCyE7dHzNRqNBL8hpvPzEhvLsLuh8jsD3YVi512pE5ydB_EXpNKXN7I/s1600-h/SQLScheduler.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCbV5n-GfHBkBHDhi-3TqqUzaFLC7bWJInIddTKemCm8kLig4icCqXJFYPX28qfYw37BE4r4Obo-jp6s38VN6XGjCyE7dHzNRqNBL8hpvPzEhvLsLuh8jsD3YVi512pE5ydB_EXpNKXN7I/s400/SQLScheduler.gif" alt="" id="BLOGGER_PHOTO_ID_5197125693988776530" border="0" /&gt;&lt;/a&gt;I just tried to setup the jobs based on the jobs which were created in SQL Server Instances, and they seems to work fine because the stored procedures for the jobs were created in the SQL Express Database as well.&lt;br /&gt;&lt;br /&gt;This is the job details example for MessageBox_Message_Cleanup_BizTalkMsgBoxDb :&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh24bePmJaJnnThMxUPLafIY8J3VTfXlVNeZBoQs_Kdf0ccQsqM2Q0UAqj7t2tJ5jGkqQNs0eHmNjWc0MXDqjWdp2MoKRV1PogDWaWX-lnRfbmJSeOdXtkFU8GfWl3z4QoywSgNjWjwqPRG/s1600-h/Job.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh24bePmJaJnnThMxUPLafIY8J3VTfXlVNeZBoQs_Kdf0ccQsqM2Q0UAqj7t2tJ5jGkqQNs0eHmNjWc0MXDqjWdp2MoKRV1PogDWaWX-lnRfbmJSeOdXtkFU8GfWl3z4QoywSgNjWjwqPRG/s400/Job.gif" alt="" id="BLOGGER_PHOTO_ID_5197128700465883746" border="0" /&gt;&lt;/a&gt;Go and give it a try for yourself, it's more than enough for development / testing purpose :)</description><link>http://bembengarifin-tech.blogspot.com/2008/05/biztalk-server-2006-development-with.html</link><author>noreply@blogger.com (Bembeng Arifin)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCbV5n-GfHBkBHDhi-3TqqUzaFLC7bWJInIddTKemCm8kLig4icCqXJFYPX28qfYw37BE4r4Obo-jp6s38VN6XGjCyE7dHzNRqNBL8hpvPzEhvLsLuh8jsD3YVi512pE5ydB_EXpNKXN7I/s72-c/SQLScheduler.gif" width="72"/><thr:total>4</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3729574054547172121.post-8414099928591499066</guid><pubDate>Wed, 30 Apr 2008 08:22:00 +0000</pubDate><atom:updated>2008-12-09T17:03:26.428+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Biztalk</category><category domain="http://www.blogger.com/atom/ns#">Biztalk Adapter</category><category domain="http://www.blogger.com/atom/ns#">Oracle</category><title>BizTalk 2006 Oracle Adapter (ODBC) - An alternative for Poll Statement with Function (Not Procedure)</title><description>In Oracle Adapter, there are &lt;a href="http://technet.microsoft.com/en-us/library/aa562041.aspx"&gt;several ways&lt;/a&gt; to poll the data from the database, in this post, I will be discussing on the polling data without triggers, just by using Poll SQL Statement and Post Poll SQL Statement.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Part 1&lt;/span&gt;&lt;span style="font-weight: bold;"&gt; - The First Project&lt;/span&gt;&lt;br /&gt;We have a table of data which will be polled by several orchestrations based on a status field in the table to process, see below screen for the details.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhzuAaQV46JoeHfB7P6xiJXfZghIV61qWIgRbrx0g6ktWwxsdcjKKuvlZGaxmubROFSLCmT2aQSdMjtvbL_9ysy70ugu9JWAq4B2Jz-uEgll10RZ9sLlNz-qvkjNmpEjLHNp_WQGOhHJK1Y/s1600-h/ProcessTable.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhzuAaQV46JoeHfB7P6xiJXfZghIV61qWIgRbrx0g6ktWwxsdcjKKuvlZGaxmubROFSLCmT2aQSdMjtvbL_9ysy70ugu9JWAq4B2Jz-uEgll10RZ9sLlNz-qvkjNmpEjLHNp_WQGOhHJK1Y/s400/ProcessTable.gif" alt="" id="BLOGGER_PHOTO_ID_5194959827880749634" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;By using Poll SQL Statement to get the rows and Post SQL Statement to update the rows to other status is actually working fine for most of the cases, and it is important to note that they are both executed within &lt;a href="http://technet.microsoft.com/en-us/library/aa560415.aspx"&gt;a transaction of serializable isolation level&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;In my first project, it is working fine, because the frequency is quite low, poll 1 row of data / 60 seconds. Life is good ;)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Part 2&lt;/span&gt;&lt;span style="font-weight: bold;"&gt; - The Second Project&lt;/span&gt;&lt;br /&gt;Ok, now in which kind of scenarios where it is not working as expected?&lt;br /&gt;&lt;br /&gt;We have a new application which needs to poll rows of data in short interval, because the expected data to process will be huge, so it is not acceptable for us to poll 1 row / 60 seconds.&lt;br /&gt;In short, we need to process 3.000 rows of data in 1 hour, so that leaves us with 50 rows / 60 seconds.&lt;br /&gt;&lt;br /&gt;So what's the issue with that? just change the query to select top 50 and off you go? hhhmm... not as smooth as we thought :P&lt;br /&gt;&lt;br /&gt;Reasons : As the processing got huge, it seems that the server and/or the adapter are affected as well. Because of the latency, it seems that the Post Poll SQL Statement is not executed in the expected time, this cause the subsequent polls may poll the same data as the previous one, because the Update the row status in the Post Poll SQL Statement hasn't been executed yet. This eventually lead to double processing of the data.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Part 3 - The Search for Alternatives&lt;/span&gt;&lt;br /&gt;What is the ideal way for this? I would say that call a procedure to poll the data, because we can get the rows and update them in the same time. And btw, I don't really like the way Poll SQL Statement and Post SQL Statement work, we need to make sure that the conditions / where statements in the Poll SQL Statement and Post Poll SQL Statement are the same or we'll get nasty update results :P&lt;br /&gt;&lt;br /&gt;Unfortunately, I have been trying for calling a procedure without any good results for quite a while now, and i have posted some &lt;a href="http://www.microsoft.com/communities/newsgroups/en-us/default.aspx?dg=microsoft.public.biztalk.orchestration&amp;amp;tid=858c7997-9aa9-424e-9272-292b09ee8647&amp;amp;cat=&amp;amp;lang=&amp;amp;cr=&amp;amp;sloc=&amp;amp;p=1"&gt;questions&lt;/a&gt; about this in the web and they have been replicated to many places now :P &lt;a href="http://www.google.com.sg/search?hl=en&amp;amp;sa=X&amp;amp;oi=spell&amp;amp;resnum=0&amp;amp;ct=result&amp;amp;cd=1&amp;amp;q=bembeng+arifin+poll+statement+procedure&amp;amp;spell=1"&gt;links&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Well, several people have mentioned that they are able to use oracle procedure to poll the data, however I haven't received more details about it until now.&lt;br /&gt;&lt;a href="http://forums.microsoft.com/TechNet/ShowPost.aspx?PostID=2527819&amp;amp;SiteID=17"&gt;http://forums.microsoft.com/TechNet/ShowPost.aspx?PostID=2527819&amp;amp;SiteID=17&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.microsoft.com/communities/newsgroups/en-us/default.aspx?dg=microsoft.public.biztalk.general&amp;amp;tid=97564c53-15ee-4a8e-997c-72f8c2520241"&gt;http://www.microsoft.com/communities/newsgroups/en-us/default.aspx?dg=microsoft.public.biztalk.general&amp;amp;tid=97564c53-15ee-4a8e-997c-72f8c2520241&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The main problem with oracle procedure, it will need an output parameter to return a resultset, and I was not able to think a way to work with this parameter in the Poll SQL Statement.&lt;br /&gt;&lt;br /&gt;So several days ago, i stumbled on a post (I forgot where from) but someone from the post mentioned about using function in the select statement like this below :&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;br /&gt;Select packagename.functionname from dual;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This gave me an idea, because it will just like a normal select query which returns row(s).&lt;br /&gt;&lt;br /&gt;So the next thing to do is to have the DML statement to update the selected rows, I found &lt;a href="http://www.unix.org.ua/orelly/oracle/guide8i/ch02_02.htm"&gt;a way&lt;/a&gt;  to allow DML Statement in the function, is to use PRAGMA AUTONOMOUS_TRANSACTION which will summon its own transaction so it will not affect the caller transaction.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Part 4 - The Solutions&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Solution 1 - Get one row&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;1. Create an oracle function to select and update the row then return the unique key&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;CREATE OR REPLACE FUNCTION pollonejob RETURN NUMBER IS&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;  PRAGMA AUTONOMOUS_TRANSACTION;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;  JOBID NUMBER;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;BEGIN&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;  SELECT JOB_ID&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    INTO JOBID&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;  FROM JOBS&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;  WHERE JOB_STATUS = 'NEW'&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;      AND ROWNUM = 1 FOR UPDATE;&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;  -- This is to test the lock only&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;  --DBMS_LOCK.SLEEP(3);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;  UPDATE JOBS&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    SET JOB_STATUS = 'POLLED'&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;  WHERE JOB_ID = JOBID;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;  COMMIT;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;  RETURN JOBID;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;END;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;/&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;2. Setup the Poll SQL Statement :&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;SELECT pollonejob AS JOBID FROM dual&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Or, if you can do it like this to retrieve more information based on the key :&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;SELECT job_id, job_desc, job_status FROM jobs WHERE job_id = pollonejob &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;Solution 2 - Get more rows&lt;/span&gt;&lt;br /&gt;1. Create an oracle type as the container for the unique keys&lt;br /&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;CREATE OR REPLACE TYPE number_key_t is TABLE OF NUMBER&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;2. Create an oracle function returning the previously created type with a parameter to speficy how many rows to retrieve&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;CREATE OR REPLACE FUNCTION pollmultiplejob(noOfRows NUMBER) RETURN NUMBER_KEY_T IS&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;  PRAGMA AUTONOMOUS_TRANSACTION;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;  l_data NUMBER_KEY_T := NUMBER_KEY_T();&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;BEGIN&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;  SELECT JOB_ID&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;  BULK COLLECT &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    INTO l_data&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;  FROM JOBS&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;  WHERE JOB_STATUS = 'NEW'&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;      AND ROWNUM &lt;= noOfRows FOR UPDATE;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;  -- This is to test the locking only&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;  --DBMS_LOCK.SLEEP(3);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;  UPDATE JOBS&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    SET JOB_STATUS = 'POLLED'&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;  WHERE JOB_ID IN (SELECT column_value FROM TABLE(CAST(l_data AS NUMBER_KEY_T)));&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;  COMMIT;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;  RETURN l_data;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;END;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;/&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;3. Setup the Poll SQL Statement :&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;SELECT column_value FROM TABLE(CAST(pollmultiplejob(20) AS NUMBER_KEY_T))&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Or, if you can do it like this to retrieve more information based on the key :&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;SELECT job_id, job_desc, job_status &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;FROM jobs WHERE job_id IN (SELECT column_value FROM TABLE(CAST(pollmultiplejob(20) AS NUMBER_KEY_T)))&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;&lt;/span&gt;Notes :&lt;br /&gt;1. You do not need the Post Poll SQL Statement anymore, since when the Poll SQL Statement is executed, the rows will be updated in the same time it polls&lt;br /&gt;2. Avoid setting the poll interval less than the time to execute the polling query, for example if the polling takes 30 seconds to complete, it's better to set the poll interval 40 seconds or more, consider the future data growth&lt;br /&gt;3. As the function will update the data when being called in the select query, please do handle that more carefully by giving more meaningful function name, so everyone will know that the function will not only retrieve the data but also update the rows in the same time.&lt;br /&gt;&lt;br /&gt;I have tested this with one receive location for several days now and it seems that they are working fine as expected :)&lt;br /&gt;&lt;br /&gt;I'm just glad that I have this workaround or you might say that this is a bit hack :P but it did solve my problem and work for Oracle Adapter with ODBC, and i hope it will be useful for you guys as well.&lt;br /&gt;&lt;br /&gt;**Update** I have tried creating 5 receive locations calling the same function and there were no duplicate poll :D&lt;br /&gt;However, there is a flaw, the FOR UPDATE statement may not work as expected when trying to poll the data sequentially where in oracle you will need to have a sub query like below :&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;SELECT JOB_ID&lt;br /&gt;  BULK COLLECT&lt;br /&gt;  INTO l_data&lt;br /&gt;FROM JOBS&lt;br /&gt;WHERE JOB_ID IN (&lt;br /&gt;  SELECT JOB_ID&lt;br /&gt;  FROM (&lt;br /&gt;    SELECT JOB_ID&lt;br /&gt;    FROM JOBS&lt;br /&gt;    WHERE JOB_STATUS = 'NEW'&lt;br /&gt;    ORDER BY JOB_ID&lt;br /&gt;    ) A&lt;br /&gt;  WHERE ROWNUM &lt;= 1&lt;br /&gt;  )&lt;br /&gt;FOR UPDATE;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;I experienced duplicate polls with this, so make sure you test your query first for any duplicate issue.&lt;br /&gt;&lt;br /&gt;Feel free to drop any comments or questions ;)</description><link>http://bembengarifin-tech.blogspot.com/2008/04/biztalk-2006-oracle-adapter-odbc.html</link><author>noreply@blogger.com (Bembeng Arifin)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhzuAaQV46JoeHfB7P6xiJXfZghIV61qWIgRbrx0g6ktWwxsdcjKKuvlZGaxmubROFSLCmT2aQSdMjtvbL_9ysy70ugu9JWAq4B2Jz-uEgll10RZ9sLlNz-qvkjNmpEjLHNp_WQGOhHJK1Y/s72-c/ProcessTable.gif" width="72"/><thr:total>13</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3729574054547172121.post-3655300813024946405</guid><pubDate>Mon, 28 Apr 2008 02:20:00 +0000</pubDate><atom:updated>2008-04-28T10:28:51.190+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Biztalk Adapter</category><category domain="http://www.blogger.com/atom/ns#">Oracle</category><category domain="http://www.blogger.com/atom/ns#">WCF</category><title>Microsoft.ServiceModel.Channels.Common.ConnectionException: ORA-1017: invalid username/password; logon denied</title><description>This is the first problem I had with the new oracle adapter pack.&lt;br /&gt;From the error message, it is quite obvious right. But I was quite sure that I have provided the right user name and password.&lt;br /&gt;&lt;br /&gt;I found the answer &lt;a href="http://blogs.oracle.com/MingMan/stories/storyReader$46"&gt;here&lt;/a&gt;, the user name / password may be case sensitive. After providing the user name and password with the appropriate case sensitivity, it is working now. hopla ;)</description><link>http://bembengarifin-tech.blogspot.com/2008/04/microsoftservicemodelchannelscommonconn.html</link><author>noreply@blogger.com (Bembeng Arifin)</author><thr:total>4</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3729574054547172121.post-1873409464950529133</guid><pubDate>Mon, 28 Apr 2008 02:04:00 +0000</pubDate><atom:updated>2008-04-28T12:02:53.203+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Biztalk</category><category domain="http://www.blogger.com/atom/ns#">Biztalk Adapter</category><category domain="http://www.blogger.com/atom/ns#">Oracle</category><title>Installation and setup files for BizTalk 2006 R2 with Oracle Adapter Pack 3 (Evaluation Edition)</title><description>I'm currently trying BizTalk 2006 R2 with the new BizTalk Oracle Adapter Pack 3.0 (ODP.Net) to resolve the locking issue we had with the previous Oracle Adapter version with ODBC.&lt;br /&gt;&lt;br /&gt;You can grab the installation files from here :&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;a href="http://www.oracle.com/technology/software/tech/windows/odpnet/utilsoft.html"&gt;Oracle Data Access Component (ODAC)&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=a8bc3962-8932-4c73-a659-7cb1769f5841&amp;amp;DisplayLang=en"&gt;BizTalk Server 2006 R2 Evaluation Edition&lt;/a&gt; (Note: You will not be able to perform upgrade with the evaluation edition, you will need to uninstall the current BizTalk development edition first and then install the evaluation edition)&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=0f8007d7-f0c9-4169-8b9c-ba55f8f4c153&amp;amp;DisplayLang=en"&gt;WCF LOB Adapter SDK&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=f3ea0659-b0ed-4d5a-891e-53268128a5f0&amp;amp;DisplayLang=en"&gt;BizTalk Oracle Adapter Pack 3.0&lt;/a&gt; (Oracle adapter included inside)&lt;/li&gt;&lt;li&gt;&lt;a href="http://go.microsoft.com/fwlink/?LinkId=109377"&gt;BizTalk Adapter Pack: Oracle Database Adapter Samples&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;</description><link>http://bembengarifin-tech.blogspot.com/2008/04/installation-and-setup-files-for.html</link><author>noreply@blogger.com (Bembeng Arifin)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3729574054547172121.post-3495963533316730777</guid><pubDate>Tue, 22 Apr 2008 09:35:00 +0000</pubDate><atom:updated>2008-12-09T17:03:27.656+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Biztalk Adapter</category><category domain="http://www.blogger.com/atom/ns#">ODBC</category><category domain="http://www.blogger.com/atom/ns#">Oracle</category><title>FOR UPDATE statement may not work with BizTalk Server 2006 Oracle Adapter ODBC</title><description>I created a simple test console application today for testing FOR UPDATE statement using different types of component.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;1. Using ODP.Net &lt;/span&gt;&lt;span style="color: rgb(51, 51, 255); font-weight: bold;"&gt;- Working&lt;/span&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgnz0BjwEzQMyPsaZym5OOklf47qAsnVnFBV4YeO_YfV51YpXSYpRh4pMJ8c1SUZZ3khOHGmCbMEBQVw2Llkur_ge_wT6MKLhiP1V-dl6-rvoor4Aq4XmhPzzRhXh6gdlOIrVlYvMbx1yeO/s1600-h/ODP.Net+-+1.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgnz0BjwEzQMyPsaZym5OOklf47qAsnVnFBV4YeO_YfV51YpXSYpRh4pMJ8c1SUZZ3khOHGmCbMEBQVw2Llkur_ge_wT6MKLhiP1V-dl6-rvoor4Aq4XmhPzzRhXh6gdlOIrVlYvMbx1yeO/s400/ODP.Net+-+1.gif" alt="" id="BLOGGER_PHOTO_ID_5192001639090858450" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgB8gS84wsiemh-92NnCdwEbncynNqN5LG-C9DqmYVn0ryHEjdrZn-FZ-2x3jNbjerivWx3cNDQusxDPPKaDjiAUiz9sGHbOIolPHtokBKr6UEsPpQR4lLvHf4KuO1ZWexVOMESHIwVXXbd/s1600-h/ODP.Net+-+2.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgB8gS84wsiemh-92NnCdwEbncynNqN5LG-C9DqmYVn0ryHEjdrZn-FZ-2x3jNbjerivWx3cNDQusxDPPKaDjiAUiz9sGHbOIolPHtokBKr6UEsPpQR4lLvHf4KuO1ZWexVOMESHIwVXXbd/s400/ODP.Net+-+2.gif" alt="" id="BLOGGER_PHOTO_ID_5192001647680793058" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWMfrUWhpGYiZRBvqa6pHzrWoyMcUm672IfiOYVNmQPcU0NTXsDl56mMsZ3XKioVmtMbFYjkSICHSfAWub7YE2ge6J75V4EnWipAhyg-FHC3xD84hL2B2CNs-g5MCLfuxbhyphenhyphenlYbLoztzb-/s1600-h/ODP.Net+-+3.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWMfrUWhpGYiZRBvqa6pHzrWoyMcUm672IfiOYVNmQPcU0NTXsDl56mMsZ3XKioVmtMbFYjkSICHSfAWub7YE2ge6J75V4EnWipAhyg-FHC3xD84hL2B2CNs-g5MCLfuxbhyphenhyphenlYbLoztzb-/s400/ODP.Net+-+3.gif" alt="" id="BLOGGER_PHOTO_ID_5192001651975760370" border="0" /&gt;&lt;/a&gt;&lt;span style="font-style: italic;"&gt;Note : The second execution will wait until the first execution to finish first.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;2. .Net Oracle Client &lt;span style="color: rgb(51, 51, 255);"&gt;- Working&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiB4SXdhSaWeUQpktxWmNgi53wdbuMBnJ-_ka7-O4xFaVWv_VqtqJb9LxCqsVuz8BKlxexJWK3d2F2kesx4fjiX6jqpiuKYPK7eFlj013hxHZZZDsINai1dlSUqo-jPDJJ3i-MRGJ0aL5SS/s1600-h/DotNet+-+1.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiB4SXdhSaWeUQpktxWmNgi53wdbuMBnJ-_ka7-O4xFaVWv_VqtqJb9LxCqsVuz8BKlxexJWK3d2F2kesx4fjiX6jqpiuKYPK7eFlj013hxHZZZDsINai1dlSUqo-jPDJJ3i-MRGJ0aL5SS/s400/DotNet+-+1.gif" alt="" id="BLOGGER_PHOTO_ID_5192001651975760386" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSlT0dktGvoFh1_25eMFhEFfbY0-Gd2UGHokf2dNJHYk95vUGTiUDVww_2D2gjATyw47kjLO7zsN5Aw0C30xI1zW9tqNzZd_w74oW4GdcY_6bqtZIQ2XSQZiIe-ZcMutXxZxHSbSWzPl9_/s1600-h/DotNet+-+2.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSlT0dktGvoFh1_25eMFhEFfbY0-Gd2UGHokf2dNJHYk95vUGTiUDVww_2D2gjATyw47kjLO7zsN5Aw0C30xI1zW9tqNzZd_w74oW4GdcY_6bqtZIQ2XSQZiIe-ZcMutXxZxHSbSWzPl9_/s400/DotNet+-+2.gif" alt="" id="BLOGGER_PHOTO_ID_5192001651975760402" border="0" /&gt;&lt;/a&gt;&lt;span style="font-style: italic;"&gt;Note : A slight different between odp.net and .net oracle client is that the second will wait until the first program ends, so eventhough the first program has finished the execution, it was still waiting until i close the first program, i suspect there is a different transaction handling between them.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;3. ODBC &lt;span style="color: rgb(255, 0, 0);"&gt;- Not working&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlOxWyuS307Ovn7dAMWOT-FQOxZxe2DEFYGp70arNAyLNg9gVy-2v0kN_tjqyZMfZK2DAN69MOZcibhImsHpPU-gH1Q2HVH6r0xY3DUJsNW1Om99L4zT0Bei7XaQkERlicAxNjLBcXtGov/s1600-h/ODBC+-+1.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlOxWyuS307Ovn7dAMWOT-FQOxZxe2DEFYGp70arNAyLNg9gVy-2v0kN_tjqyZMfZK2DAN69MOZcibhImsHpPU-gH1Q2HVH6r0xY3DUJsNW1Om99L4zT0Bei7XaQkERlicAxNjLBcXtGov/s400/ODBC+-+1.gif" alt="" id="BLOGGER_PHOTO_ID_5192001999868111394" border="0" /&gt;&lt;/a&gt;&lt;span style="font-style: italic;"&gt;Note : Quite a surprising result, but as we expected. They seems to ignore the FOR UPDATE statement.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Then I found these information at MSDN and oracle sites for ODBC :&lt;br /&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/ms711792%28VS.85%29.aspx"&gt;http://msdn2.microsoft.com/en-us/library/ms711792(VS.85).aspx&lt;/a&gt;&lt;br /&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/ms713566%28VS.85%29.aspx"&gt;http://msdn2.microsoft.com/en-us/library/ms713566(VS.85).aspx&lt;/a&gt;&lt;br /&gt;&lt;a href="http://forums.oracle.com/forums/thread.jspa?threadID=607056&amp;amp;tstart=60"&gt;http://forums.oracle.com/forums/thread.jspa?threadID=607056&amp;amp;tstart=60&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.oracle.com/technology/software/tech/windows/odbc/htdocs/ODBCFAQ.pdf"&gt;http://www.oracle.com/technology/software/tech/windows/odbc/htdocs/ODBCFAQ.pdf&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;It says that before the statement is passed to the driver, the FOR UPDATE clause will be removed first and this seems to apply not only for Oracle ODBC, but as a standard ODBC Programming reference.&lt;br /&gt;&lt;br /&gt;My conclusion : As long as we're using Oracle Adapter with ODBC, we'll stuck with this unless we use the new Oracle WCF LOB Adapter with ODP.Net which requires BizTalk Server 2006 R2 and .Net Framework 3.0.&lt;br /&gt;&lt;br /&gt;Update : Below is the query result which displays the executed queries in the oracle, see that the query for TestOracleLock.exe (2nd row) didn't have the FOR UPDATE statement which I specified in the code earlier.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjPvyc9Xq0IL1JP9LezpWaxsZJhrR5ui_ML_sM7ezkPSqPsrpLNuo5bQEJ0Zb6ZmnaT8SYmYY26uWd9o_jaouWbSsJ9Ph8RqXbotc8gvgoQe7R6UMH8-HpEHDk-ijsAzMBjIsj60Ou7kSl/s1600-h/SQLTOOLS.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjPvyc9Xq0IL1JP9LezpWaxsZJhrR5ui_ML_sM7ezkPSqPsrpLNuo5bQEJ0Zb6ZmnaT8SYmYY26uWd9o_jaouWbSsJ9Ph8RqXbotc8gvgoQe7R6UMH8-HpEHDk-ijsAzMBjIsj60Ou7kSl/s400/SQLTOOLS.gif" alt="" id="BLOGGER_PHOTO_ID_5192288925158320690" border="0" /&gt;&lt;/a&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-size:100%;"&gt;You can use this query below to get the result above :&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family: courier new;"&gt;Select sql_text, module, first_load_time, last_load_time, users_opening, users_executing&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;From v$SQL&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Where last_load_time != ' '&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Order By last_load_time DESC;&lt;/span&gt;&lt;/span&gt;</description><link>http://bembengarifin-tech.blogspot.com/2008/04/for-update-statement-may-not-work-with.html</link><author>noreply@blogger.com (Bembeng Arifin)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgnz0BjwEzQMyPsaZym5OOklf47qAsnVnFBV4YeO_YfV51YpXSYpRh4pMJ8c1SUZZ3khOHGmCbMEBQVw2Llkur_ge_wT6MKLhiP1V-dl6-rvoor4Aq4XmhPzzRhXh6gdlOIrVlYvMbx1yeO/s72-c/ODP.Net+-+1.gif" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3729574054547172121.post-8864429497307867192</guid><pubDate>Thu, 03 Apr 2008 09:14:00 +0000</pubDate><atom:updated>2008-12-09T17:03:27.834+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Google Gears</category><category domain="http://www.blogger.com/atom/ns#">Google Notebook</category><category domain="http://www.blogger.com/atom/ns#">Google Reader</category><category domain="http://www.blogger.com/atom/ns#">Podcast</category><category domain="http://www.blogger.com/atom/ns#">RSS</category><category domain="http://www.blogger.com/atom/ns#">RSSReader</category><category domain="http://www.blogger.com/atom/ns#">Twitter</category><title>My Podcast List, Shared RSS Feeds, and Twitter</title><description>&lt;span style="font-weight: bold;"&gt;Podcast List&lt;/span&gt;&lt;br /&gt;If you noticed in the right section after my shared feeds, I have compiled the list of podcasts (Audio only &amp;amp; w\Video) into a shared &lt;a href="http://www.google.com/notebook"&gt;Google Notebook&lt;/a&gt;, I have put it there a week ago but I didn't have anytime yet to blog it until now.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.google.com/notebook/public/15953972163433349360/BDSfhIgoQ_bDBpYwj"&gt;&lt;img style="border: 1px none ; margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQ3D55rSQ0G-owBYp4-QZds4NFJVnYanajN8Nk6Bnkb1Nh_ffLyFLIb69_fclfxZlUCumsQRQEAO5vYlSwutUAvoigicCsbQhJUu9GaYTUav6UubRBaF0H0xII3jsC9bIlgjsCdd6Kq_46/s400/MyPodcastList.jpg" alt="" id="BLOGGER_PHOTO_ID_5185043461205692226" border="1" /&gt;&lt;/a&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;This is the podcast list which I'm currently subscribing and listening to them mostly in my daily commute to and from the office.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Shared RSS Feed&lt;/span&gt;&lt;br /&gt;I also have a Google Shared feeds at the right section or you can open it up from &lt;a href="http://www.google.com/reader/shared/06924871975542880977"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;These are the tools which I have been using in my windows mobile 6 :&lt;br /&gt;1. &lt;a href="http://viigo.com/"&gt;Viigo&lt;/a&gt; - RSS Feed&lt;br /&gt;    One great feature of Viigo is I can manage my subscription online through &lt;a href="http://myviigo.com/"&gt;My Viigo&lt;/a&gt; website&lt;br /&gt;2. &lt;a href="http://www.codeplex.com/beyondpod"&gt;BeyondPod&lt;/a&gt; - RSS Feed &amp;amp; Podcatcher&lt;br /&gt;    I only use this to subscribe my podcasts since I already have &lt;a href="http://viigo.com/"&gt;Viigo&lt;/a&gt; for RSS Feed&lt;br /&gt;&lt;br /&gt;On the desktop / laptop, I'm using &lt;a href="http://www.google.com/reader/"&gt;Google Reader&lt;/a&gt; for my feed subscriptions and yes I need to sync up manually of what i have read in &lt;a href="http://viigo.com/"&gt;Viigo&lt;/a&gt; and &lt;a href="http://www.google.com/reader/"&gt;Google Reader&lt;/a&gt;, I do this because I don't have unlimited data subscription plan for my mobile. I'll probably wait until &lt;a href="http://code.google.com/apis/gears/mobile.html"&gt;Google Gears for Mobile &lt;/a&gt;can be used for &lt;a href="http://www.google.com/reader/m"&gt;Google Reader Mobile&lt;/a&gt; ;)&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;Twitter&lt;br /&gt;&lt;/span&gt;If you haven't used this, you might want to read &lt;a href="http://feeds.feedburner.com/%7Er/ScottHanselman/%7E3/254554792/TwitterTheUselessfulnessOfMicroblogging.aspx"&gt;Scott Hanselman's post&lt;/a&gt; and &lt;a href="http://scobleizer.com/2008/03/23/the-secret-to-twitter/"&gt;Robert Scoble's post&lt;/a&gt; to see whether it's worth for you to use.&lt;br /&gt;Please add &lt;a href="http://twitter.com/bembengarifin"&gt;me&lt;/a&gt; if you already have a twitter id or you have just joined ;)&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;/div&gt;</description><link>http://bembengarifin-tech.blogspot.com/2008/04/my-podcast-list-shared-rss-feeds-and.html</link><author>noreply@blogger.com (Bembeng Arifin)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQ3D55rSQ0G-owBYp4-QZds4NFJVnYanajN8Nk6Bnkb1Nh_ffLyFLIb69_fclfxZlUCumsQRQEAO5vYlSwutUAvoigicCsbQhJUu9GaYTUav6UubRBaF0H0xII3jsC9bIlgjsCdd6Kq_46/s72-c/MyPodcastList.jpg" width="72"/><thr:total>1</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3729574054547172121.post-3690165287154984466</guid><pubDate>Thu, 13 Mar 2008 04:43:00 +0000</pubDate><atom:updated>2008-07-28T09:26:24.143+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Biztalk</category><category domain="http://www.blogger.com/atom/ns#">Deployment</category><category domain="http://www.blogger.com/atom/ns#">MSBuild</category><category domain="http://www.blogger.com/atom/ns#">WMI</category><title>BizTalk Deployment with MSBuild without Custom Task</title><description>In this post, I will be discussing more on BizTalk Deployment to production environment.&lt;br /&gt;&lt;br /&gt;I just had a deployment yesterday, the scenario :&lt;br /&gt;&lt;span style="font-style: italic;"&gt;We have some bug fixes to some orchestrations which we need to apply to an existing BizTalk application in production.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I have been interested in automated BizTalk deployment since I read a post about &lt;a href="http://geekswithblogs.net/bloesgen/archive/2008/01/28/119003.aspx"&gt;Creating highly-repeatable builds and deployments&lt;/a&gt; from &lt;a href="http://geekswithblogs.net/bloesgen/Default.aspx"&gt;Brian Loesgen&lt;/a&gt;. However, &lt;a href="http://geekswithblogs.net/bloesgen/archive/2008/01/28/119003.aspx"&gt;Brian's post&lt;/a&gt; is about compilation and export of the application to MSI, and he's using a plain batch command file.&lt;br /&gt;Later I found a post about &lt;a href="http://geekswithblogs.net/sthomas/archive/2006/08/06/87272.aspx"&gt;Using MSBuild to Build and Deploy BizTalk 2006 Solutions&lt;/a&gt; from &lt;a href="http://geekswithblogs.net/sthomas/Default.aspx"&gt;Stephen W. Thomas&lt;/a&gt;. The post is more relevant to my scenario, however I found that there are some custom tasks being used to perform the deployment.&lt;br /&gt;&lt;br /&gt;I'm trying to make things simpler by using the existing tools because we have a quite strict policy for deployment and I hope with this, others can also use it without having to dig in into the custom tasks.&lt;br /&gt;&lt;br /&gt;So based on both articles, I managed to come out with a set of MSBuild files for the deployment.&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Deploy.bat : Batch command file for the IT person to run the MSBuild with it parameters (project file &amp;amp; log file)&lt;/li&gt;&lt;li&gt;Build.proj : Main project file which specifies all the steps (targets) to execute    &lt;/li&gt;&lt;li&gt;Build.properties : Definition of variables &amp;amp; collections for the deployment&lt;/li&gt;&lt;li&gt;Deploy.targets : List of steps (targets) for the deployment&lt;/li&gt;&lt;/ol&gt;Grab the files from here :&lt;br /&gt;&lt;iframe scrolling="no" marginheight="0" marginwidth="0" frameborder="0" style="width:240px;height:66px;margin:3px;padding:0;border:1px solid #dde5e9;background-color:#ffffff;" src="http://cid-41c0c9ecd9d35c8f.skydrive.live.com/embedrowdetail.aspx/Public/BizTalkDeploymentMSBuild.zip"&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;br /&gt;Scenario :&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Stop BizTalk Host Instance&lt;/li&gt;&lt;li&gt;Register Helper library to GAC&lt;/li&gt;&lt;li&gt;Stop &amp;amp; Unenlist Orchestration&lt;/li&gt;&lt;li&gt;Import MSI&lt;/li&gt;&lt;li&gt;Install MSI&lt;/li&gt;&lt;li&gt;Import Binding File&lt;/li&gt;&lt;li&gt;Start &amp;amp; Enlist Orchestration&lt;/li&gt;&lt;li&gt;Start BizTalk Host Instance&lt;/li&gt;&lt;li&gt;Copy MyWebServices update files&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt; &lt;span style="font-weight: bold; color: rgb(51, 51, 255);"&gt;Deploy.bat&lt;/span&gt;&lt;br /&gt;&lt;span style=";font-family:courier new;font-size:78%;"  &gt;&lt;pre&gt;@ECHO Starting up MS Build&lt;br /&gt;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\MSBuild.exe Build.proj /l:FileLogger,Microsoft.Build.Engine;logfile=Build.log;append=false;verbosity=diagnostic;encoding=utf-8&lt;br /&gt;&lt;/pre&gt;&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(51, 51, 255);"&gt;Build.proj&lt;/span&gt;&lt;br /&gt;&lt;span style=";font-family:courier new;font-size:78%;"  &gt;&lt;pre&gt;&amp;lt;Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="StopBizTalkServices;RegisterGAC;StopOrchestration;DeployMSI;InstallMSI;ImportBindingFile;StartOrchestration;StartBizTalkServices;DeployWS"&amp;gt;&lt;br /&gt;&amp;lt;Import Project="Build.properties" /&amp;gt;&lt;br /&gt;&amp;lt;Import Project="Deploy.targets" /&amp;gt;&lt;br /&gt;&amp;lt;/Project&amp;gt;&lt;/pre&gt;&lt;/span&gt;&lt;span style="font-style: italic;"&gt;Note: Specify the steps (targets) to execute at DefaultTargets attribute value&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-weight: bold;"&gt;Build.properties&lt;/span&gt;&lt;span style=";font-family:courier new;font-size:78%;"  &gt;&lt;br /&gt;&lt;pre&gt;&amp;lt;Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"&amp;gt;&lt;br /&gt;&amp;lt;PropertyGroup&amp;gt;&lt;br /&gt;&amp;lt;!-- Path to the .Net utilities (gacutil.exe) folder --&amp;gt;&lt;br /&gt;&amp;lt;DotNetPath&amp;gt;C:\Program Files\Microsoft.NET\SDK\v2.0\Bin\&amp;lt;/DotNetPath&amp;gt;&lt;br /&gt;&amp;lt;!-- Path to the BizTalk folder --&amp;gt;&lt;br /&gt;&amp;lt;BizTalkPath&amp;gt;C:\Program Files\Microsoft BizTalk Server 2006\&amp;lt;/BizTalkPath&amp;gt;&lt;br /&gt;&amp;lt;!-- Path to the deployment root folder --&amp;gt;&lt;br /&gt;&amp;lt;DeploymentPath&amp;gt;C:\DeploymentFolder\&amp;lt;/DeploymentPath&amp;gt;&lt;br /&gt;&amp;lt;!-- Path to the Web Services Deployment path --&amp;gt;&lt;br /&gt;&amp;lt;WSDestinationPath&amp;gt;C:\Inetpub\wwwwroot\MyWebServices\&amp;lt;/WSDestinationPath&amp;gt;&lt;br /&gt;&amp;lt;!-- Path to the build dll files --&amp;gt;&lt;br /&gt;&amp;lt;GACPath&amp;gt;$(DeploymentPath)\Common Library\&amp;lt;/GACPath&amp;gt;&lt;br /&gt;&amp;lt;!-- Path to the msi files --&amp;gt;&lt;br /&gt;&amp;lt;MSIPath&amp;gt;$(DeploymentPath)\MSI Files\&amp;lt;/MSIPath&amp;gt;&lt;br /&gt;&amp;lt;!-- Path to the binding files --&amp;gt;&lt;br /&gt;&amp;lt;BindingPath&amp;gt;$(DeploymentPath)\Binding Files\&amp;lt;/BindingPath&amp;gt;&lt;br /&gt;&amp;lt;!-- Path to the WMI script files --&amp;gt;&lt;br /&gt;&amp;lt;WMIScriptPath&amp;gt;$(DeploymentPath)\WMIScripts\&amp;lt;/WMIScriptPath&amp;gt;&lt;br /&gt;&amp;lt;!-- Name of the BizTalk Application to deploy code into --&amp;gt;&lt;br /&gt;&amp;lt;BTApplicationName&amp;gt;MyBizApp&amp;lt;/BTApplicationName&amp;gt;&lt;br /&gt;&amp;lt;!-- Bts Log File --&amp;gt;&lt;br /&gt;&amp;lt;BtsLogFile&amp;gt;BtsTask.log&amp;lt;/BtsLogFile&amp;gt;&lt;br /&gt;&amp;lt;!-- MsiExec Log File --&amp;gt;&lt;br /&gt;&amp;lt;MsiLogFile&amp;gt;MsiExec.log&amp;lt;/MsiLogFile&amp;gt;&lt;br /&gt;&amp;lt;/PropertyGroup&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;!-- List all .net items that need to be GACed --&amp;gt;&lt;br /&gt;&amp;lt;ItemGroup&amp;gt;&lt;br /&gt;&amp;lt;GacStuff Include="MyLibrary1.dll" /&amp;gt;&lt;br /&gt;&amp;lt;GacStuff Include="MyLibrary2.dll" /&amp;gt;&lt;br /&gt;&amp;lt;/ItemGroup&amp;gt;&lt;br /&gt;&amp;lt;!-- List all MSI Files --&amp;gt;&lt;br /&gt;&amp;lt;ItemGroup&amp;gt;&lt;br /&gt;&amp;lt;MSIFile Include="MyBizApp.msi" /&amp;gt;&lt;br /&gt;&amp;lt;/ItemGroup&amp;gt;&lt;br /&gt;&amp;lt;!-- List all affected BizTalk Services to restart --&amp;gt;&lt;br /&gt;&amp;lt;ItemGroup&amp;gt;&lt;br /&gt;&amp;lt;BizTalkServices Include="BizTalk Service BizTalk LOCAL : BizTalkServerApplication" /&amp;gt;&lt;br /&gt;&amp;lt;/ItemGroup&amp;gt;&lt;br /&gt;&amp;lt;!-- List all web services files to deploy --&amp;gt;&lt;br /&gt;&amp;lt;ItemGroup&amp;gt;&lt;br /&gt;&amp;lt;WSFiles Include="$(DeploymentPath)\MyWebServices\**\*.*" /&amp;gt;&lt;br /&gt;&amp;lt;/ItemGroup&amp;gt;&lt;br /&gt;&amp;lt;/Project&amp;gt;&lt;/pre&gt;&lt;/span&gt;&lt;span style="font-style: italic;"&gt;Note: I grouped the deployment files into certain folders to make it easier to understand :&lt;/span&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;span style="font-style: italic;"&gt;Common Library folder -&gt; Consists of helper dlls which needs to be GAC-ed seperately&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-style: italic;"&gt;MSI Files folder -&gt; BizTalk generated MSI Files to import and to install&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-style: italic;"&gt;Binding Files folder -&gt; Binding Files to import&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-style: italic;"&gt;WMIScripts folder -&gt; Consists of vbs files to stop (StopOrch.vbs) &amp;amp; start (EnlistOrch.vbs) the orchestrations, you can find the vbs files under the C:\Program Files\Microsoft BizTalk Server 2006\SDK\Samples\Admin\WMI &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-style: italic;"&gt;MyWebServices folder -&gt; Consists of updates for the existing MyWebServices &lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;span style="font-weight: bold; color: rgb(51, 51, 255);"&gt;Deploy.targets&lt;/span&gt;&lt;br /&gt;&lt;span style=";font-family:courier new;font-size:78%;"  &gt;&lt;pre&gt;&amp;lt;Project  xmlns="http://schemas.microsoft.com/developer/msbuild/2003"&amp;gt;&lt;br /&gt;&amp;lt;!-- START DEPLOYMENT --&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;!-- Stop BizTalk Services --&amp;gt;&lt;br /&gt;&amp;lt;Target Name="StopBizTalkServices" &amp;gt;&lt;br /&gt;&amp;lt;Exec Command="NET STOP "%(BizTalkServices.Identity)"" ContinueOnError="true" /&amp;gt;&lt;br /&gt;&amp;lt;Message text="Stopped BizTalk Services : %(BizTalkServices.Identity)" /&amp;gt;&lt;br /&gt;&amp;lt;/Target&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;!-- Register GAC --&amp;gt;&lt;br /&gt;&amp;lt;Target Name="RegisterGAC" &amp;gt;&lt;br /&gt;&amp;lt;Exec Command=""$(DotNetPath)gacutil.exe" /i "$(GACPath)%(GacStuff.Identity)" /f" /&amp;gt;&lt;br /&gt;&amp;lt;Message text="Registered DLLs to GAC : %(GACStuff.Identity)" /&amp;gt;&lt;br /&gt;&amp;lt;/Target&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;!-- Stop Orchestration : The process sequence matters because of the dependency --&amp;gt;&lt;br /&gt;&amp;lt;Target Name="StopOrchestration" &amp;gt;&lt;br /&gt;&amp;lt;Exec Command="cscript.exe $(WMIScriptPath)StopOrch.vbs [Orchestration name 1] [Assembly Name 1] Unenlist" /&amp;gt;&lt;br /&gt;&amp;lt;Exec Command="cscript.exe $(WMIScriptPath)StopOrch.vbs [Orchestration name 2] [Assembly Name 2] Unenlist" /&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;Message text="Stopped and Unenlisted Orchestrations" /&amp;gt;&lt;br /&gt;&amp;lt;/Target&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;!-- Deploy MSI --&amp;gt;&lt;br /&gt;&amp;lt;Target Name="DeployMSI" &amp;gt;&lt;br /&gt;&amp;lt;Exec Command=""$(BizTalkPath)BtsTask.exe" ImportApp /Package:"$(MSIPath)\%(MSIFile.Identity)" /ApplicationName:$(BTApplicationName) /Overwrite &amp;gt;&amp;gt; $(BtsLogFile)" /&amp;gt;&lt;br /&gt;&amp;lt;Message text="Deployed $(BTApplicationName)" /&amp;gt;&lt;br /&gt;&amp;lt;/Target&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;!-- Install MSI in quite mode --&amp;gt;&lt;br /&gt;&amp;lt;Target Name="InstallMSI" DependsOnTargets="DeployMSI"&amp;gt;&lt;br /&gt;&amp;lt;Exec Command="MsiExec.exe /i "$(MSIPath)\%(MSIFile.Identity)" /quiet /l+ $(MsiLogFile)"  /&amp;gt;&lt;br /&gt;&amp;lt;Message text="Installed %(MSIFile.Identity)" /&amp;gt;&lt;br /&gt;&amp;lt;/Target&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;!-- Import Binding File --&amp;gt;&lt;br /&gt;&amp;lt;Target Name="ImportBindingFile" DependsOnTargets="DeployMSI"&amp;gt;&lt;br /&gt;&amp;lt;Exec Command=""$(BizTalkPath)BtsTask.exe" ImportBindings -Source:"$(BindingPath)$(BTApplicationName).BindingInfo.xml" -ApplicationName:$(BTApplicationName) &amp;gt;&amp;gt; $(BtsLogFile)" /&amp;gt;&lt;br /&gt;&amp;lt;Message text="Imported Binding for $(BTApplicationName)" /&amp;gt;&lt;br /&gt;&amp;lt;/Target&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;!-- Start Orchestration : The process sequence matters because of the dependency --&amp;gt;&lt;br /&gt;&amp;lt;Target Name="StartOrchestration" DependsOnTargets="DeployMSI;ImportBindingFile"&amp;gt;&lt;br /&gt;&amp;lt;Exec Command="cscript.exe $(WMIScriptPath)EnlistOrch.vbs [Orchestration Name 2] [Assembly Name 2] Start" /&amp;gt;&lt;br /&gt;&amp;lt;Exec Command="cscript.exe $(WMIScriptPath)EnlistOrch.vbs [Orchestration Name 1] [Assembly Name 1] Start" /&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;Message text="Enlisted and Started Orchestrations" /&amp;gt;&lt;br /&gt;&amp;lt;/Target&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;!-- Start BizTalk Services --&amp;gt;&lt;br /&gt;&amp;lt;Target Name="StartBizTalkServices" DependsOnTargets="DeployMSI;ImportBindingFile;StopOrchestration"&amp;gt;&lt;br /&gt;&amp;lt;Exec Command="NET START "%(BizTalkServices.Identity)"" ContinueOnError="true" /&amp;gt;&lt;br /&gt;&amp;lt;Message text="Started BizTalk Services : %(BizTalkServices.Identity)" /&amp;gt;&lt;br /&gt;&amp;lt;/Target&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;!-- Update the Web Services --&amp;gt;&lt;br /&gt;&amp;lt;Target Name="DeployWS"&amp;gt;&lt;br /&gt;&amp;lt;Copy SourceFiles="@(WSFiles)" DestinationFiles="@(WSFiles-&amp;gt;'$(WSDestinationPath)%(RecursiveDir)%(Filename)%(Extension)')" /&amp;gt;&lt;br /&gt;&amp;lt;Message text="Deployed Web Services" /&amp;gt;&lt;br /&gt;&amp;lt;/Target&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;!-- END DEPLOYMENT --&amp;gt;&lt;br /&gt;&amp;lt;/Project&amp;gt;&lt;/pre&gt;&lt;/span&gt;&lt;span style="font-style: italic;"&gt;Note: As you see above, I only use existing tasks such as exec and copy for the deployment and I use BtsTask.exe for BizTalk deployment. For the complete list of MS Build tasks, you can find it &lt;/span&gt;&lt;a style="font-style: italic;" href="http://msdn2.microsoft.com/en-us/library/7z253716.aspx"&gt;here&lt;/a&gt;&lt;span style="font-style: italic;"&gt;.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;After executing the deploy.bat, there will be 3 log files :&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Build.log -&gt; MSBuild generated log file which contains all the deployment activities&lt;/li&gt;&lt;li&gt;BtsTask.log -&gt; BtsTask.exe generated log file for BizTalk deployment&lt;/li&gt;&lt;li&gt;MsiExec.log -&gt; MsiExec.exe generated log file for BizTalk Msi File installation&lt;/li&gt;&lt;/ol&gt;Notes:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;GACUtil.exe may not be available in the server if the SDK is not installed, I did it manually using the Microsoft .NET Framework 2.0 Configuration yesterday.&lt;/li&gt;&lt;li&gt;cscript.exe will not have return success or fail to MSBuild so it will not stop when there is any error.&lt;/li&gt;&lt;li&gt;There is one tweak on the EnlistOrch.vbs, by default it will try to start and enlist the orchestration with the default host. Since I'm not using the default host for my application, i comment out the line 90 -&gt; &lt;span style="color: rgb(51, 51, 255);font-family:courier new;" &gt;Inst.Enlist(HostName)&lt;/span&gt; and use only &lt;span style="color: rgb(51, 51, 255);font-family:courier new;" &gt;Inst.Enlist&lt;/span&gt; &lt;/li&gt;&lt;li&gt;I haven't tried yet, but the Build.properties and Deploy.target files should be able to be merged into the Build.proj itself, however by splitting them into 2 files, they are easier to maintain and understand as well.&lt;/li&gt;&lt;/ul&gt;Why bother ourselves to use MSBuild than to use plain batch command for this like &lt;a href="http://geekswithblogs.net/bloesgen/archive/2008/01/28/119003.aspx"&gt;Brian's post&lt;/a&gt;?&lt;br /&gt;&lt;ol&gt;&lt;li&gt;MSBuild provide built-in file log mechanism for the whole execution process&lt;/li&gt;&lt;li&gt;Better and clearer dependency specification between tasks&lt;/li&gt;&lt;li&gt;MSBuild comes with .Net Framework 2.0 which means that every BizTalk server should have MSBuild installed without any additional installation efforts.&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;My wish list :&lt;br /&gt;&lt;ol&gt;&lt;li&gt;MSBuild provides new Built-in task for GACUtil&lt;/li&gt;&lt;li&gt;BizTalk Server provides add-on BizTalk tasks for MSBuild&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;Please leave questions or comments if you have any ;)&lt;br /&gt;Hope this helps :)</description><link>http://bembengarifin-tech.blogspot.com/2008/03/biztalk-deployment-with-msbuild.html</link><author>noreply@blogger.com (Bembeng Arifin)</author><thr:total>2</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3729574054547172121.post-4880121502300729797</guid><pubDate>Fri, 07 Mar 2008 04:13:00 +0000</pubDate><atom:updated>2008-03-07T14:40:19.468+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Non Technical</category><category domain="http://www.blogger.com/atom/ns#">Opinions</category><category domain="http://www.blogger.com/atom/ns#">YAGNI</category><title>User Interaction, Behavior, and Feedback</title><description>&lt;span style="font-style: italic;"&gt;Warning : Non technical stuff content ;)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I stumbled upon &lt;a href="http://www.codinghorror.com/blog/"&gt;Jeff Atwood&lt;/a&gt;'s blog post on &lt;a href="http://www.codinghorror.com/blog/archives/001066.html"&gt;UsWare vs. ThemWare&lt;/a&gt; 2 days ago. The terms was originally from &lt;a href="http://www.ericsink.com/index.html"&gt;Eric Sink&lt;/a&gt;'s blog post on &lt;a href="http://www.ericsink.com/articles/Yours_Mine_Ours.html"&gt;Yours, Mine and Ours&lt;/a&gt;. It is a good advice and a very relevant on what we do today as a software developer.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;User Interaction&lt;/span&gt;&lt;br /&gt;In the first project as a software developer, I was indeed developing software as ThemWare. Why? Because I only knew how to code and test the software with my very own perspective which was more less as long as this page is working (able to display, save, edit, and delete), I'm done with it :p&lt;br /&gt;Then as the program went live, I was there sitting beside the user using the application to make sure everything is going fine.&lt;br /&gt;Well, guess what, the application caused a very long queue of the customers in peak hours and i could see from their faces that they were not tolerant for waiting that long :p&lt;br /&gt;Reason : it was a new application for the users, even though they had the trainings but the load are obviously different compared to peak hours, "panic" mode is ON and made things worse when you can't do things as fast as before using the new application.&lt;br /&gt;At the end of the day, I got some "major" feedbacks from the users which i can clearly understand because i was sitting with them whole day :&lt;br /&gt;1. The page navigation was bad, too many steps to follow in order to do a transaction&lt;br /&gt;2. All have to be done by mouse, they need keyboard short cuts and use tabs so they can do one transaction faster.&lt;br /&gt;3. Too many post backs in the page and the page is too long, so they have to scroll down again and again.&lt;br /&gt;&lt;br /&gt;So I did a quick major changes based on those things and that really helped the users afterwards and i was really glad that my program can really help to increase their productivity, that is why we create softwares right? To increase job productivity and efficiency :)&lt;br /&gt;&lt;br /&gt;From those experiences, i keep trying to also see things from a user perspective when developing applications, making it as easy as possible to do things.&lt;br /&gt;&lt;br /&gt;So don't just make the things work, but make them &lt;span style="font-weight: bold;"&gt;USABLE&lt;/span&gt; as well by creating the UsWare software  ;)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;User Behavior&lt;/span&gt;&lt;br /&gt;I believe that the assumption that the user will use the program as we expect is totally &lt;span style="font-weight: bold;"&gt;WRONG. &lt;/span&gt;For example, as the developer of the program X, I certainly know that after I do (A), I won't do (B). But that may not apply to the users, if we don't put any validations or clear steps to prevent that, it is always a big chance that they will actually do that ;p&lt;br /&gt;It is always hard to predict the user behavior, but adding some thoughts of the variation of possible use case scenarios will be very helpful :) It will be much more costly to handle problems when it happens in production later.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;User Feedback&lt;/span&gt;&lt;br /&gt;I feel that it is very important to listen to user feedback, because they are the one who are using the software. However, do make a deep consideration or have some discussions first before following and making any changes.&lt;br /&gt;Reasons :&lt;br /&gt;1. There are some cases where after a change has been done, then turns out that it makes things worse or at least not helping.&lt;br /&gt;2. YAGNI (You ain't gonna need it) or you ain't gonna use it&lt;br /&gt;But in any cases, if you receive feedbacks from the users, that means a good thing, they are really using the application :)&lt;br /&gt;&lt;br /&gt;For me, I always feel really happy when a user come back to me and said "Thank you, you just make my life easier with that" :)</description><link>http://bembengarifin-tech.blogspot.com/2008/03/user-interaction-behavior-and-feedback.html</link><author>noreply@blogger.com (Bembeng Arifin)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3729574054547172121.post-4727627000132264038</guid><pubDate>Mon, 03 Mar 2008 06:37:00 +0000</pubDate><atom:updated>2008-03-03T15:33:00.283+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Expresso</category><category domain="http://www.blogger.com/atom/ns#">Regex</category><title>Regular Expression / RegEx with Expresso</title><description>I'm not a RegEx expert :P I'm using RegEx for some simple validations, creating scripts and editing some string.&lt;br /&gt;&lt;br /&gt;I remembered the first time i read a RegEx expression a couple of years ago, i said to my self, "WOW, this really looks like an encrypted string rather than an expression" :P&lt;br /&gt;&lt;br /&gt;What i want to share here is that several months ago, I stumbled upon &lt;a href="http://www.ultrapico.com/Expresso.htm"&gt;Expresso&lt;/a&gt;, it is a development tool for regex, this is a powerful stuff, there are tons of &lt;a href="http://www.ultrapico.com/Expresso.htm"&gt;features&lt;/a&gt; and library resources inside and the authors from &lt;a href="http://www.ultrapico.com/"&gt;Ultrapico&lt;/a&gt; is kind enough to give away the tool for free :)&lt;br /&gt;&lt;br /&gt;So nowadays, every time i need to create a RegEx expression, i always open up Expresso, test that my RegEx expression (plus the replacement string) is working as expected, then i deploy the expression into the code. Testing the results is much easier and faster than ever ;)&lt;br /&gt;&lt;br /&gt;If you do need to work with RegEx, i really suggest you check it out ;)</description><link>http://bembengarifin-tech.blogspot.com/2008/03/regular-expression-regex-with-expresso.html</link><author>noreply@blogger.com (Bembeng Arifin)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3729574054547172121.post-6531864376944422358</guid><pubDate>Fri, 29 Feb 2008 04:43:00 +0000</pubDate><atom:updated>2008-12-09T17:03:29.231+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Biztalk</category><category domain="http://www.blogger.com/atom/ns#">Orchestration</category><category domain="http://www.blogger.com/atom/ns#">Role Link</category><category domain="http://www.blogger.com/atom/ns#">WebServices</category><title>Application (Message) Based Routing in BizTalk Orchestration</title><description>This may not be a common scenario, but a few weeks ago, I was given this requirement :&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;If a message comes from Application 1, please send it to Web Service A in Server X, if it comes from Application 2, please send it to Web Service A in Server Y, so on and so forth.&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5itoT29cjAIxbsTwH9pnE0rovYjx4Ejc_U6TLH_ijY72wO4oMRLp2Qolfm8mImIOpalbNf4IhSMupV3kyJ7OlM9CILL_9W92GQT0Z4UskEOJrPZcEGApyLwngkXu-mo2AwKo9QFLVKiir/s1600-h/RoleLink-Overview.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5itoT29cjAIxbsTwH9pnE0rovYjx4Ejc_U6TLH_ijY72wO4oMRLp2Qolfm8mImIOpalbNf4IhSMupV3kyJ7OlM9CILL_9W92GQT0Z4UskEOJrPZcEGApyLwngkXu-mo2AwKo9QFLVKiir/s400/RoleLink-Overview.jpg" alt="" id="BLOGGER_PHOTO_ID_5172268749075097122" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Notes : Web Services A is a same webservices deployed on both Server X and Server Y&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;What are the purposes of having this requirement?&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Development :&lt;br /&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;We have numbers of projects which may be developed in different development servers but for the BizTalk parts, they are all deployed in a single BizTalk Development box. When we're calling the a particular web services, it is possible that Project A will use Development Server A and Project B will use Development Server B.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;Production :&lt;/li&gt;&lt;ul&gt;&lt;li&gt;For Load management purpose, we can point Application 1 calls to Web Server A and other Application calls to Web Server B.&lt;/li&gt;&lt;/ul&gt;&lt;/ol&gt;&lt;br /&gt;In BizTalk, we can do it this way below, however since Web Service A in Server X and Server Y are actually a same web services, BizTalk will not be able to process the messages because they will have same namespace and same schema information. Unless you want to use different pipelines for each send port, imagine if you have 10 or more applications, do you really want to create additional custom pipelines for each of them :P&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjFxfQx3LynN_euEC4a6C_-SjSaH02kA_MU0jvP5fj4wEZUxa9P1AbGd3fix0wKS9I2yxrjZsr7CGUZZE19P2vhcn8pcSHM-IAYMasrxEI6HQHV_EeDYLcU7jKvFUj1CBJ8qhjdeojQ-H6/s1600-h/RoleLink-Solution1.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjFxfQx3LynN_euEC4a6C_-SjSaH02kA_MU0jvP5fj4wEZUxa9P1AbGd3fix0wKS9I2yxrjZsr7CGUZZE19P2vhcn8pcSHM-IAYMasrxEI6HQHV_EeDYLcU7jKvFUj1CBJ8qhjdeojQ-H6/s400/RoleLink-Solution1.jpg" alt="" id="BLOGGER_PHOTO_ID_5172270488536852034" border="0" /&gt;&lt;/a&gt;To solve the namespace  and schema issue, we can create a common orchestration which can be shared / called by the applications. But wait, there's only 1 send port can be defined in this solution, we still want Application 1 to call Web Services A in Server X and Application 2 to call Web Services A in Server Y.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4vd0fQEhMqxr_kXRn1DTgfD_x9NegVDq_UuBb3QXArwG6KhHlO-s_kVPcyN37sAlKRPUTMYrWWk4tp6Z_vNEi-jjfOgtdWG940T73bkvYab7utuJXlyhxOGMOUMGS-4IUaHXtVXExS7A1/s1600-h/RoleLink-Solution2.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4vd0fQEhMqxr_kXRn1DTgfD_x9NegVDq_UuBb3QXArwG6KhHlO-s_kVPcyN37sAlKRPUTMYrWWk4tp6Z_vNEi-jjfOgtdWG940T73bkvYab7utuJXlyhxOGMOUMGS-4IUaHXtVXExS7A1/s400/RoleLink-Solution2.jpg" alt="" id="BLOGGER_PHOTO_ID_5172273185776313938" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Now, this is where Role Link comes to play. If you see the diagram below, between the Orchestration and the send ports, there is a Role Link Provider. This is just like an additional routing layer which we can use instead of correlating the orchestration and the send port directly.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtCi5yWh1Igf24TsLpi6TVX8oja9RP7f34Hx3L25As4PstQ9x0Qs0bT6kyCcIhwdCvFQMnMkID6stE2H5IOWTrmBtb8ShfvW48zSvihHMu8PZm30a6WDFezn6SSckghLpTq5nqwitXEGjQ/s1600-h/RoleLink-Solution3.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtCi5yWh1Igf24TsLpi6TVX8oja9RP7f34Hx3L25As4PstQ9x0Qs0bT6kyCcIhwdCvFQMnMkID6stE2H5IOWTrmBtb8ShfvW48zSvihHMu8PZm30a6WDFezn6SSckghLpTq5nqwitXEGjQ/s400/RoleLink-Solution3.jpg" alt="" id="BLOGGER_PHOTO_ID_5172276454246426210" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;How to use Role Link is quite similar to regular Send port, you may notice when clicking on the port surface, there is New Role Link option ;) and you will need to choose between Provider &amp;amp; Consumer which is basically to define whether you will be sending message through this port or receiving message through this port.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfPLBmaM1WaaBSZKoSGd2WI27TovEIzRePJFlrKn4a4SffLdkgw-W8zudZ__0nmXrvoMNNQCdXlSCgC4-nUPgXEeUOqS0IS35VVj7nZz_NRIbWnH1_jh2LM5jkAO13jdHjLKwM0CAp1iqQ/s1600-h/RoleLink-Option.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfPLBmaM1WaaBSZKoSGd2WI27TovEIzRePJFlrKn4a4SffLdkgw-W8zudZ__0nmXrvoMNNQCdXlSCgC4-nUPgXEeUOqS0IS35VVj7nZz_NRIbWnH1_jh2LM5jkAO13jdHjLKwM0CAp1iqQ/s400/RoleLink-Option.jpg" alt="" id="BLOGGER_PHOTO_ID_5172277978959816306" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;The next question will be how to route the message?&lt;br /&gt;&lt;ol&gt;&lt;li&gt;We will need to have a value in the message to differentiate where this message comes from and should be routed into&lt;/li&gt;&lt;li&gt;We define the destination party before we send the message, e.g :&lt;br /&gt;&lt;span style="font-size:78%;"&gt;&lt;span style="font-family:courier new;"&gt;varDestinationPartyName = HelperClass.&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:78%;"&gt;&lt;span style="font-family:courier new;"&gt;GetDestinationPartyName&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:78%;"&gt;&lt;span style="font-family:courier new;"&gt;(partyName);&lt;br /&gt;send_port1(Microsoft.XLANGs.BaseTypes.DestinationParty) = new Microsoft.XLANGs.BaseTypes.Party(&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:78%;"&gt;&lt;span style="font-family:courier new;"&gt;varDestinationPartyName&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:78%;"&gt;&lt;span style="font-family:courier new;"&gt;,"OrganizationName");&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;We create new Party with the Organization name that we define, e.g : Application 1, Application 2, etc.&lt;/li&gt;&lt;li&gt;After deployed the orchestration, we should be able to find the provider we defined in the orchestration in the Role Links folder under Orchestrations folder (BizTalk Administration Console)&lt;/li&gt;&lt;li&gt;Click on the provider to open the the window. In this window, we can bind the party and the send ports. For illustration :&lt;/li&gt;&lt;ul&gt;&lt;li&gt;Party : Application 1, Logical Port : send_port1, Physical Port : sp_WSA_ServerX&lt;/li&gt;&lt;li&gt;Party : Application 2, Logical Port : send_port1, Physical Port : sp_WSA_ServerY&lt;/li&gt;&lt;li&gt;Party : Default, Logical Port : send_port1, Physical Port : sp_WSA_ServerY&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ol&gt;&lt;span style="font-style: italic;"&gt;Notes : I provide a default party as well, so in case if i have a new application 3 and i haven't added it to the party list, it will use the default party :)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;How to check whether the party exists?&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;span style="font-size:78%;"&gt;&lt;span style="font-family:courier new;"&gt;public static string GetDestinationPartyName(string partyName)&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;    string result = Constant.DefaultDestinationPartyName;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    BtsCatalogExplorer catalog = null;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    try&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;    // Create the root object and set the connection string&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    catalog = new BtsCatalogExplorer();&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    catalog.ConnectionString = ConfigurationHelper.BizTalkMgmtDBConnectionString;&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;    // Get the requested party from the collection&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    Microsoft.BizTalk.ExplorerOM.Party party = catalog.Parties[applicationUserID];&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;    if (party == null)&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;        //Log as warning that the party could not be found&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;    else&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;        result = party.Name;&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;    }&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    catch (Exception ex)&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;    //Log the exception&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;    finally&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;    if (catalog != null)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        catalog.Dispose();&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    }&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    return result;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Notes : &lt;/span&gt;&lt;span style="font-style: italic;"&gt;Party List is not available at WMI&lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;If you're getting this exception "Microsoft.BizTalk.ExplorerOM.BtsException: The database or the database version is incompatible with the installed version of this product.", you can just use sql objects to retrieve the party name from database instead of using the BizTalkCatalogExplorer :&lt;span style="font-style: italic;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=";font-family:courier new;font-size:78%;"  &gt;cmd = new SqlCommand("select nvcName from bts_party where nvcName = @partyname", cn);&lt;br /&gt;SqlParameter prmPartyName = new SqlParameter("@partyname", applicationUserID);&lt;br /&gt;cmd.Parameters.Add(prmPartyName);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Hopefully, this interests you as it is for me ;)</description><link>http://bembengarifin-tech.blogspot.com/2008/02/application-message-based-routing-in.html</link><author>noreply@blogger.com (Bembeng Arifin)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5itoT29cjAIxbsTwH9pnE0rovYjx4Ejc_U6TLH_ijY72wO4oMRLp2Qolfm8mImIOpalbNf4IhSMupV3kyJ7OlM9CILL_9W92GQT0Z4UskEOJrPZcEGApyLwngkXu-mo2AwKo9QFLVKiir/s72-c/RoleLink-Overview.jpg" width="72"/><thr:total>1</thr:total></item></channel></rss>