<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.microsoft.co.il/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Shahar Ron</title><link>http://blogs.microsoft.co.il/blogs/shaharron/</link><description>Service friendly architectures</description><dc:language>en</dc:language><generator>CommunityServer 2007.1 (Build: 20917.1142)</generator><item><title>FIFO Thread lock</title><link>http://blogs.microsoft.co.il/blogs/shaharron/archive/2008/12/03/fifo-thread-lock.aspx</link><pubDate>Wed, 03 Dec 2008 22:34:00 GMT</pubDate><guid isPermaLink="false">b5c4f5bc-c09b-4439-a595-91a98c1847df:184156</guid><dc:creator>ShaharRon</dc:creator><slash:comments>451</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.microsoft.co.il/blogs/shaharron/rsscomments.aspx?PostID=184156</wfw:commentRss><comments>http://blogs.microsoft.co.il/blogs/shaharron/archive/2008/12/03/fifo-thread-lock.aspx#comments</comments><description>




&lt;div class="Section1"&gt;&lt;span style="FONT-SIZE:12pt;LINE-HEIGHT:115%;FONT-FAMILY:&amp;#39;Arial&amp;#39;,&amp;#39;sans-serif&amp;#39;;mso-ascii-theme-font:minor-bidi;mso-hansi-theme-font:minor-bidi;mso-bidi-font-family:Arial;mso-bidi-theme-font:minor-bidi;mso-bidi-language:HE;mso-no-proof:yes;"&gt;&lt;span style="FONT-SIZE:12pt;"&gt;Did you know that when you put lock on a code section the thread access&amp;nbsp;order is not FIFO? I mean the order that the threads will gain access to that locked code is not necessarily in the order they requested the lock?&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:12pt;LINE-HEIGHT:115%;FONT-FAMILY:&amp;#39;Arial&amp;#39;,&amp;#39;sans-serif&amp;#39;;mso-ascii-theme-font:minor-bidi;mso-hansi-theme-font:minor-bidi;mso-bidi-font-family:Arial;mso-bidi-theme-font:minor-bidi;mso-bidi-language:HE;mso-no-proof:yes;"&gt;&lt;span style="FONT-SIZE:12pt;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:12pt;"&gt;I obviously found this the hard way. It all started when one of the members in my team needed to write a web service that calls a method on a shared resource. This resource can only support one call at a time and so needed thread synchronization. The solution was obvious, he&amp;nbsp;surrounded the code that calls the method with a lock statement.&amp;nbsp;We know that the call to the shared resource takes 2 seconds and it will have no more than 10 threads calling it at the same time which means the longest a web service call will take is about 20 seconds. When we&amp;nbsp;run a test simulation we&amp;nbsp;found&amp;nbsp;we get timeouts after 30 seconds and even longer.&lt;br /&gt;&lt;br /&gt;So I did some investigation (involving writing to&amp;nbsp;a log file from everywhere in the code) and found that also most of the calls to the shared method are performed more or less in the order they come into the IIS a few are getting out of the expected queue and are performed only after more than a minute. I searched about this on the Internet and found that indeed the order by which thread synchronizations are released is not guaranteed to be&amp;nbsp;the order they were requested. You can read about it&amp;nbsp;&lt;font face="Arial"&gt; &lt;/font&gt;&lt;a href="http://osdir.com/ml/lisp.openmcl.devel/2005-10/msg00001.html"&gt;&lt;font face="Arial"&gt;here&lt;/font&gt;&lt;/a&gt;&lt;font face="Arial"&gt; and &lt;/font&gt;&lt;a href="http://www.bluebytesoftware.com/blog/CommentView,guid,a2a18456-e9f4-41ef-b0bd-406c59d9c8e8.aspx"&gt;&lt;font face="Arial"&gt;here&lt;/font&gt;&lt;/a&gt;.&lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:12pt;FONT-FAMILY:&amp;#39;Arial&amp;#39;,&amp;#39;sans-serif&amp;#39;;mso-ascii-theme-font:minor-latin;mso-hansi-theme-font:minor-latin;mso-bidi-font-family:Arial;mso-bidi-theme-font:minor-bidi;mso-ascii-font-family:Calibri;mso-hansi-font-family:Calibri;"&gt;&lt;span&gt;&lt;/span&gt; &lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:12pt;"&gt;So I wrote a lock class of my own that release threads according to the requests order. It uses a queue of ManualRestEvents. one for each thread&amp;nbsp;and when a thread release a lock it signals the next thread in the queue to be released from lock. This is obviously if there is a waiting thread.&lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:12pt;FONT-FAMILY:&amp;#39;Arial&amp;#39;,&amp;#39;sans-serif&amp;#39;;mso-ascii-theme-font:minor-latin;mso-hansi-theme-font:minor-latin;mso-bidi-font-family:Arial;mso-bidi-theme-font:minor-bidi;mso-ascii-font-family:Calibri;mso-hansi-font-family:Calibri;"&gt;&lt;span&gt;&lt;/span&gt; &lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:12pt;"&gt;&lt;br /&gt;Here is the code:&lt;/span&gt;&lt;span style="FONT-SIZE:12pt;"&gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:12pt;COLOR:blue;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;mso-bidi-language:HE;mso-no-proof:yes;"&gt;using&lt;/span&gt;&lt;span style="FONT-SIZE:12pt;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;mso-bidi-language:HE;mso-no-proof:yes;"&gt; System.Collections.Generic;&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:12pt;COLOR:blue;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;mso-bidi-language:HE;mso-no-proof:yes;"&gt;using&lt;/span&gt;&lt;span style="FONT-SIZE:12pt;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;mso-bidi-language:HE;mso-no-proof:yes;"&gt; System.Threading;&lt;/span&gt;&lt;span style="FONT-SIZE:12pt;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;mso-bidi-language:HE;mso-no-proof:yes;"&gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:12pt;COLOR:blue;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;mso-bidi-language:HE;mso-no-proof:yes;"&gt;namespace&lt;/span&gt;&lt;span style="FONT-SIZE:12pt;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;mso-bidi-language:HE;mso-no-proof:yes;"&gt; ShaharRon.Samples&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:12pt;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;mso-bidi-language:HE;mso-no-proof:yes;"&gt;{&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:12pt;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;mso-bidi-language:HE;mso-no-proof:yes;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="COLOR:blue;"&gt;public&lt;/span&gt; &lt;span style="COLOR:blue;"&gt;class&lt;/span&gt; &lt;span style="COLOR:#2b91af;"&gt;FifoLock&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:12pt;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;mso-bidi-language:HE;mso-no-proof:yes;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;{&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:12pt;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;mso-bidi-language:HE;mso-no-proof:yes;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="COLOR:green;"&gt;//Queue for the threads sync objects&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:12pt;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;mso-bidi-language:HE;mso-no-proof:yes;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="COLOR:blue;"&gt;static&lt;/span&gt; &lt;span style="COLOR:blue;"&gt;private&lt;/span&gt; &lt;span style="COLOR:#2b91af;"&gt;Queue&lt;/span&gt;&amp;lt;&lt;span style="COLOR:#2b91af;"&gt;ManualResetEvent&lt;/span&gt;&amp;gt; s_locksQueue = &lt;span style="COLOR:blue;"&gt;new&lt;/span&gt; &lt;span style="COLOR:#2b91af;"&gt;Queue&lt;/span&gt;&amp;lt;&lt;span style="COLOR:#2b91af;"&gt;ManualResetEvent&lt;/span&gt;&amp;gt;();&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:12pt;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;mso-bidi-language:HE;mso-no-proof:yes;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="COLOR:green;"&gt;//Count of threads including the non-locked one&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:12pt;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;mso-bidi-language:HE;mso-no-proof:yes;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="COLOR:blue;"&gt;static&lt;/span&gt; &lt;span style="COLOR:blue;"&gt;private&lt;/span&gt; &lt;span style="COLOR:blue;"&gt;int&lt;/span&gt; s_inProcessCount = 0;&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:12pt;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;mso-bidi-language:HE;mso-no-proof:yes;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="COLOR:green;"&gt;//Sync object&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:12pt;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;mso-bidi-language:HE;mso-no-proof:yes;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="COLOR:blue;"&gt;private&lt;/span&gt; &lt;span style="COLOR:#2b91af;"&gt;ManualResetEvent&lt;/span&gt; _manualResetEvent = &lt;span style="COLOR:blue;"&gt;new&lt;/span&gt; &lt;span style="COLOR:#2b91af;"&gt;ManualResetEvent&lt;/span&gt;(&lt;span style="COLOR:blue;"&gt;true&lt;/span&gt;);&lt;/span&gt;&lt;span style="FONT-SIZE:12pt;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;mso-bidi-language:HE;mso-no-proof:yes;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:12pt;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;mso-bidi-language:HE;mso-no-proof:yes;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:12pt;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;mso-bidi-language:HE;mso-no-proof:yes;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="COLOR:gray;"&gt;///&lt;/span&gt;&lt;span style="COLOR:green;"&gt; &lt;/span&gt;&lt;span style="COLOR:gray;"&gt;&amp;lt;summary&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:12pt;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;mso-bidi-language:HE;mso-no-proof:yes;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="COLOR:gray;"&gt;///&lt;/span&gt;&lt;span style="COLOR:green;"&gt; Call this function before starting the work to be synchronized. It will&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:12pt;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;mso-bidi-language:HE;mso-no-proof:yes;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="COLOR:gray;"&gt;///&lt;/span&gt;&lt;span style="COLOR:green;"&gt; wait to be released. The release is in the order the threads called on it.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:12pt;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;mso-bidi-language:HE;mso-no-proof:yes;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="COLOR:gray;"&gt;///&lt;/span&gt;&lt;span style="COLOR:green;"&gt; &lt;/span&gt;&lt;span style="COLOR:gray;"&gt;&amp;lt;/summary&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:12pt;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;mso-bidi-language:HE;mso-no-proof:yes;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="COLOR:blue;"&gt;public&lt;/span&gt; &lt;span style="COLOR:blue;"&gt;void&lt;/span&gt; Lock()&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:12pt;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;mso-bidi-language:HE;mso-no-proof:yes;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;{&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:12pt;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;mso-bidi-language:HE;mso-no-proof:yes;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="COLOR:blue;"&gt;lock&lt;/span&gt; (s_locksQueue)&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:12pt;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;mso-bidi-language:HE;mso-no-proof:yes;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;{&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:12pt;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;mso-bidi-language:HE;mso-no-proof:yes;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;s_inProcessCount++;&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:12pt;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;mso-bidi-language:HE;mso-no-proof:yes;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="FONT-SIZE:12pt;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;mso-bidi-language:HE;mso-no-proof:yes;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="COLOR:green;"&gt;//If other threads are running create a lock for this thread and&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:12pt;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;mso-bidi-language:HE;mso-no-proof:yes;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="COLOR:green;"&gt;//put it in the queue else just continue without locking&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:12pt;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;mso-bidi-language:HE;mso-no-proof:yes;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="COLOR:blue;"&gt;if&lt;/span&gt; (s_inProcessCount &amp;gt; 1)&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:12pt;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;mso-bidi-language:HE;mso-no-proof:yes;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;{&lt;br /&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:12pt;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;mso-bidi-language:HE;mso-no-proof:yes;"&gt;_manualResetEvent.Reset();&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:12pt;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;mso-bidi-language:HE;mso-no-proof:yes;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;s_locksQueue.Enqueue(_manualResetEvent);&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:12pt;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;mso-bidi-language:HE;mso-no-proof:yes;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;}&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:12pt;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;mso-bidi-language:HE;mso-no-proof:yes;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;}&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:12pt;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;mso-bidi-language:HE;mso-no-proof:yes;"&gt;&lt;br /&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="FONT-SIZE:12pt;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;mso-bidi-language:HE;mso-no-proof:yes;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="COLOR:green;"&gt;//Wait to be released. It will not wait if there was no other&lt;br /&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:12pt;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;mso-bidi-language:HE;mso-no-proof:yes;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="COLOR:green;"&gt;//threads and no lock was created&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:12pt;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;mso-bidi-language:HE;mso-no-proof:yes;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;_manualResetEvent.WaitOne();&lt;br /&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:12pt;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;mso-bidi-language:HE;mso-no-proof:yes;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:12pt;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;mso-bidi-language:HE;mso-no-proof:yes;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="COLOR:gray;"&gt;///&lt;/span&gt;&lt;span style="COLOR:green;"&gt; &lt;/span&gt;&lt;span style="COLOR:gray;"&gt;&amp;lt;summary&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:12pt;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;mso-bidi-language:HE;mso-no-proof:yes;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="COLOR:gray;"&gt;///&lt;/span&gt;&lt;span style="COLOR:green;"&gt; Call this function after the work to be synchronized is done to&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:12pt;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;mso-bidi-language:HE;mso-no-proof:yes;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="COLOR:gray;"&gt;///&lt;/span&gt;&lt;span style="COLOR:green;"&gt; release the next waiting thread.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:12pt;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;mso-bidi-language:HE;mso-no-proof:yes;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="COLOR:gray;"&gt;///&lt;/span&gt;&lt;span style="COLOR:green;"&gt; &lt;/span&gt;&lt;span style="COLOR:gray;"&gt;&amp;lt;/summary&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="COLOR:green;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:12pt;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;mso-bidi-language:HE;mso-no-proof:yes;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="COLOR:blue;"&gt;public&lt;/span&gt; &lt;span style="COLOR:blue;"&gt;void&lt;/span&gt; Unlock()&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:12pt;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;mso-bidi-language:HE;mso-no-proof:yes;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;{&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:12pt;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;mso-bidi-language:HE;mso-no-proof:yes;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="COLOR:blue;"&gt;lock&lt;/span&gt; (s_locksQueue)&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:12pt;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;mso-bidi-language:HE;mso-no-proof:yes;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;{&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:12pt;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;mso-bidi-language:HE;mso-no-proof:yes;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;s_inProcessCount--;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:12pt;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;mso-bidi-language:HE;mso-no-proof:yes;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="COLOR:green;"&gt;//Release the next thread in the queue if exists and remove it&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:12pt;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;mso-bidi-language:HE;mso-no-proof:yes;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="COLOR:green;"&gt;//from the queue.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:12pt;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;mso-bidi-language:HE;mso-no-proof:yes;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="COLOR:blue;"&gt;if&lt;/span&gt; (s_locksQueue.Count &amp;gt; 0)&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:12pt;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;mso-bidi-language:HE;mso-no-proof:yes;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;{&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:12pt;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;mso-bidi-language:HE;mso-no-proof:yes;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;s_locksQueue.Dequeue().Set();&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:12pt;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;mso-bidi-language:HE;mso-no-proof:yes;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;}&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:12pt;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;mso-bidi-language:HE;mso-no-proof:yes;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;}&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:12pt;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;mso-bidi-language:HE;mso-no-proof:yes;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;}&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:12pt;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;mso-bidi-language:HE;mso-no-proof:yes;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;}&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:12pt;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;mso-bidi-language:HE;mso-no-proof:yes;"&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:12pt;LINE-HEIGHT:115%;"&gt;Here&amp;nbsp;is how to u&lt;/span&gt;&lt;span style="FONT-SIZE:12pt;LINE-HEIGHT:115%;"&gt;se it:&lt;/span&gt;&lt;/div&gt;
&lt;div class="Section1"&gt;&lt;span style="FONT-SIZE:12pt;LINE-HEIGHT:115%;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/div&gt;
&lt;div class="Section1"&gt;&lt;span style="FONT-SIZE:12pt;LINE-HEIGHT:115%;"&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:12pt;COLOR:#2b91af;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;mso-bidi-language:HE;mso-no-proof:yes;"&gt;FifoLock&lt;/span&gt;&lt;span style="FONT-SIZE:12pt;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;mso-bidi-language:HE;mso-no-proof:yes;"&gt; myLock = &lt;span style="COLOR:blue;"&gt;new&lt;/span&gt; &lt;span style="COLOR:#2b91af;"&gt;FifoLock&lt;/span&gt;();&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:12pt;COLOR:blue;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;mso-bidi-language:HE;mso-no-proof:yes;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div class="Section1"&gt;&lt;span style="FONT-SIZE:12pt;COLOR:blue;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;mso-bidi-language:HE;mso-no-proof:yes;"&gt;try&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:12pt;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;mso-bidi-language:HE;mso-no-proof:yes;"&gt;{&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:12pt;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;mso-bidi-language:HE;mso-no-proof:yes;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;myLock.Lock();&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:12pt;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;mso-bidi-language:HE;mso-no-proof:yes;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="COLOR:green;"&gt;//do what you need to do&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:12pt;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;mso-bidi-language:HE;mso-no-proof:yes;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="COLOR:green;"&gt;//...&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:12pt;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;mso-bidi-language:HE;mso-no-proof:yes;"&gt;}&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:12pt;COLOR:blue;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;mso-bidi-language:HE;mso-no-proof:yes;"&gt;finally&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:12pt;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;mso-bidi-language:HE;mso-no-proof:yes;"&gt;{&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:12pt;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;mso-bidi-language:HE;mso-no-proof:yes;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;myLock.Unlock();&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:12pt;LINE-HEIGHT:115%;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;mso-bidi-language:HE;mso-no-proof:yes;"&gt;}&lt;/span&gt;&lt;span style="FONT-SIZE:12pt;LINE-HEIGHT:115%;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;img src="http://blogs.microsoft.co.il/aggbug.aspx?PostID=184156" width="1" height="1"&gt;</description><category domain="http://blogs.microsoft.co.il/blogs/shaharron/archive/tags/DEV/default.aspx">DEV</category></item><item><title>Where to put those DLLs - deployment best practices </title><link>http://blogs.microsoft.co.il/blogs/shaharron/archive/2008/11/09/where-to-put-those-dlls-deployment-best-practices.aspx</link><pubDate>Sun, 09 Nov 2008 17:05:00 GMT</pubDate><guid isPermaLink="false">b5c4f5bc-c09b-4439-a595-91a98c1847df:163502</guid><dc:creator>ShaharRon</dc:creator><slash:comments>4</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.microsoft.co.il/blogs/shaharron/rsscomments.aspx?PostID=163502</wfw:commentRss><comments>http://blogs.microsoft.co.il/blogs/shaharron/archive/2008/11/09/where-to-put-those-dlls-deployment-best-practices.aspx#comments</comments><description>&lt;div class="Section1"&gt;
&lt;p class="MsoNormal" style="MARGIN-BOTTOM:0pt;LINE-HEIGHT:normal;"&gt;&lt;span style="FONT-SIZE:12pt;COLOR:black;FONT-FAMILY:&amp;#39;Arial Unicode MS&amp;#39;,&amp;#39;sans-serif&amp;#39;;"&gt;A&amp;nbsp;friend asked me last week what is the optimal solution to deal with application version upgrades. He develops a complex product distributed across a few servers that includes a combination of managed and native code, both internal development and from external third party open source. More specifically the question was what is the best place to put his DLLs? GAC, local folders, System32, SxS? My answer to him led to this post. &lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN-BOTTOM:0pt;LINE-HEIGHT:normal;"&gt;&lt;span style="FONT-SIZE:12pt;COLOR:black;FONT-FAMILY:&amp;#39;Arial Unicode MS&amp;#39;,&amp;#39;sans-serif&amp;#39;;"&gt;Before going into where to put the DLLs it should be clear that managing your&amp;nbsp;DLLs and knowing where in your solution you use which&amp;nbsp;version of them is not a question of where you chose to put them&amp;nbsp;but how well you have documented what you did. Your primary focus should be to improve the process of how you release new versions of your solution in a way that it will provide proper documentation of the deployment. The best way is to automate this using a good ALM (application lifecycle management) tool like Team System or&amp;nbsp;other. &lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN-BOTTOM:0pt;LINE-HEIGHT:normal;"&gt;&lt;span style="FONT-SIZE:12pt;COLOR:black;FONT-FAMILY:&amp;#39;Arial Unicode MS&amp;#39;,&amp;#39;sans-serif&amp;#39;;"&gt;Now to the question of where to put DLLs. As a general rule all&amp;nbsp;DLLs should be versioned (I’ll talk about the exceptions later) from the very beginning of every solution. Sadly this is not the case and it is not uncommon to that I meet solutions where all the DLLs have version 1.0.0.0 even after a few releases were done. &lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN-BOTTOM:0pt;LINE-HEIGHT:normal;"&gt;&lt;span style="FONT-SIZE:12pt;COLOR:black;FONT-FAMILY:&amp;#39;Arial Unicode MS&amp;#39;,&amp;#39;sans-serif&amp;#39;;"&gt;First let’s talk about managed code DLLs which is what most of us usually work with:&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN-BOTTOM:0pt;LINE-HEIGHT:normal;"&gt;&lt;span style="FONT-SIZE:12pt;COLOR:black;FONT-FAMILY:&amp;#39;Arial Unicode MS&amp;#39;,&amp;#39;sans-serif&amp;#39;;"&gt;Managed DLLs can be placed in one of two places&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN:0in 0in 0pt 0.5in;TEXT-INDENT:-0.25in;LINE-HEIGHT:normal;"&gt;&lt;span style="FONT-SIZE:12pt;COLOR:black;FONT-FAMILY:Symbol;"&gt;·&lt;/span&gt;&lt;span style="FONT-SIZE:7pt;COLOR:black;FONT-FAMILY:&amp;#39;Times New Roman&amp;#39;,&amp;#39;serif&amp;#39;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;b&gt;&lt;span style="FONT-SIZE:12pt;COLOR:black;FONT-FAMILY:&amp;#39;Arial Unicode MS&amp;#39;,&amp;#39;sans-serif&amp;#39;;"&gt;GAC:&lt;/span&gt;&lt;/b&gt;&lt;span style="FONT-SIZE:12pt;COLOR:black;FONT-FAMILY:&amp;#39;Arial Unicode MS&amp;#39;,&amp;#39;sans-serif&amp;#39;;"&gt;&amp;nbsp; Placing DLLs in the GAC gives you the benefit of deploying a DLL once to a central location&amp;nbsp;for all your applications to use it. The risk is that you night break existing applications if your new DLL changed its signature. This is why you MUST version your DLLs and in each release deploy a new version increment of the DLLs which changed since the last release. &lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN:0in 0in 0pt 0.5in;TEXT-INDENT:-0.25in;LINE-HEIGHT:normal;"&gt;&lt;span style="FONT-SIZE:12pt;COLOR:black;FONT-FAMILY:Symbol;"&gt;·&lt;/span&gt;&lt;span style="FONT-SIZE:7pt;COLOR:black;FONT-FAMILY:&amp;#39;Times New Roman&amp;#39;,&amp;#39;serif&amp;#39;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;b&gt;&lt;span style="FONT-SIZE:12pt;COLOR:black;FONT-FAMILY:&amp;#39;Arial Unicode MS&amp;#39;,&amp;#39;sans-serif&amp;#39;;"&gt;Application local folder&lt;/span&gt;&lt;/b&gt;&lt;span style="FONT-SIZE:12pt;COLOR:black;FONT-FAMILY:&amp;#39;Arial Unicode MS&amp;#39;,&amp;#39;sans-serif&amp;#39;;"&gt; (for win application this is the folder where the exe is and for web applications it is the bin folder): Putting DLLs in local folders means the DLL instance is used only by that specific application. The benefit is that there is no risk of breaking one application when deploying another. The cons are that you have multiple instances of your DLL from various development versions deployed throughout the solution. When using this method you can have different versions of the DLL in different applications without actually versioning the DLL itself (all have version 1.0.0.0). This is a very bad practice because unless you keep excellent track of what version of the DLL you use in which folder you will quickly lose track of what code is used where. You might get, for example, to a situation where you need to fix a production bug in one of the applications but you don&amp;#39;t know what code you have deployed. &lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN-BOTTOM:0pt;LINE-HEIGHT:normal;"&gt;&lt;span style="FONT-SIZE:12pt;COLOR:black;FONT-FAMILY:&amp;#39;Arial Unicode MS&amp;#39;,&amp;#39;sans-serif&amp;#39;;"&gt;So what is the best deployment method for managed code? As a general rule using the GAC is better since it can hold multiple versions of the same DLL and each application will use a specific version. The problem is that in a large solution this will make the GAC crowded with DLLs and hard to manage. This is why I recommend using a combination of deployment to the GAC and to local folders. For DLLs that are shared across applications or might be shared in the future like infrastructure and BL the GAC is the right choice. For DLLs specific to one application like GUI DLLs I’ll use that application local folder. These DLLs are only used in one place and so we always have the latest version in that local folder. There is always a gray area of DLLs you are not sure about. In&amp;nbsp;such&amp;nbsp;cases, put them in the GAC. &lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN-BOTTOM:0pt;LINE-HEIGHT:normal;"&gt;&lt;span style="FONT-SIZE:12pt;COLOR:black;FONT-FAMILY:&amp;#39;Arial Unicode MS&amp;#39;,&amp;#39;sans-serif&amp;#39;;"&gt;An important note about using the GAC. It requires to maintain a well defined DLL naming convention or else you will very quickly lose track of which DLLs are yours and which are from&amp;nbsp;other applications. I also recommend performing regular cleanups&lt;/span&gt;&lt;span style="FONT-SIZE:12pt;COLOR:black;FONT-FAMILY:&amp;#39;Times New Roman&amp;#39;,&amp;#39;serif&amp;#39;;"&gt; of &lt;/span&gt;&lt;span style="FONT-SIZE:12pt;COLOR:black;FONT-FAMILY:&amp;#39;Arial Unicode MS&amp;#39;,&amp;#39;sans-serif&amp;#39;;"&gt;the GAC, &lt;span style="FONT-SIZE:12pt;COLOR:black;FONT-FAMILY:&amp;#39;Arial Unicode MS&amp;#39;,&amp;#39;sans-serif&amp;#39;;"&gt;deleting from&amp;nbsp;&lt;/span&gt;unused DLL versions. You can know what can be deleted through reports generated from your deployment documentation (did I mention already an ALM tool?). &lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN-BOTTOM:0pt;LINE-HEIGHT:normal;"&gt;&lt;span style="FONT-SIZE:12pt;COLOR:black;FONT-FAMILY:&amp;#39;Arial Unicode MS&amp;#39;,&amp;#39;sans-serif&amp;#39;;"&gt;With native code DLLs things are not as easy. They can be deployed in four ways: &lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN:0in 0in 0pt 0.5in;TEXT-INDENT:-0.25in;LINE-HEIGHT:normal;"&gt;&lt;span style="FONT-SIZE:12pt;COLOR:black;FONT-FAMILY:Symbol;"&gt;·&lt;/span&gt;&lt;span style="FONT-SIZE:7pt;COLOR:black;FONT-FAMILY:&amp;#39;Times New Roman&amp;#39;,&amp;#39;serif&amp;#39;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;b&gt;&lt;span style="FONT-SIZE:12pt;COLOR:black;FONT-FAMILY:&amp;#39;Arial Unicode MS&amp;#39;,&amp;#39;sans-serif&amp;#39;;"&gt;System32:&lt;/span&gt;&lt;/b&gt;&lt;span style="FONT-SIZE:12pt;COLOR:black;FONT-FAMILY:&amp;#39;Arial Unicode MS&amp;#39;,&amp;#39;sans-serif&amp;#39;;"&gt;&amp;nbsp;DLLs put in c:\windows\system32 can be used by all applications on the machine. There is no way to version DLLs placed there and so such a DLL should be backward compatible or all the applications that use it should be updated if a braking change was made.&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN:0in 0in 0pt 0.5in;TEXT-INDENT:-0.25in;LINE-HEIGHT:normal;"&gt;&lt;span style="FONT-SIZE:12pt;COLOR:black;FONT-FAMILY:Symbol;"&gt;·&lt;/span&gt;&lt;span style="FONT-SIZE:7pt;COLOR:black;FONT-FAMILY:&amp;#39;Times New Roman&amp;#39;,&amp;#39;serif&amp;#39;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;b&gt;&lt;span style="FONT-SIZE:12pt;COLOR:black;FONT-FAMILY:&amp;#39;Arial Unicode MS&amp;#39;,&amp;#39;sans-serif&amp;#39;;"&gt;Application local folder:&lt;/span&gt;&lt;/b&gt;&lt;span style="FONT-SIZE:12pt;COLOR:black;FONT-FAMILY:&amp;#39;Arial Unicode MS&amp;#39;,&amp;#39;sans-serif&amp;#39;;"&gt; This is the same as with for managed code DLLs. With native code the fact you don’t need the DLL to be versioned is a more significant benefit since native code DLLs are not versioned as easily as&amp;nbsp;the managed ones. &lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN:0in 0in 0pt 0.5in;TEXT-INDENT:-0.25in;LINE-HEIGHT:normal;"&gt;&lt;span style="FONT-SIZE:12pt;COLOR:#1f497d;FONT-FAMILY:Symbol;"&gt;·&lt;/span&gt;&lt;span style="FONT-SIZE:7pt;COLOR:#1f497d;FONT-FAMILY:&amp;#39;Times New Roman&amp;#39;,&amp;#39;serif&amp;#39;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;b&gt;&lt;span style="FONT-SIZE:12pt;COLOR:black;FONT-FAMILY:&amp;#39;Arial Unicode MS&amp;#39;,&amp;#39;sans-serif&amp;#39;;"&gt;Side-by-Side Native Assembly Cache (SxS):&lt;/span&gt;&lt;/b&gt;&lt;span style="FONT-SIZE:12pt;COLOR:black;FONT-FAMILY:&amp;#39;Arial Unicode MS&amp;#39;,&amp;#39;sans-serif&amp;#39;;"&gt; Starting form Windows XP you can deploy native DLLs side-by-side with versioning. For those who are not familiar with this way of deployment of native code you can read about it &lt;a href="http://kobyk.wordpress.com/2007/07/27/sxs-api-installing-win32-native-side-by-side-assemblies-without-msi/"&gt;here&lt;/a&gt; and &lt;a href="http://msdn.microsoft.com/library/aa376307.aspx"&gt;here&lt;/a&gt;. The DLLs are installed to C:\Windows\WinSxS. Each DLL installed is also strongly singed and versioned using a manifest. You then have the ability to create policy files which tell each application exactly which version of the DLL to use. The benefits are the same as using the GAC for managed code. The cons are that this requires a higher level of understanding of the dynamic loader policies and a more complex deployment process to support SxS. &lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN:0in 0in 0pt 0.5in;TEXT-INDENT:-0.25in;LINE-HEIGHT:normal;"&gt;&lt;span style="FONT-SIZE:12pt;COLOR:#1f497d;FONT-FAMILY:Symbol;"&gt;·&lt;/span&gt;&lt;span style="FONT-SIZE:7pt;COLOR:#1f497d;FONT-FAMILY:&amp;#39;Times New Roman&amp;#39;,&amp;#39;serif&amp;#39;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;b&gt;&lt;span style="FONT-SIZE:12pt;COLOR:black;FONT-FAMILY:&amp;#39;Arial Unicode MS&amp;#39;,&amp;#39;sans-serif&amp;#39;;"&gt;GAC:&lt;/span&gt;&lt;/b&gt;&lt;span style="FONT-SIZE:12pt;COLOR:black;FONT-FAMILY:&amp;#39;Arial Unicode MS&amp;#39;,&amp;#39;sans-serif&amp;#39;;"&gt; You can load native DLLs into the GAC by “attaching” them to a managed DLL. You can read about this&lt;/span&gt;&lt;span style="FONT-SIZE:12pt;COLOR:#1f497d;FONT-FAMILY:&amp;#39;Arial Unicode MS&amp;#39;,&amp;#39;sans-serif&amp;#39;;"&gt; &lt;a href="http://blogs.msdn.com/yizhang/archive/2007/06/17/how-to-deploy-unmanaged-dll-into-gac.aspx"&gt;here&lt;/a&gt;. &lt;/span&gt;&lt;span style="FONT-SIZE:12pt;COLOR:black;FONT-FAMILY:&amp;#39;Arial Unicode MS&amp;#39;,&amp;#39;sans-serif&amp;#39;;"&gt;I have never used this method but I believe it suits cases when all references to that DLL are done from code you control. It might be problematic if you have a DLL that is loaded by both managed and native DLLs. Also the deployment here is more complex.&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN-BOTTOM:0pt;LINE-HEIGHT:normal;"&gt;&lt;span style="FONT-SIZE:12pt;COLOR:black;FONT-FAMILY:&amp;#39;Arial Unicode MS&amp;#39;,&amp;#39;sans-serif&amp;#39;;"&gt;So what is&amp;nbsp;the best practice? In an&amp;nbsp;ideal world I will handle native code like managed one and will combine&amp;nbsp;the versioned SxS deployment for shared DLLs and local application folders for the non-shared. The issue here is that the SxS is not as easy to use as&amp;nbsp;the GAC. You can automate adding&amp;nbsp;the manifest and the special deployment&amp;nbsp;actions by creating an MSI through an automatic build process (again the ALM tool to the aid) but this still adds complexity. This is why I’m more flexible here and allow exceptions for my strict versioning policy. If you have many native DLL at the core of your solution use the WinSxS but if there are only a few native DLLs you need to share across applications and these DLLs are not changed often, consider what method suits best your specific&amp;nbsp;case and either deploy it to multiple application folders or attache it to a managed DLL or maybe keep only a single instance of it in system32 folder. &lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN-BOTTOM:0pt;LINE-HEIGHT:normal;"&gt;&lt;span style="FONT-SIZE:12pt;COLOR:black;FONT-FAMILY:&amp;#39;Arial Unicode MS&amp;#39;,&amp;#39;sans-serif&amp;#39;;"&gt;This post is targeted mostly for server deployments. Client side applications have even more options. &lt;a class="" href="http://msdn.microsoft.com/library/t71a733d.aspx"&gt;ClickOnce&lt;/a&gt; for example is a good choice. Static linking of all the client&amp;#39;s DLLs to a single exe is an excellent way to bundle up a client application (see skype for example). This was a common method at the native code times and is less used in the .NET world but is still possible using&amp;nbsp;&lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=22914587-B4AD-4EAE-87CF-B14AE6A939B0"&gt;&lt;span style="COLOR:purple;"&gt;ILMerge&lt;/span&gt;&lt;/a&gt; tool. &lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN-BOTTOM:0pt;LINE-HEIGHT:normal;"&gt;&lt;span style="FONT-SIZE:12pt;COLOR:black;FONT-FAMILY:&amp;#39;Arial Unicode MS&amp;#39;,&amp;#39;sans-serif&amp;#39;;"&gt;There are many methodologies of how to deploy versioned solutions. This post is my personal best practices and preferences. You can look at the Microsoft guide for .NET solution deployment &lt;/span&gt;&lt;span style="FONT-SIZE:12pt;COLOR:#1f497d;FONT-FAMILY:&amp;#39;Arial Unicode MS&amp;#39;,&amp;#39;sans-serif&amp;#39;;"&gt;&lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=5B7C6E2D-D03F-4B19-9025-6B87E6AE0DA6&amp;amp;displaylang=en"&gt;here&lt;/a&gt;. I&lt;/span&gt;&lt;span style="FONT-SIZE:12pt;COLOR:black;FONT-FAMILY:&amp;#39;Arial Unicode MS&amp;#39;,&amp;#39;sans-serif&amp;#39;;"&gt; will be happy to hear about your deployment experiences.&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;img src="http://blogs.microsoft.co.il/aggbug.aspx?PostID=163502" width="1" height="1"&gt;</description><category domain="http://blogs.microsoft.co.il/blogs/shaharron/archive/tags/DEV/default.aspx">DEV</category><category domain="http://blogs.microsoft.co.il/blogs/shaharron/archive/tags/Deployment/default.aspx">Deployment</category><category domain="http://blogs.microsoft.co.il/blogs/shaharron/archive/tags/Best+practices/default.aspx">Best practices</category></item><item><title>Silverlight and WCF cross site scripting issue</title><link>http://blogs.microsoft.co.il/blogs/shaharron/archive/2008/10/25/silverlight-and-wcf-cross-site-scripting-issue.aspx</link><pubDate>Sat, 25 Oct 2008 14:53:00 GMT</pubDate><guid isPermaLink="false">b5c4f5bc-c09b-4439-a595-91a98c1847df:158152</guid><dc:creator>ShaharRon</dc:creator><slash:comments>4</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.microsoft.co.il/blogs/shaharron/rsscomments.aspx?PostID=158152</wfw:commentRss><comments>http://blogs.microsoft.co.il/blogs/shaharron/archive/2008/10/25/silverlight-and-wcf-cross-site-scripting-issue.aspx#comments</comments><description>&lt;p class="MsoNormal" style="MARGIN:0in 0in 0pt;"&gt;&lt;font face="Calibri" size="3"&gt;Recently I tried to call a WCF service hosted in a windows service from silverlight. I got an HTTP 404 (&lt;font face="Arial"&gt;Not Found&lt;/font&gt;) error. This is because the WCF service is not in the same domain (=site) as the silverlight page calling it and so the action was considered cross site scripting and hence blocked. &lt;/font&gt;&lt;/p&gt;&lt;font face="Calibri" size="3"&gt;&amp;nbsp;&lt;/font&gt; 
&lt;p class="MsoNormal" style="MARGIN:0in 0in 0pt;"&gt;&lt;font face="Calibri" size="3"&gt;This doesn’t happen only in self hosted WCF services but also when the WCF is hosted in IIS but in a different site. &lt;/font&gt;&lt;/p&gt;&lt;font face="Calibri"&gt;&lt;font size="3"&gt;The solution is to enable cross site scripting&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&lt;/span&gt;for the WCF service. This is done by adding&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;a file named &lt;strong&gt;&lt;span style="FONT-FAMILY:&amp;#39;Calibri&amp;#39;,&amp;#39;sans-serif&amp;#39;;mso-ascii-theme-font:minor-latin;mso-hansi-theme-font:minor-latin;mso-bidi-font-family:Arial;mso-bidi-theme-font:minor-bidi;mso-ansi-language:EN;"&gt;&lt;strong&gt;&lt;span style="FONT-FAMILY:&amp;#39;Calibri&amp;#39;,&amp;#39;sans-serif&amp;#39;;mso-ascii-theme-font:minor-latin;mso-hansi-theme-font:minor-latin;mso-bidi-font-family:Arial;mso-bidi-theme-font:minor-bidi;mso-ansi-language:EN;"&gt;&lt;strong&gt;&lt;span style="FONT-FAMILY:&amp;#39;Calibri&amp;#39;,&amp;#39;sans-serif&amp;#39;;mso-ascii-theme-font:minor-latin;mso-hansi-theme-font:minor-latin;mso-bidi-font-family:Arial;mso-bidi-theme-font:minor-bidi;mso-ansi-language:EN;"&gt;&lt;strong&gt;&lt;span style="FONT-FAMILY:&amp;#39;Calibri&amp;#39;,&amp;#39;sans-serif&amp;#39;;mso-ascii-theme-font:minor-latin;mso-hansi-theme-font:minor-latin;mso-bidi-font-family:Arial;mso-bidi-theme-font:minor-bidi;mso-ansi-language:EN;"&gt;&lt;strong&gt;&lt;span style="FONT-FAMILY:&amp;#39;Calibri&amp;#39;,&amp;#39;sans-serif&amp;#39;;mso-ascii-theme-font:minor-latin;mso-hansi-theme-font:minor-latin;mso-bidi-font-family:Arial;mso-bidi-theme-font:minor-bidi;mso-ansi-language:EN;"&gt;&lt;strong&gt;&lt;span style="FONT-FAMILY:&amp;#39;Calibri&amp;#39;,&amp;#39;sans-serif&amp;#39;;mso-ascii-theme-font:minor-latin;mso-hansi-theme-font:minor-latin;mso-bidi-font-family:Arial;mso-bidi-theme-font:minor-bidi;mso-ansi-language:EN;"&gt;&lt;strong&gt;&lt;span style="FONT-FAMILY:&amp;#39;Calibri&amp;#39;,&amp;#39;sans-serif&amp;#39;;mso-ascii-theme-font:minor-latin;mso-hansi-theme-font:minor-latin;mso-bidi-font-family:Arial;mso-bidi-theme-font:minor-bidi;mso-ansi-language:EN;"&gt;&lt;strong&gt;&lt;span style="FONT-FAMILY:&amp;#39;Calibri&amp;#39;,&amp;#39;sans-serif&amp;#39;;mso-ascii-theme-font:minor-latin;mso-hansi-theme-font:minor-latin;mso-bidi-font-family:Arial;mso-bidi-theme-font:minor-bidi;mso-ansi-language:EN;"&gt;clientaccesspolicy&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/strong&gt;.xml&lt;/span&gt;&lt;/strong&gt;&lt;/font&gt;&lt;span style="mso-ansi-language:EN;"&gt;&lt;font size="3"&gt; at the root of the site. In this file you can specify which sites you&amp;nbsp;allow to do cross site access. &lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="mso-ansi-language:EN;"&gt;&lt;font face="Calibri" size="3"&gt;&amp;nbsp;&lt;/font&gt;&lt;/span&gt; 
&lt;p&gt;&lt;font face="Calibri" size="3"&gt;You can find the details how to do it when the WCF service is hosted in IIS &lt;a class="" href="http://blogs.microsoft.co.il/blogs/bursteg/archive/2008/07/19/Silverlight-WCF-HTTP-404.aspx"&gt;here&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;/font&gt;&lt;font face="Calibri" size="3"&gt;when in a windows service &lt;a class="" href="http://blogs.msdn.com/carlosfigueira/archive/2008/03/07/enabling-cross-domain-calls-for-silverlight-apps-on-self-hosted-web-services.aspx"&gt;here&lt;/a&gt;.&amp;nbsp;&lt;/font&gt;&lt;/p&gt;&lt;span style="mso-ansi-language:EN;"&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;Both posts give a samples XML of how to grant access to&amp;nbsp;all sites. There is an error in one of the&amp;nbsp;posts sample. My guess is that the post was written during the beta and the XML structure changed later. &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-ansi-language:EN;"&gt;&lt;font face="Calibri" size="3"&gt;&amp;nbsp;&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-ansi-language:EN;"&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;The update is that you need another to add the attribute &lt;span style="FONT-SIZE:11pt;COLOR:red;FONT-FAMILY:Consolas;mso-fareast-font-family:Calibri;mso-fareast-theme-font:minor-latin;mso-bidi-font-family:Arial;mso-bidi-theme-font:minor-bidi;mso-ansi-language:EN;mso-fareast-language:EN-US;mso-bidi-language:HE;"&gt;http-request-headers&lt;/span&gt;&lt;span style="FONT-SIZE:11pt;COLOR:blue;FONT-FAMILY:Consolas;mso-fareast-font-family:Calibri;mso-fareast-theme-font:minor-latin;mso-bidi-font-family:Arial;mso-bidi-theme-font:minor-bidi;mso-ansi-language:EN;mso-fareast-language:EN-US;mso-bidi-language:HE;"&gt;&lt;span style="FONT-SIZE:11pt;COLOR:blue;FONT-FAMILY:Consolas;mso-fareast-font-family:Calibri;mso-fareast-theme-font:minor-latin;mso-bidi-font-family:Arial;mso-bidi-theme-font:minor-bidi;mso-ansi-language:EN;mso-fareast-language:EN-US;mso-bidi-language:HE;"&gt;&lt;span style="FONT-SIZE:11pt;COLOR:blue;FONT-FAMILY:Consolas;mso-fareast-font-family:Calibri;mso-fareast-theme-font:minor-latin;mso-bidi-font-family:Arial;mso-bidi-theme-font:minor-bidi;mso-ansi-language:EN;mso-fareast-language:EN-US;mso-bidi-language:HE;"&gt;&lt;span style="FONT-SIZE:11pt;COLOR:blue;FONT-FAMILY:Consolas;mso-fareast-font-family:Calibri;mso-fareast-theme-font:minor-latin;mso-bidi-font-family:Arial;mso-bidi-theme-font:minor-bidi;mso-ansi-language:EN;mso-fareast-language:EN-US;mso-bidi-language:HE;"&gt;&lt;span style="FONT-SIZE:11pt;COLOR:blue;FONT-FAMILY:Consolas;mso-fareast-font-family:Calibri;mso-fareast-theme-font:minor-latin;mso-bidi-font-family:Arial;mso-bidi-theme-font:minor-bidi;mso-ansi-language:EN;mso-fareast-language:EN-US;mso-bidi-language:HE;"&gt;&lt;span style="FONT-SIZE:11pt;COLOR:blue;FONT-FAMILY:Consolas;mso-fareast-font-family:Calibri;mso-fareast-theme-font:minor-latin;mso-bidi-font-family:Arial;mso-bidi-theme-font:minor-bidi;mso-ansi-language:EN;mso-fareast-language:EN-US;mso-bidi-language:HE;"&gt;&lt;span style="FONT-SIZE:11pt;COLOR:blue;FONT-FAMILY:Consolas;mso-fareast-font-family:Calibri;mso-fareast-theme-font:minor-latin;mso-bidi-font-family:Arial;mso-bidi-theme-font:minor-bidi;mso-ansi-language:EN;mso-fareast-language:EN-US;mso-bidi-language:HE;"&gt;&lt;span style="FONT-SIZE:11pt;COLOR:blue;FONT-FAMILY:Consolas;mso-fareast-font-family:Calibri;mso-fareast-theme-font:minor-latin;mso-bidi-font-family:Arial;mso-bidi-theme-font:minor-bidi;mso-ansi-language:EN;mso-fareast-language:EN-US;mso-bidi-language:HE;"&gt;=&lt;/span&gt;&lt;span style="FONT-SIZE:11pt;COLOR:black;FONT-FAMILY:Consolas;mso-fareast-font-family:Calibri;mso-fareast-theme-font:minor-latin;mso-bidi-font-family:Arial;mso-bidi-theme-font:minor-bidi;mso-ansi-language:EN;mso-fareast-language:EN-US;mso-bidi-language:HE;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="FONT-SIZE:11pt;COLOR:blue;FONT-FAMILY:Consolas;mso-fareast-font-family:Calibri;mso-fareast-theme-font:minor-latin;mso-bidi-font-family:Arial;mso-bidi-theme-font:minor-bidi;mso-ansi-language:EN;mso-fareast-language:EN-US;mso-bidi-language:HE;"&gt;*&lt;/span&gt;&lt;span style="FONT-SIZE:11pt;COLOR:black;FONT-FAMILY:Consolas;mso-fareast-font-family:Calibri;mso-fareast-theme-font:minor-latin;mso-bidi-font-family:Arial;mso-bidi-theme-font:minor-bidi;mso-ansi-language:EN;mso-fareast-language:EN-US;mso-bidi-language:HE;"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:11pt;COLOR:black;FONT-FAMILY:Consolas;mso-fareast-font-family:Calibri;mso-fareast-theme-font:minor-latin;mso-bidi-font-family:Arial;mso-bidi-theme-font:minor-bidi;mso-ansi-language:EN;mso-fareast-language:EN-US;mso-bidi-language:HE;"&gt; and then i&lt;/span&gt;t works.&amp;nbsp;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-ansi-language:EN;"&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-ansi-language:EN;"&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;Anyway here is how the XML in the file should look like:&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-ansi-language:EN;"&gt;&lt;font face="Calibri" size="3"&gt;&amp;nbsp;&lt;br /&gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-ansi-language:EN;"&gt;&lt;/span&gt;&lt;span style="mso-ansi-language:EN;"&gt;&lt;/span&gt;&lt;span style="mso-ansi-language:EN;"&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:11pt;COLOR:blue;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&amp;lt;?&lt;/span&gt;&lt;span style="FONT-SIZE:11pt;COLOR:#a31515;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;xml&lt;/span&gt;&lt;span style="FONT-SIZE:11pt;COLOR:blue;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt; &lt;/span&gt;&lt;span style="FONT-SIZE:11pt;COLOR:red;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;version&lt;/span&gt;&lt;span style="FONT-SIZE:11pt;COLOR:blue;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&lt;span style="FONT-SIZE:11pt;COLOR:blue;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&lt;span style="FONT-SIZE:11pt;COLOR:blue;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&lt;span style="FONT-SIZE:11pt;COLOR:blue;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&lt;span style="FONT-SIZE:11pt;COLOR:blue;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&lt;span style="FONT-SIZE:11pt;COLOR:blue;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&lt;span style="FONT-SIZE:11pt;COLOR:blue;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&lt;span style="FONT-SIZE:11pt;COLOR:blue;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;=&lt;/span&gt;&lt;span style="FONT-SIZE:11pt;COLOR:black;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:11pt;COLOR:blue;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;1.0&lt;/span&gt;&lt;span style="FONT-SIZE:11pt;COLOR:black;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="FONT-SIZE:11pt;COLOR:blue;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt; &lt;/span&gt;&lt;span style="FONT-SIZE:11pt;COLOR:red;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;encoding&lt;/span&gt;&lt;span style="FONT-SIZE:11pt;COLOR:blue;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&lt;span style="FONT-SIZE:11pt;COLOR:blue;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&lt;span style="FONT-SIZE:11pt;COLOR:blue;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&lt;span style="FONT-SIZE:11pt;COLOR:blue;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&lt;span style="FONT-SIZE:11pt;COLOR:blue;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&lt;span style="FONT-SIZE:11pt;COLOR:blue;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&lt;span style="FONT-SIZE:11pt;COLOR:blue;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&lt;span style="FONT-SIZE:11pt;COLOR:blue;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;=&lt;/span&gt;&lt;span style="FONT-SIZE:11pt;COLOR:black;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:11pt;COLOR:blue;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&lt;span style="FONT-SIZE:11pt;COLOR:blue;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&lt;span style="FONT-SIZE:11pt;COLOR:blue;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&lt;span style="FONT-SIZE:11pt;COLOR:blue;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&lt;span style="FONT-SIZE:11pt;COLOR:blue;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&lt;span style="FONT-SIZE:11pt;COLOR:blue;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&lt;span style="FONT-SIZE:11pt;COLOR:blue;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&lt;span style="FONT-SIZE:11pt;COLOR:blue;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;utf&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;-8&lt;/span&gt;&lt;span style="FONT-SIZE:11pt;COLOR:black;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="FONT-SIZE:11pt;COLOR:blue;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;?&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:11pt;COLOR:black;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:11pt;COLOR:blue;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="FONT-SIZE:11pt;COLOR:#a31515;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;access-policy&lt;/span&gt;&lt;span style="FONT-SIZE:11pt;COLOR:blue;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:11pt;COLOR:black;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:11pt;COLOR:blue;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="FONT-SIZE:11pt;COLOR:#a31515;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;cross-domain-access&lt;/span&gt;&lt;span style="FONT-SIZE:11pt;COLOR:blue;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:11pt;COLOR:black;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:11pt;COLOR:blue;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="FONT-SIZE:11pt;COLOR:#a31515;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;policy&lt;/span&gt;&lt;span style="FONT-SIZE:11pt;COLOR:blue;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:11pt;COLOR:black;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:11pt;COLOR:blue;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="FONT-SIZE:11pt;COLOR:#a31515;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;allow-from&lt;/span&gt;&lt;span style="FONT-SIZE:11pt;COLOR:blue;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt; &lt;/span&gt;&lt;span style="FONT-SIZE:11pt;COLOR:red;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;http-request-headers&lt;/span&gt;&lt;span style="FONT-SIZE:11pt;COLOR:blue;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&lt;span style="FONT-SIZE:11pt;COLOR:blue;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&lt;span style="FONT-SIZE:11pt;COLOR:blue;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&lt;span style="FONT-SIZE:11pt;COLOR:blue;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&lt;span style="FONT-SIZE:11pt;COLOR:blue;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&lt;span style="FONT-SIZE:11pt;COLOR:blue;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&lt;span style="FONT-SIZE:11pt;COLOR:blue;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&lt;span style="FONT-SIZE:11pt;COLOR:blue;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;=&lt;/span&gt;&lt;span style="FONT-SIZE:11pt;COLOR:black;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="FONT-SIZE:11pt;COLOR:blue;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;*&lt;/span&gt;&lt;span style="FONT-SIZE:11pt;COLOR:black;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="FONT-SIZE:11pt;COLOR:blue;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:11pt;COLOR:blue;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:11pt;COLOR:black;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:11pt;COLOR:blue;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="FONT-SIZE:11pt;COLOR:#a31515;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;domain&lt;/span&gt;&lt;span style="FONT-SIZE:11pt;COLOR:blue;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt; &lt;/span&gt;&lt;span style="FONT-SIZE:11pt;COLOR:red;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;uri&lt;/span&gt;&lt;span style="FONT-SIZE:11pt;COLOR:blue;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&lt;span style="FONT-SIZE:11pt;COLOR:blue;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&lt;span style="FONT-SIZE:11pt;COLOR:blue;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&lt;span style="FONT-SIZE:11pt;COLOR:blue;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&lt;span style="FONT-SIZE:11pt;COLOR:blue;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&lt;span style="FONT-SIZE:11pt;COLOR:blue;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&lt;span style="FONT-SIZE:11pt;COLOR:blue;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&lt;span style="FONT-SIZE:11pt;COLOR:blue;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;=&lt;/span&gt;&lt;span style="FONT-SIZE:11pt;COLOR:black;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="FONT-SIZE:11pt;COLOR:blue;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;*&lt;/span&gt;&lt;span style="FONT-SIZE:11pt;COLOR:black;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="FONT-SIZE:11pt;COLOR:blue;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;/&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:11pt;COLOR:blue;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:11pt;COLOR:black;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:11pt;COLOR:blue;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/&lt;/span&gt;&lt;span style="FONT-SIZE:11pt;COLOR:#a31515;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;allow-from&lt;/span&gt;&lt;span style="FONT-SIZE:11pt;COLOR:blue;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:11pt;COLOR:black;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:11pt;COLOR:blue;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="FONT-SIZE:11pt;COLOR:#a31515;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;grant-to&lt;/span&gt;&lt;span style="FONT-SIZE:11pt;COLOR:blue;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:11pt;COLOR:black;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:11pt;COLOR:blue;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="FONT-SIZE:11pt;COLOR:#a31515;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;resource&lt;/span&gt;&lt;span style="FONT-SIZE:11pt;COLOR:blue;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt; &lt;/span&gt;&lt;span style="FONT-SIZE:11pt;COLOR:red;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;path&lt;/span&gt;&lt;span style="FONT-SIZE:11pt;COLOR:blue;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&lt;span style="FONT-SIZE:11pt;COLOR:blue;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&lt;span style="FONT-SIZE:11pt;COLOR:blue;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&lt;span style="FONT-SIZE:11pt;COLOR:blue;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&lt;span style="FONT-SIZE:11pt;COLOR:blue;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&lt;span style="FONT-SIZE:11pt;COLOR:blue;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&lt;span style="FONT-SIZE:11pt;COLOR:blue;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&lt;span style="FONT-SIZE:11pt;COLOR:blue;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;=&lt;/span&gt;&lt;span style="FONT-SIZE:11pt;COLOR:black;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="FONT-SIZE:11pt;COLOR:blue;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;/&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:11pt;COLOR:black;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="FONT-SIZE:11pt;COLOR:blue;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt; &lt;/span&gt;&lt;span style="FONT-SIZE:11pt;COLOR:red;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;include-subpaths&lt;/span&gt;&lt;span style="FONT-SIZE:11pt;COLOR:blue;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&lt;span style="FONT-SIZE:11pt;COLOR:blue;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&lt;span style="FONT-SIZE:11pt;COLOR:blue;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&lt;span style="FONT-SIZE:11pt;COLOR:blue;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&lt;span style="FONT-SIZE:11pt;COLOR:blue;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&lt;span style="FONT-SIZE:11pt;COLOR:blue;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&lt;span style="FONT-SIZE:11pt;COLOR:blue;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&lt;span style="FONT-SIZE:11pt;COLOR:blue;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;=&lt;/span&gt;&lt;span style="FONT-SIZE:11pt;COLOR:black;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:11pt;COLOR:blue;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;true&lt;/span&gt;&lt;span style="FONT-SIZE:11pt;COLOR:black;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&lt;span style="FONT-SIZE:11pt;COLOR:black;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&lt;span style="FONT-SIZE:11pt;COLOR:black;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&lt;span style="FONT-SIZE:11pt;COLOR:black;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&lt;span style="FONT-SIZE:11pt;COLOR:black;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&lt;span style="FONT-SIZE:11pt;COLOR:black;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&lt;span style="FONT-SIZE:11pt;COLOR:black;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&lt;span style="FONT-SIZE:11pt;COLOR:black;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="FONT-SIZE:11pt;COLOR:blue;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;/&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:11pt;COLOR:blue;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:11pt;COLOR:black;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:11pt;COLOR:blue;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/&lt;/span&gt;&lt;span style="FONT-SIZE:11pt;COLOR:#a31515;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;grant-to&lt;/span&gt;&lt;span style="FONT-SIZE:11pt;COLOR:blue;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:11pt;COLOR:black;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:11pt;COLOR:blue;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/&lt;/span&gt;&lt;span style="FONT-SIZE:11pt;COLOR:#a31515;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;policy&lt;/span&gt;&lt;span style="FONT-SIZE:11pt;COLOR:blue;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:11pt;COLOR:black;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:11pt;COLOR:blue;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&amp;nbsp; &amp;lt;/&lt;/span&gt;&lt;span style="FONT-SIZE:11pt;COLOR:#a31515;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;cross-domain-access&lt;/span&gt;&lt;span style="FONT-SIZE:11pt;COLOR:blue;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:11pt;COLOR:black;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:11pt;COLOR:blue;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&lt;span style="FONT-SIZE:11pt;COLOR:blue;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&lt;span style="FONT-SIZE:11pt;COLOR:blue;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&lt;span style="FONT-SIZE:11pt;COLOR:blue;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&lt;span style="FONT-SIZE:11pt;COLOR:blue;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&lt;span style="FONT-SIZE:11pt;COLOR:blue;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&lt;span style="FONT-SIZE:11pt;COLOR:blue;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&lt;span style="FONT-SIZE:11pt;COLOR:blue;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&amp;lt;/&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:11pt;COLOR:#a31515;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;access-policy&lt;/span&gt;&lt;span style="FONT-SIZE:11pt;COLOR:blue;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="FONT-SIZE:11pt;COLOR:black;FONT-FAMILY:Consolas;mso-ansi-language:EN;"&gt;&lt;/span&gt;&lt;span style="mso-ansi-language:EN;"&gt;&lt;font face="Calibri" size="3"&gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-ansi-language:EN;"&gt;&lt;/span&gt;&lt;span style="mso-ansi-language:EN;"&gt;&lt;/span&gt;&lt;span style="mso-ansi-language:EN;"&gt;&lt;/span&gt;&lt;span style="mso-ansi-language:EN;"&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;In the real world you might want to limit which sites you permit to do cross site scripting to your domain. For the detailed explanation of how to&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;format this XML to do so see: &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-ansi-language:EN;"&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/cc197955(VS.95).aspx"&gt;&lt;font face="Calibri" size="3"&gt;http://msdn.microsoft.com/en-us/library/cc197955(VS.95).aspx&lt;/font&gt;&lt;/a&gt;&lt;/span&gt;&lt;span style="mso-ansi-language:EN;"&gt;&lt;font face="Calibri" size="3"&gt;&amp;nbsp;&lt;/font&gt;&lt;/span&gt;&lt;img src="http://blogs.microsoft.co.il/aggbug.aspx?PostID=158152" width="1" height="1"&gt;</description><category domain="http://blogs.microsoft.co.il/blogs/shaharron/archive/tags/Security/default.aspx">Security</category><category domain="http://blogs.microsoft.co.il/blogs/shaharron/archive/tags/WCF/default.aspx">WCF</category><category domain="http://blogs.microsoft.co.il/blogs/shaharron/archive/tags/DEV/default.aspx">DEV</category><category domain="http://blogs.microsoft.co.il/blogs/shaharron/archive/tags/Silverlight/default.aspx">Silverlight</category></item><item><title>RFID Presentations</title><link>http://blogs.microsoft.co.il/blogs/shaharron/archive/2008/06/05/rfid-presentations.aspx</link><pubDate>Fri, 06 Jun 2008 02:45:00 GMT</pubDate><guid isPermaLink="false">b5c4f5bc-c09b-4439-a595-91a98c1847df:99668</guid><dc:creator>ShaharRon</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.microsoft.co.il/blogs/shaharron/rsscomments.aspx?PostID=99668</wfw:commentRss><comments>http://blogs.microsoft.co.il/blogs/shaharron/archive/2008/06/05/rfid-presentations.aspx#comments</comments><description>&lt;p&gt;Recently I gave two presentations on Microsoft BizTalk RFID, the new module for interfacing with RFID modules.&lt;/p&gt;
&lt;p&gt;First was on Tech-Ed Israel 2008 in&amp;nbsp; and you can download the presentation &lt;a href="http://download.microsoft.com/download/4/d/1/4d1da2f3-8651-40f4-bc02-99c7989382f7/SOA390.ppt" target="_blank"&gt;here&lt;/a&gt; and also view a &lt;a href="mms://iwebcast1.you-niversity.com/iarchives/SOA390_SG01W.WMV" target="_blank"&gt;recording&lt;/a&gt; of the lecture (Note: it&amp;#39;s in Hebrew)&lt;/p&gt;
&lt;p&gt;Second was on Israel .Net Architect Users Group. It is was very similar to the Tech-Ed one but without the introduction to RFID I gave at the Tech-Ed and more emphasis on the new BizTalk module. You can download it &lt;a href="http://blogs.microsoft.co.il/blogs/shaharron/RFID%20at%20NET%20Software%20Architects%20User%20Group.zip" target="_blank"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;.&lt;/p&gt;&lt;img src="http://blogs.microsoft.co.il/aggbug.aspx?PostID=99668" width="1" height="1"&gt;</description><category domain="http://blogs.microsoft.co.il/blogs/shaharron/archive/tags/RFID/default.aspx">RFID</category><category domain="http://blogs.microsoft.co.il/blogs/shaharron/archive/tags/Teched/default.aspx">Teched</category><category domain="http://blogs.microsoft.co.il/blogs/shaharron/archive/tags/TechedIsrael2008/default.aspx">TechedIsrael2008</category></item><item><title>Using BizTalk to send files to an FTP server via a proxy</title><link>http://blogs.microsoft.co.il/blogs/shaharron/archive/2008/01/27/using-biztalk-to-send-a-file-to-an-ftp-server-via-a-proxy.aspx</link><pubDate>Sun, 27 Jan 2008 13:00:00 GMT</pubDate><guid isPermaLink="false">b5c4f5bc-c09b-4439-a595-91a98c1847df:53835</guid><dc:creator>ShaharRon</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.microsoft.co.il/blogs/shaharron/rsscomments.aspx?PostID=53835</wfw:commentRss><comments>http://blogs.microsoft.co.il/blogs/shaharron/archive/2008/01/27/using-biztalk-to-send-a-file-to-an-ftp-server-via-a-proxy.aspx#comments</comments><description>&lt;p&gt;A client had the need to use BizTalk to send&amp;nbsp;files to an FTP server via a proxy server. There is no place to specify a proxy in the FTP send adapter configuration and there is nothing about how to do it in the BizTalk documentation nor my search on the web come out with any info on that. &lt;/p&gt;
&lt;p&gt;After playing with different configuration variations it was found that the following setup will work:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;In the &amp;#39;Server&amp;#39; field put the IP of the proxy server &lt;/li&gt;
&lt;li&gt;In the &amp;#39;User Name&amp;#39; put EndTargetServerIP@UserName. &lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;I want to thank Shuki Licht who is the one who did this research and provided the solution. &lt;/p&gt;&lt;img src="http://blogs.microsoft.co.il/aggbug.aspx?PostID=53835" width="1" height="1"&gt;</description><category domain="http://blogs.microsoft.co.il/blogs/shaharron/archive/tags/BizTalk/default.aspx">BizTalk</category></item><item><title>Why we should use Visual Studio item templates more often</title><link>http://blogs.microsoft.co.il/blogs/shaharron/archive/2008/01/24/why-we-should-use-visual-studio-item-templates-more-often.aspx</link><pubDate>Thu, 24 Jan 2008 23:37:00 GMT</pubDate><guid isPermaLink="false">b5c4f5bc-c09b-4439-a595-91a98c1847df:54106</guid><dc:creator>ShaharRon</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.microsoft.co.il/blogs/shaharron/rsscomments.aspx?PostID=54106</wfw:commentRss><comments>http://blogs.microsoft.co.il/blogs/shaharron/archive/2008/01/24/why-we-should-use-visual-studio-item-templates-more-often.aspx#comments</comments><description>&lt;p&gt;Recently I have started creating item templates for visual studio. The first was for &lt;a href="http://blogs.microsoft.co.il/blogs/shaharron/archive/2008/01/22/rfid-event-handler-item-template.aspx" target="_blank"&gt;RfidEventHandler&lt;/a&gt; and there are more on the way. In this post I want to present why I think developers and architects should consider the use of item templates more often.&lt;/p&gt;
&lt;p&gt;I use quite a few project templates, most of which I found on the web. Item templates, on the other hand, are not so common and so far, I haven&amp;#39;t encountered any I can use. I think this feature is under used. It is overshadowed by its bigger and more popular brother: the project template and for really no reason. After getting acquainted with item templates, I can say that more than once I realized the project templates I find would have served me much better if they were implemented as item templates. &lt;/p&gt;
&lt;p&gt;My main use for VS templates is when I need to write components. I work a lot with BizTalk and there are quite a few extension components you can write for it. They need to implement various interfaces and it is convenient to get a class with the stub code for all the function already generated for you. When I use a project template to create a component I get a separate project for each component. I usually prefer to put all my components in the same DLL. Many of the components are a single file and there is no reason to have a few projects with one file each.&lt;/p&gt;
&lt;p&gt;Item templates solve my problem. I create an empty project with a properly general name like RfidEventHandlers and then start adding components to it using the component template. Except creating the project, an item template works the same way as a project template would: &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;It can add to the project more than one file if the component needs this. &lt;/li&gt;
&lt;li&gt;The template can specify which references to other projects\DLLs the component needs. The references will be added if they are not already in the project. &lt;/li&gt;
&lt;li&gt;It does text replacements the same way as the project template etc. &lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;One thing I always find problematic in project templates is that the project name and the namespace given to the classes are never what I need them to be. Project names should represent the content of the project. I prefer to give the project a short name. The namespace, on the other hand, should embody the project name but also represent its place in the overall hierarchy of code. For example MyCompany.MySystem.DataObjects). By default the namespace is created the same as the project name so I always need to set it manually in the project properties after it is created. The project name and namespace created by a template are either a fixed string or based on the given project name. In case of a project for a component this for sure will not be the name I wanted. It is easier to create the project with the name I want and set its default namespace before I start adding classes to it then to change this in a project that was created by the template. In item templates I just specify that the generated classes will get the default namespace of the project and when I add then I know they will get the namespace I wanted.&lt;/p&gt;
&lt;p&gt;Don&amp;#39;t get me wrong, project templates are a good thing and should be used. They are the right choice if your project needs artifacts which are relevant to the entire project. Things like configuration, setups and tests. I recommend, as I mentioned before, to create a combination of a project template for the sets up a project for components of a specific type and an item template to add components of that type.&lt;/p&gt;
&lt;p&gt;Creating item templates is very easy and I really recommend that you to consider creating some also for your own classes. For example I found it helps to enforce the use of an infrastructure layer. My generated classes include code that initializes the infrastructure classes and contains code samples with explanations of how it should be used (in comments). In some cases the generated class will come with utility functions like a log function that add internally the class name to each log line. &lt;/p&gt;
&lt;p&gt;Another use is to help maintain design patterns. Many of the patterns require a set of classes that will inherit from a common interface. New classes might be added by developers, sometime even a long time after the design was done and by developers that knows nothing about the architecture. To write such a class, a developer needs to look into the documentation to find which interfaces the component should inherit from and find what each of the functions in it should do. Item templates enable a developer who knows nothing about how to create the class, to do so in a few clicks. All that is needed is to know the class type. The template will generate the class for the developer with the right inheritance and stubs for the functions with default implementations. Most importantly- there will be explanations inside the code about what each function should do. This is my favorite way of learning- I think a sample with explanations in the code is the best kind of documentation. &lt;/p&gt;
&lt;p&gt;When I first started to learn how to create an item template for Visual Studio I found this &lt;a href="http://jasonkemp.ca/articles/206.aspx"&gt;blog post&lt;/a&gt; by &lt;a href="http://jasonkemp.ca/Default.aspx"&gt;Jason Kemp&lt;/a&gt; very helpfully and obviously had a look at the &lt;a href="http://msdn2.microsoft.com/xsxc3ete.aspx"&gt;MSDN&lt;/a&gt; for all the small details. &lt;/p&gt;
&lt;p&gt;Next thing I did was to look for samples. First I searched my computer and what I found was where VS keeps the templates for the standard items that comes with the installation (class, config, etc). This is the best resource since I can pick the item most similar to the one I want to create and look how it is implemented. These templates are placed for VS2008 in the folder: &amp;#39;C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\ItemTemplates&amp;#39;. If you use VS2005, the VS folder name is &amp;#39;Microsoft Visual Studio 8&amp;#39;. You can find the unzipped versions of the templates in &amp;#39;C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\ItemTemplatesCache&amp;#39;. &lt;/p&gt;
&lt;p&gt;I&amp;#39;ll be happy for&amp;nbsp;more&amp;nbsp;thoughts and comments on the subject if you have any.&lt;/p&gt;&lt;img src="http://blogs.microsoft.co.il/aggbug.aspx?PostID=54106" width="1" height="1"&gt;</description><category domain="http://blogs.microsoft.co.il/blogs/shaharron/archive/tags/Visual+Studio/default.aspx">Visual Studio</category></item><item><title>RFID event handler Visual Studio item template</title><link>http://blogs.microsoft.co.il/blogs/shaharron/archive/2008/01/22/rfid-event-handler-item-template.aspx</link><pubDate>Wed, 23 Jan 2008 03:12:00 GMT</pubDate><guid isPermaLink="false">b5c4f5bc-c09b-4439-a595-91a98c1847df:53828</guid><dc:creator>ShaharRon</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.microsoft.co.il/blogs/shaharron/rsscomments.aspx?PostID=53828</wfw:commentRss><comments>http://blogs.microsoft.co.il/blogs/shaharron/archive/2008/01/22/rfid-event-handler-item-template.aspx#comments</comments><description>&lt;p&gt;I have been working recently with Microsoft RFID and been writing various event handlers. I&amp;#39;m using &lt;a href="http://developers.de/blogs/damir_dobric/default.aspx" target="_blank"&gt;Damir Dobric&lt;/a&gt; &lt;a class="" href="http://developers.de/files/folders/damir_dobric/entry1651.aspx" target="_blank"&gt;event handler project template&lt;/a&gt; to create my projects. &lt;/p&gt;
&lt;p&gt;When I want to have a few handlers in the same project currently created a copy of the existing handler file and then edit it to become the new handler. After a few time I have decided to add a Visual Studio item template for adding event handler classes to an existing project.&amp;nbsp;I have another&amp;nbsp;post about&amp;nbsp;my thoughts when to use&amp;nbsp;Visual Studio item templates which you can find &lt;a class="" href="http://blogs.microsoft.co.il/blogs/shaharron/archive/2008/01/24/why-we-should-use-visual-studio-item-templates-more-often.aspx" target="_blank"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;All you have to do to work with it is copy &lt;a class="" href="http://blogs.microsoft.co.il/blogs/shaharron/RfidEventHandlerItemTemplate.zip" target="_blank"&gt;the zip file from here&lt;/a&gt;&amp;nbsp;and put it as is (meaning left zipped) in the folder&amp;nbsp;...\My Documents\Visual Studio 2008\Templates\ItemTemplates\Visual C#. If you use VS 2005 this should work as well. The path is the same just with Visual Studio 2005 (if you still use VS2003 its time to upgrade yourself). &lt;/p&gt;
&lt;p&gt;I found that creating item templates is very easy and I plan to do a few more (for example for BizTalk pipeline components) and will post them as here as well.&lt;/p&gt;&lt;img src="http://blogs.microsoft.co.il/aggbug.aspx?PostID=53828" width="1" height="1"&gt;</description><category domain="http://blogs.microsoft.co.il/blogs/shaharron/archive/tags/RFID/default.aspx">RFID</category></item><item><title>Automatic generation of BizTalk DB restore SQL</title><link>http://blogs.microsoft.co.il/blogs/shaharron/archive/2008/01/21/automatic-generation-of-biztalk-db-restore-sql.aspx</link><pubDate>Mon, 21 Jan 2008 05:16:00 GMT</pubDate><guid isPermaLink="false">b5c4f5bc-c09b-4439-a595-91a98c1847df:52586</guid><dc:creator>ShaharRon</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.microsoft.co.il/blogs/shaharron/rsscomments.aspx?PostID=52586</wfw:commentRss><comments>http://blogs.microsoft.co.il/blogs/shaharron/archive/2008/01/21/automatic-generation-of-biztalk-db-restore-sql.aspx#comments</comments><description>&lt;p&gt;When backing up the BizTalk databases you need to use BizTalk backup job for that since creating a regular maintenance task is not enough. The reason is that the BizTalk mechanism ensures that all the DBs BizTalk needs are backed up in a way that can be later restored to a synchronized point, this is done by entering a transaction marker to all the DBs before the backup. This marker will appear in their log. When performing the restore action, all the DBs should be restored up to that marker. &lt;/p&gt;
&lt;p&gt;The steps for performing a restore of a DB to a marker are: &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Restore the last full backup. &lt;/li&gt;
&lt;li&gt;Restore all the log backups since the full backup except the last. &lt;/li&gt;
&lt;li&gt;Restore the last log backup up to the marker &lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;If you have applicative DBs that you need to be synchronized with BizTalk it is possible to add them to use the same mechanism so they will be backed up by the BizTalk backup job (see instruction how to &lt;a title="How to Back Up Custom Databases" href="http://msdn2.microsoft.com/aa561198.aspx" target="_blank"&gt;here&lt;/a&gt;). &lt;/p&gt;
&lt;p&gt;When&amp;nbsp; performing a disaster recovery restore you need to perform the restore steps to all the DBs so they will all be restored to the same point and be synchronized, otherwise there is a risk BizTalk will fail to operate correctly. &lt;/p&gt;
&lt;p&gt;There are detailed instructions how to perform such a restore in the BizTalk &lt;a title="Backing Up and Restoring BizTalk Server Databases" href="http://technet.microsoft.com/en-us/library/aa561125.aspx" target="_blank"&gt;documentation&lt;/a&gt;&amp;nbsp; but this is not an easy task. For example a common configuration of the backup job is to run a full backup once a week and do a log backup a few times a day. This means that in the case of a disaster you might end up having to restore over 50 files which is a lot. It is important you restore them in the right order and you have to figure out which files need to be fully restored and which restored just up to the marker. &lt;/p&gt;
&lt;p&gt;I doubt if during a crisis anybody can remembers this complex logic or will have the time to read the documentation to learn how to do it properly. Also if there is somebody who is an expert with the procedure there are so many steps to perform that if done manually the chances for a mistake are too high. &lt;/p&gt;
&lt;p&gt;This is why I decided to generate the restore script automatically as part of the backup process. I added a step to the backup job that creates the SQL script for restoring the DBs. This way each backup run creates the SQL script needed for restoring the DBs that were backed up and to that specific point in time (= the marker point created on that run). &lt;/p&gt;
&lt;p&gt;To write the SQL to a file I used the job step &amp;#39;output&amp;#39; option. The step has an SQL which returns the lines needed for the restore. I do this by creating a temp table with one column and insert into it the SQL lines I need. I then perform a select on that table which is outputted by the step to a file. &lt;/p&gt;
&lt;p&gt;To add the step perform the following: &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Add a new step to the BizTalk backup job (Backup BizTalk Server...) and name it &amp;quot;Create Restore Script&amp;quot; &lt;/li&gt;
&lt;li&gt;Set the step type to T-SQL &lt;/li&gt;
&lt;li&gt;Set the Database to your BizTalk management DB (default is BizTalkMgmtDb)&amp;nbsp; &lt;/li&gt;
&lt;li&gt;Enter as the SQL command &lt;a class="" href="http://blogs.microsoft.co.il/blogs/shaharron/Generate%20Restore%20SQL.zip" target="_blank"&gt;this script&lt;/a&gt;.&amp;nbsp; &lt;/li&gt;
&lt;li&gt;Switch to the advanced tab and set in the output file where you want the script to be written. I recommend it will be placed in the same directory as the log backup files. &lt;/li&gt;
&lt;li&gt;Check the &amp;quot;Append output to existing file&amp;quot;. This will make sure you don&amp;#39;t override the file and so keep also the script of the previous runs so it will be possible to restore your environment back also to them. &lt;/li&gt;
&lt;li&gt;Go to step 3 (the last in the original job) and change in the advance tab so on success it will continue to the next step. &lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;I have also prepared&amp;nbsp;&lt;a class="" href="http://blogs.microsoft.co.il/blogs/shaharron/Add%20Generate%20Restore%20script%20step%20to%20BizTalk%20backup%20job.zip" target="_blank"&gt;a script&lt;/a&gt;&amp;nbsp;which adds the step to the job. Before you run it you should do a &amp;#39;replace text&amp;#39; in the file to all the places where written %RestoreDataDir% with the directory you want your script file to be written to (for example D:\DBRestoreData). You can also do that after you run the script by opening the new step configuration and changing the output file location in the advanced tab configuration. &lt;/p&gt;
&lt;p&gt;I don&amp;#39;t wish anyone to ever have to use the generated restore script but if the need comes I hope this will help restoring BizTalk a bit easier. &lt;/p&gt;&lt;img src="http://blogs.microsoft.co.il/aggbug.aspx?PostID=52586" width="1" height="1"&gt;</description><category domain="http://blogs.microsoft.co.il/blogs/shaharron/archive/tags/BizTalk/default.aspx">BizTalk</category></item><item><title>Automatic DLL unloading in BizTalk interferes with data caching</title><link>http://blogs.microsoft.co.il/blogs/shaharron/archive/2008/01/15/data-caching-is-disturbed-by-dll-unloading-in-biztalk.aspx</link><pubDate>Tue, 15 Jan 2008 07:23:00 GMT</pubDate><guid isPermaLink="false">b5c4f5bc-c09b-4439-a595-91a98c1847df:50282</guid><dc:creator>ShaharRon</dc:creator><slash:comments>3</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.microsoft.co.il/blogs/shaharron/rsscomments.aspx?PostID=50282</wfw:commentRss><comments>http://blogs.microsoft.co.il/blogs/shaharron/archive/2008/01/15/data-caching-is-disturbed-by-dll-unloading-in-biztalk.aspx#comments</comments><description>&lt;span style="mso-ascii-font-family:calibri;mso-hansi-font-family:calibri;"&gt;&lt;span style="mso-ascii-font-family:calibri;mso-hansi-font-family:calibri;"&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-ascii-font-family:calibri;mso-hansi-font-family:calibri;"&gt;&lt;/span&gt;
&lt;p&gt;In BizTalk we often cache data in memory to improve performance, for example conversion tables or configuration data. Cached data is usually kept in static variables. When a DLL is released from memory, all of his static members are released as well. When we write our application, DLLs are not unloaded until the application is shutdown, unless we specify this explicitly.&lt;/p&gt;
&lt;p&gt;BizTalk implements an internal logic of unloading DLLs from its memory. By default it unloads DLLs that have not been active for 30 minutes. If there is no instance of any of the orchestration types in a DLL, it will be unloaded already after 20 minutes. This mechanism also releases the regular NET DLLs that are referenced by the BizTalk DLLs. &lt;/p&gt;
&lt;p&gt;The rational is that we do not want to keep in memory DLLs we do not need, as it would be a waste of memory resources. The problem is that it means that when we create caches BizTalk default setup unloads them if they have not been used for over half an hour. &lt;/p&gt;
&lt;p&gt;We encountered a few cases of clients that complained about slow response from a service on the first call in the morning. This is because the first call included the loading time of the cache that was released during the night, when there was no activity. Another case was with a service that was called only a few times a day. We needed to improve its latency, and tried to do so by caching some conversion data in order to save roundtrips to the DB. We found that we increased the response time, as it turned out that each service call was loading an entire table and building the cache hashtable.&lt;/p&gt;
&lt;p&gt;BizTalk enables us to control this mechanism. In the documentation there is a “hidden” &lt;a href="http://msdn2.microsoft.com/en-us/library/aa578610.aspx"&gt;page&lt;/a&gt; that describes various &lt;/p&gt;
&lt;p&gt;sections you can add to the BizTalk config file, one of which tells BizTalk how the unload logic should be for specific DLLs. &lt;/p&gt;
&lt;p&gt;In this section you define AppDomains and which DLLs belong to them. Then you instruct each AppDomain how many seconds to wait before it should unload DLLs. If you specify &amp;quot;-1&amp;quot;, the DLLs will never be unloaded. It is possible to specify which DLLs belong to an AppDomain by explicitly using a DLL full name, or through regular expression filters to match DLLs name patterns.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;When writing a cache we plan to control when the data is loaded, and more importantly when it is released. If we are not aware of the automatic unloading mechanism of BizTalk, our caches will not behave as we planned. We need to add a configuration section and specify that the DLLs that do the caching will not be unloaded. &lt;/p&gt;
&lt;p&gt;Here is an example of what it should look like: &lt;/p&gt;&lt;pre class="csharpcode"&gt;&lt;font size="2"&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;lt;?&lt;/span&gt;&lt;span style="COLOR:#ff0000;"&gt;xml&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt; &lt;/span&gt;&lt;span style="COLOR:#000000;"&gt;version&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;=&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;1.0&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt; ?&amp;gt;
&amp;lt;&lt;/span&gt;&lt;span style="COLOR:#ff0000;"&gt;configuration&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;gt;
   &amp;lt;&lt;/span&gt;&lt;span style="COLOR:#ff0000;"&gt;configSections&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;gt;
      &amp;lt;&lt;/span&gt;&lt;span style="COLOR:#ff0000;"&gt;section&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt; &lt;/span&gt;&lt;span style="COLOR:#000000;"&gt;name&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;=&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;xlangs&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt; 
               &lt;/span&gt;&lt;span style="COLOR:#000000;"&gt;type&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;=&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;Microsoft.XLANGs.BizTalk.CrossProcess.&lt;br /&gt;      XmlSerializationConfigurationSectionHandler, &lt;br /&gt;      Microsoft.XLANGs.BizTalk.CrossProcess&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt; /&amp;gt;
   &amp;lt;/&lt;/span&gt;&lt;span style="COLOR:#ff0000;"&gt;configSections&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;gt;
   &amp;lt;&lt;/span&gt;&lt;span style="COLOR:#ff0000;"&gt;xlangs&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;gt;
      &amp;lt;&lt;/span&gt;&lt;span style="COLOR:#ff0000;"&gt;Configuration&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;gt;
         &amp;lt;&lt;/span&gt;&lt;span style="COLOR:#ff0000;"&gt;AppDomains&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt; &lt;/span&gt;&lt;span style="COLOR:#000000;"&gt;AssembliesPerDomain&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;=&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;10&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;gt;
            &amp;lt;&lt;/span&gt;&lt;span style="COLOR:#ff0000;"&gt;DefaultSpec&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt; &lt;/span&gt;&lt;span style="COLOR:#000000;"&gt;SecondsIdleBeforeShutdown&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;=&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;1200&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt; 
                         &lt;/span&gt;&lt;span style="COLOR:#000000;"&gt;SecondsEmptyBeforeShutdown&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;=&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;1800&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;/&amp;gt;
            &amp;lt;&lt;/span&gt;&lt;span style="COLOR:#ff0000;"&gt;AppDomainSpecs&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;gt;
               &amp;lt;&lt;/span&gt;&lt;span style="COLOR:#ff0000;"&gt;AppDomainSpec&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt; &lt;/span&gt;&lt;span style="COLOR:#000000;"&gt;Name&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;=&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;MyCachingDomain&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt; 
                              &lt;/span&gt;&lt;span style="COLOR:#000000;"&gt;SecondsIdleBeforeShutdown&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;=&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;-1&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt; 
                              &lt;/span&gt;&lt;span style="COLOR:#000000;"&gt;SecondsEmptyBeforeShutdown&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;=&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;-1&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;/&amp;gt;               
            &amp;lt;/&lt;/span&gt;&lt;span style="COLOR:#ff0000;"&gt;AppDomainSpecs&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;gt;
            &amp;lt;&lt;/span&gt;&lt;span style="COLOR:#ff0000;"&gt;ExactAssignmentRules&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;gt;
               &amp;lt;&lt;/span&gt;&lt;span style="COLOR:#ff0000;"&gt;ExactAssignmentRule&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt; &lt;/span&gt;&lt;span style="COLOR:#000000;"&gt;AssemblyName&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;=&amp;quot;M&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;yCache1, Version=1.0.0.0, &lt;br /&gt;        Culture=neutral, PublicKeyToken=9c7731c5584592ad&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt; 
                                    &lt;/span&gt;&lt;span style="COLOR:#000000;"&gt;AppDomainName&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;=&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;&lt;span style="COLOR:#0000ff;"&gt;MyCachingDomain&lt;/span&gt;=&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;/&amp;gt;
            &amp;lt;/&lt;/span&gt;&lt;span style="COLOR:#ff0000;"&gt;ExactAssignmentRules&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;gt;            
            &amp;lt;&lt;/span&gt;&lt;span style="COLOR:#ff0000;"&gt;PatternAssignmentRules&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;gt;
               &amp;lt;&lt;/span&gt;&lt;span style="COLOR:#ff0000;"&gt;PatternAssignmentRule&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt; &lt;/span&gt;&lt;span style="COLOR:#000000;"&gt;AssemblyNameP&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;&lt;span style="COLOR:#000000;"&gt;attern&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;=&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;MyCache*&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt; 
                                    &lt;/span&gt;&lt;span style="COLOR:#000000;"&gt;AppDomainName&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;=&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;MyCachingDomain&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt; /&amp;gt;
            &amp;lt;/&lt;/span&gt;&lt;span style="COLOR:#ff0000;"&gt;PatternAssignmentRules&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;gt;
         &amp;lt;/&lt;/span&gt;&lt;span style="COLOR:#ff0000;"&gt;AppDomains&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;gt;
      &amp;lt;/&lt;/span&gt;&lt;span style="COLOR:#ff0000;"&gt;Configuration&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;gt;
   &amp;lt;/&lt;/span&gt;&lt;span style="COLOR:#ff0000;"&gt;xlangs&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;gt;
&amp;lt;/&lt;/span&gt;&lt;span style="COLOR:#ff0000;"&gt;configuration&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="mso-ascii-font-family:calibri;mso-hansi-font-family:calibri;"&gt;&lt;font face="Calibri"&gt;&lt;font size="3"&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;/pre&gt;
&lt;p&gt;You can download the sample above from here &lt;a href="http://blogs.microsoft.co.il/blogs/shaharron/BizTalk%20DLL%20Unloading.zip"&gt;BizTalk DLL Unloading.zip&lt;/a&gt;. The zip contains also a more detailed example with all the config options including explanations about each field can be downloaded &lt;a href="http://blogs.microsoft.co.il/blogs/shaharron/BizTalk%20DLL%20Unloading.zip" target="_blank"&gt;here&lt;/a&gt; This is a corrected version I made of the sample in the BizTalk documentation which is erroneous. The source there includes garbage text that makes the config XML invalid. Also, in my version I simplified the explanations and removed parts that are not related to the unload logic. The parts that have been removed are additional configurations of the AppDomain which can also be very useful but are out of scope for this post. &lt;/p&gt;&lt;img src="http://blogs.microsoft.co.il/aggbug.aspx?PostID=50282" width="1" height="1"&gt;</description><category domain="http://blogs.microsoft.co.il/blogs/shaharron/archive/tags/BizTalk/default.aspx">BizTalk</category></item></channel></rss>