<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>MSDN Blogs</title>
	<atom:link href="http://msdnrss.thecoderblogs.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://msdnrss.thecoderblogs.com</link>
	<description>via RSS Feed &#38; Other Development Resources</description>
	<lastBuildDate>Mon, 21 May 2012 22:59:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
		<item>
		<title>CloudTip #15-MEET Windows Azure</title>
		<link>http://msdnrss.thecoderblogs.com/2012/05/cloudtip-15-meet-windows-azure/</link>
		<comments>http://msdnrss.thecoderblogs.com/2012/05/cloudtip-15-meet-windows-azure/#comments</comments>
		<pubDate>Mon, 21 May 2012 22:59:13 +0000</pubDate>
		<dc:creator>Code Monkey</dc:creator>
				<category><![CDATA[MSDN Blog]]></category>

		<guid isPermaLink="false">http://msdnrss.thecoderblogs.com/2012/05/cloudtip-15-meet-windows-azure/</guid>
		<description><![CDATA[The Cloud comes in many flavors, types and shapes and the terminology can be daunting. You’ve got Public vs. Private. vs. Home grown. You’ve got compute, storage and database not to mention identity, caching, service bus and many more. Then &#8230;<p class="read-more"><a href="http://msdnrss.thecoderblogs.com/2012/05/cloudtip-15-meet-windows-azure/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<!-- AdSense Now! V1.98 -->
<!-- Post[count: 2] -->
<div class="adsense adsense-leadin" style="float:right;margin: 12px;"><script type="text/javascript"><!--
google_ad_client = "ca-pub-0070021183285208";
/* 300x250, created 7/24/10 */
google_ad_slot = "3375814894";
google_ad_width = 300;
google_ad_height = 250;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div><p><a title="Web Analytics" href="http://www.omniture.com"><img border="0" alt="" src="http://msdnrss.thecoderblogs.com/wp-content/plugins/wp-o-matic/cache/b0dc2_0" width="1" height="1" /></a>
<p><a href="http://aka.ms/MeetAzMB"><img style="border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;float: right;padding-top: 0px;padding-left: 0px;padding-right: 0px;border-top-width: 0px" border="0" alt="image" align="right" src="http://msdnrss.thecoderblogs.com/wp-content/plugins/wp-o-matic/cache/c3407_7242.image_5F00_7361DACB.png" width="240" height="207" /></a>The Cloud comes in many flavors, types and shapes and the terminology can be daunting. You’ve got Public vs. Private. vs. Home grown. You’ve got compute, storage and database not to mention identity, caching, service bus and many more. Then there are the several players including Microsoft, Amazon, Rackspace, Force, and too many others to list them all. </p>
<p>That’s a lot to learn, but if you’re curious to see what’s been happening with the Microsoft Cloud and get a feel for the direction things are heading then you want to check out the recently announced Microsoft event “Meet Windows Azure” live in San Francisco on June 7, where the people who are in the drivers seat will take time to share their space.</p>
<p>While the details are sparse so far you can get more information on <a href="http://aka.ms/MeetAzMB">http://MeetWindowsAzure.com</a> , as well as follow the happenings on <a href="https://twitter.com/#!/windowsazure">twitter</a>. It looks like an interesting event you won’t want to miss. With people like Scott Guthrie it’s sure to be full of great examples of what and how you can get started with Windows Azure and learn more about what you need to know to get started today. </p>
<p>Check it out today!</p>
<p>-mike</p>
<div></div>
<p><img src="http://msdnrss.thecoderblogs.com/wp-content/plugins/wp-o-matic/cache/f764c_aggbug.aspx?PostID=10308423" width="1" height="1" /></p>
]]></content:encoded>
			<wfw:commentRss>http://msdnrss.thecoderblogs.com/2012/05/cloudtip-15-meet-windows-azure/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cumulative Update #10 for SQL Server 2008 Service Pack 2</title>
		<link>http://msdnrss.thecoderblogs.com/2012/05/cumulative-update-10-for-sql-server-2008-service-pack-2/</link>
		<comments>http://msdnrss.thecoderblogs.com/2012/05/cumulative-update-10-for-sql-server-2008-service-pack-2/#comments</comments>
		<pubDate>Mon, 21 May 2012 21:59:09 +0000</pubDate>
		<dc:creator>Code Monkey</dc:creator>
				<category><![CDATA[MSDN Blog]]></category>

		<guid isPermaLink="false">http://msdnrss.thecoderblogs.com/2012/05/cumulative-update-10-for-sql-server-2008-service-pack-2/</guid>
		<description><![CDATA[Dear Customers, Keep your system up to date with the most recent cumulative update package for SQL Server 2008 SP2. This package contains all of the SQL Server 2008 hotfixes that have been released since the initial release of SQL &#8230;<p class="read-more"><a href="http://msdnrss.thecoderblogs.com/2012/05/cumulative-update-10-for-sql-server-2008-service-pack-2/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p>Dear Customers,<br />
 Keep your system up to date with the most recent cumulative update package for SQL Server 2008 SP2. This package contains all of the SQL Server 2008 hotfixes that have been released since the initial release of SQL Server 2008 SP2. </p>
<p> CU#10 KB Article: http://support.microsoft.com/kb/2696625 </p>
<p> Understanding Incremental Servicing Model for SQL Server </p>
<p> SQL Server Support Information: http://support.microsoft.com/ph/2855 </p>
<p> Previous CU KB Articles: </p>
<p>&#8230;(<a href="http://blogs.msdn.com/b/sqlreleaseservices/archive/2012/05/21/cumulative-update-10-for-sql-server-2008-service-pack-2.aspx">read more</a>)<img src="http://msdnrss.thecoderblogs.com/wp-content/plugins/wp-o-matic/cache/1b6c1_aggbug.aspx?PostID=10308383" width="1" height="1" /></p>
]]></content:encoded>
			<wfw:commentRss>http://msdnrss.thecoderblogs.com/2012/05/cumulative-update-10-for-sql-server-2008-service-pack-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Top 10 Microsoft Developer Links for Monday, May 21st</title>
		<link>http://msdnrss.thecoderblogs.com/2012/05/top-10-microsoft-developer-links-for-monday-may-21st/</link>
		<comments>http://msdnrss.thecoderblogs.com/2012/05/top-10-microsoft-developer-links-for-monday-may-21st/#comments</comments>
		<pubDate>Mon, 21 May 2012 20:59:10 +0000</pubDate>
		<dc:creator>Code Monkey</dc:creator>
				<category><![CDATA[MSDN Blog]]></category>

		<guid isPermaLink="false">http://msdnrss.thecoderblogs.com/2012/05/top-10-microsoft-developer-links-for-monday-may-21st/</guid>
		<description><![CDATA[Tim Heuer: Using SQLite in a Metro style app Andrea Boschin: Windows 8 Metro: Something about application lifecycle Brian Harry: Progress on CodePlex pull requests Laura_ADM: An Introduction to ALM &#8211; Architecture Ashraf Abdulhadi: Hands On: LinkedIn Windows Phone App &#8230;<p class="read-more"><a href="http://msdnrss.thecoderblogs.com/2012/05/top-10-microsoft-developer-links-for-monday-may-21st/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<ol>
<li>Tim Heuer: <a href="http://cot.ag/J8zUjo">Using SQLite in a Metro style app</a> </li>
<li>Andrea Boschin: <a href="http://cot.ag/KFJfEs">Windows 8 Metro: Something about application lifecycle</a> </li>
<li>Brian Harry: <a href="http://cot.ag/J8AtcX">Progress on CodePlex pull requests</a> </li>
<li>Laura_ADM: <a href="http://cot.ag/KFJjUJ">An Introduction to ALM &#8211; Architecture</a> </li>
<li>Ashraf Abdulhadi: <a href="http://cot.ag/J8A76e">Hands On: LinkedIn Windows Phone App Better Than iOS, Android Versions</a> </li>
<li>Michael S. Kaplan: <a href="http://cot.ag/KFJrUd">There&#8217;s no &quot;I&quot; in IDN, part 13: Desktop and Managed and Metro; oh my!</a> </li>
<li>The Official Microsoft Blog: <a href="http://cot.ag/KFJxLJ">Microsoft is Imagining a NUI future</a> </li>
<li>The Code Project: <a href="http://cot.ag/J8AiP0">Hacking for fun: porting a Silverlight Windows Phone app to WinRT in 9hours</a> </li>
<li>Brian T. Hitney: <a href="http://cot.ag/J8AlKF">Getting an App in the Windows Store: What, Why, and How</a> </li>
<li>Daniel Moth: <a href="http://cot.ag/KFJShl">Libraries for C++ AMP</a> </li>
</ol>
<p><span><a title="Visual Studio on Facebook" href="http://www.facebook.com/visualstudio">Visual Studio on Facebook</a> | <a title="Follow @VisualStudio on Twitter" href="http://twitter.com/#!/visualstudio">Follow @VisualStudio on Twitter</a> | <a title="Learn more about Visual Studio" href="http://www.microsoft.com/visualstudio">Learn more about Visual Studio</a> | <a title="Visual Studio Testing Tools" href="http://www.microsoft.com/visualstudio/en-us/visual-studio-testing-tools">Visual Studio Testing Tools</a> | <a title="Upgrade from VSS to TFS" href="http://www.microsoft.com/visualstudio/en-us/upgrade-visual-sourcesafe">Upgrade from Visual SourceSafe</a></span></p>
<p><span><a title="Learn more about Visual Studio 11 Beta" href="http://go.microsoft.com/fwlink/p/?linkid=240160">Visual Studio 11 Beta</a></span></p>
<p>1554</p>
<div></div>
<p><img src="http://msdnrss.thecoderblogs.com/wp-content/plugins/wp-o-matic/cache/e59cb_aggbug.aspx?PostID=10308376" width="1" height="1" /></p>
]]></content:encoded>
			<wfw:commentRss>http://msdnrss.thecoderblogs.com/2012/05/top-10-microsoft-developer-links-for-monday-may-21st/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Windows Azure Recipe: Consumer Portal</title>
		<link>http://msdnrss.thecoderblogs.com/2012/05/windows-azure-recipe-consumer-portal/</link>
		<comments>http://msdnrss.thecoderblogs.com/2012/05/windows-azure-recipe-consumer-portal/#comments</comments>
		<pubDate>Mon, 21 May 2012 19:59:09 +0000</pubDate>
		<dc:creator>Code Monkey</dc:creator>
				<category><![CDATA[MSDN Blog]]></category>

		<guid isPermaLink="false">http://msdnrss.thecoderblogs.com/2012/05/windows-azure-recipe-consumer-portal/</guid>
		<description><![CDATA[Drivers Nearly every company on the internet has a web presence. Many are merely using theirs for informational purposes. More sophisticated portals allow customers to register their contact information and provide some level of interaction or customer &#8230;read more&#8230;(read more)]]></description>
			<content:encoded><![CDATA[<p>Drivers Nearly every company on the internet has a web presence. Many are merely using theirs for informational purposes. More sophisticated portals allow customers to register their contact information and provide some level of interaction or customer &#8230;read more&#8230;(<a href="http://blogs.msdn.com/b/uscloud/archive/2012/05/21/windows-azure-recipe-consumer-portal.aspx">read more</a>)<img src="http://msdnrss.thecoderblogs.com/wp-content/plugins/wp-o-matic/cache/d418c_aggbug.aspx?PostID=10308364" width="1" height="1" /></p>
]]></content:encoded>
			<wfw:commentRss>http://msdnrss.thecoderblogs.com/2012/05/windows-azure-recipe-consumer-portal/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Build the Next Great App at AngelHack June 23-24, 2012</title>
		<link>http://msdnrss.thecoderblogs.com/2012/05/build-the-next-great-app-at-angelhack-june-23-24-2012/</link>
		<comments>http://msdnrss.thecoderblogs.com/2012/05/build-the-next-great-app-at-angelhack-june-23-24-2012/#comments</comments>
		<pubDate>Mon, 21 May 2012 18:59:08 +0000</pubDate>
		<dc:creator>Code Monkey</dc:creator>
				<category><![CDATA[MSDN Blog]]></category>

		<guid isPermaLink="false">http://msdnrss.thecoderblogs.com/2012/05/build-the-next-great-app-at-angelhack-june-23-24-2012/</guid>
		<description><![CDATA[Have a great mobile, social or web app idea and need help getting it off the ground? Join the upcoming AngelHack weekend (June 23 &#38; 24 in Seattle, Palo Alto, Boston and New York City) and get one-on-one technical guidance &#8230;<p class="read-more"><a href="http://msdnrss.thecoderblogs.com/2012/05/build-the-next-great-app-at-angelhack-june-23-24-2012/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p>Have a great mobile, social or web app idea and need help getting it off the ground? Join the upcoming <a href="http://angelhack.com/" target="_blank">AngelHack</a> weekend (June 23 &amp; 24 in Seattle, Palo Alto, Boston and New York City) and get one-on-one technical guidance and resources from the community and sponsors such as <a href="https://www.windowsazure.com/en-us/pricing/free-trial/?WT.mc_id=cmp_pst001_blg_post0113" target="_blank">Windows Azure</a>, DWOLLA, Klout and more.</p>
<p>Finalists from each of the four hackathons will compete for the grand prize to be awarded on July 12 in Palo Alto &#8211; ,000 in seed money, free Windows Azure for one year, and unlimited bragging rights, among other prizes.</p>
<p>Space is limited &ndash; register for <a href="http://angelhack.com/" target="_blank">AngelHack</a> today.</p>
<div></div>
<p><img src="http://msdnrss.thecoderblogs.com/wp-content/plugins/wp-o-matic/cache/15065_aggbug.aspx?PostID=10308298" width="1" height="1" /></p>
]]></content:encoded>
			<wfw:commentRss>http://msdnrss.thecoderblogs.com/2012/05/build-the-next-great-app-at-angelhack-june-23-24-2012/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SCOM 2012 de Resource Pool nedir, ne yapar?</title>
		<link>http://msdnrss.thecoderblogs.com/2012/05/scom-2012-de-resource-pool-nedir-ne-yapar/</link>
		<comments>http://msdnrss.thecoderblogs.com/2012/05/scom-2012-de-resource-pool-nedir-ne-yapar/#comments</comments>
		<pubDate>Mon, 21 May 2012 17:59:13 +0000</pubDate>
		<dc:creator>Code Monkey</dc:creator>
				<category><![CDATA[MSDN Blog]]></category>

		<guid isPermaLink="false">http://msdnrss.thecoderblogs.com/2012/05/scom-2012-de-resource-pool-nedir-ne-yapar/</guid>
		<description><![CDATA[&#160;Sorulan ve sorulmas? gereken en &#246;nemli soru budur. Konuyu olabildi?ince net ve basit&#231;e a&#231;?klamaya &#231;al??aca??m. Resource Pool veya t&#252;rk&#231;e birbir &#231;evirisi olan kaynak havuzununa&#160; &#8220;object instance&#8221; tahsis edilen nesnelerini y&#246;neten &#8220;Health Service&#8221; toplulu?u diyebilirz. En basit tabiri ile sanal bir &#8230;<p class="read-more"><a href="http://msdnrss.thecoderblogs.com/2012/05/scom-2012-de-resource-pool-nedir-ne-yapar/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p>&nbsp;<span><span>Sorulan ve sorulmas? gereken en &ouml;nemli soru budur. Konuyu olabildi?ince net ve basit&ccedil;e a&ccedil;?klamaya &ccedil;al??aca??m.</span></span></p>
<p lang="tr"><span><span>Resource Pool veya t&uuml;rk&ccedil;e birbir &ccedil;evirisi olan kaynak havuzununa<span>&nbsp; </span>&#8220;object instance&#8221; tahsis edilen nesnelerini y&ouml;neten &#8220;Health Service&#8221; toplulu?u diyebilirz. En basit tabiri ile sanal bir health servis olarak bakabiliriz. Bir resource pool&#8217;a tahsis edilen &ldquo;instance&rdquo;lar bu resource pool taraf?ndan i?lenmekte ve bir failover durumunda di?er resource pool bu i?lemleri devralmaktad?r.</span></span></p>
<p lang="tr"><span><span>&nbsp;</span></span></p>
<p lang="tr"><span><span>Resource Poollar &#8220;lease&#8221; mant??? ile &ccedil;al??makta, buna en g&uuml;zel &ouml;rnek DHCP servisi olacakt?r. Bir MS lease edilen &ouml;l&ccedil;&uuml;de bir &#8220;managed entity&#8221; i monitor etmekte. ?ayet MS&#8217;in veya di?er ad?yla &#8220;Pool Member&#8221; ?n lease s&uuml;resi ge&ccedil;mise bu MS art?k uygun de?ildir ve bir process ba?lat?l?r ve duruma g&ouml;re ba?ka bir MS veya eski MS uygunsa bu g&ouml;rev yine ona verilir. Bu u&ccedil; bir &ouml;rnek olup lease s&uuml;resi domadan yenilenir ve MS g&ouml;revine devam eder.</span></span></p>
<p lang="tr"><span><span>&nbsp;</span></span></p>
<p lang="tr"><span><span>2012 de art?k bir RMS olmamas?<span>&nbsp; </span>en b&uuml;y&uuml;k &ouml;zelliklerden bir tanesi olmu?tur. O zaman RMS yerine getirdi?i </span></span></p>
<p lang="tr"><span><span>&nbsp;</span></span></p>
<ol type="1">
<li><span><span><span>Group calculation</span></span></span></li>
</ol>
<ol type="1">
<li><span><span><span>Database grooming</span></span></span></li>
<li><span><span><span>Config olu?turma ve da??t?m?</span></span></span></li>
<li><span><span><span>Distributed Moni?tor health roll up</span></span></span></li>
</ol>
<p lang="tr"><span><span>&nbsp;</span></span></p>
<p lang="tr"><span><span>Kim taraf?ndan yap?lmakta?</span></span></p>
<p lang="tr"><span><span>Bu sorunun cevab? <span><strong>Resource Pool </strong></span>kavram?nda yatmak. Bu &ouml;nemli g&ouml;revleri MS lere da??t?m t&uuml;k&uuml; istedi?niz ?ekilde b&ouml;l&uuml;?t&uuml;rmeniz m&uuml;mk&uuml;n.</span></span></p>
<p lang="tr"><span><span>Baz? resource pool lara MS &uuml;yelikleri otomatik yap?lmakta ve bir &ccedil;ok durumda bunu de?i?tirmak m&uuml;mk&uuml;n. Yapman?z gerek:</span></span></p>
<p lang="tr"><span><span>&nbsp;</span></span></p>
<p lang="tr"><span><span>Operations Manager powershell konsolunu a&ccedil;al?m.</span></span></p>
<p lang="tr"><span><span>A?a??daki komutu &ccedil;al??t?ral?m:</span></span></p>
<p lang="tr"><span><span>&nbsp;</span></span></p>
<p><span><span><span lang="en-US"><span>Get-SCOMResourcePool -DisplayName &#8220;All Management Servers Resource Pool&#8221; |<span>&nbsp; </span>Set-SCOMResourcePool -EnableAutomaticMembership $FALSE</span></span><span lang="tr"><span> </span></span></span></span></p>
<p lang="tr"><span><span>&nbsp;</span></span></p>
<p lang="tr"><span><span>Bu komut ard?ndan g&ouml;recegimiz gibi Automatik den manualle<span>&nbsp; </span>d&ouml;nm&uuml;? olacak.</span></span></p>
<p lang="tr"><span><span>&nbsp;</span></span></p>
<p><a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-44-49-metablogapi/1374.clip_5F00_image001_5F00_688BF65C.png"><img style="padding-left: 0px;padding-right: 0px;padding-top: 0px;border: 0px" border="0" alt="clip_image001" src="http://msdnrss.thecoderblogs.com/wp-content/plugins/wp-o-matic/cache/7f06a_1374.clip_5F00_image001_5F00_thumb_5F00_0B008518.png" width="649" height="87" /></a></p>
<p lang="tr"><span><span>Ba?ka bir &ouml;nemli resource pool , Notification Resource pool dur. Ad?ndan anla?a?laca?? gibi bu pool notifikasyonlar?n management group i&ccedil;inde yollanmas? ile ilgili . Perfromans ama&ccedil;l? olarak bu pool la &uuml;ye olacak MS leri ekleyebilir ve &ccedil;?karabilirsiniz.</span></span></p>
<p lang="tr"><span><span>&nbsp;</span></span></p>
<p lang="tr"><span><span>&Ccedil;ok k?sa &uuml;zerinde durabilece?imiz ba?ka bir resource pool olan ve &#8220;Automatic &#8221; olarak gelen AD Assignment Resource Pool &#8216;undan bahsedece?im.<span>&nbsp; </span>Ad?ndan da anla??laca?? gibi &#8220;AD Integration&#8221; kulland???n?z durumda kullan?lmakta. Yine istenirse Notification resource Pool unda oldu?u gibi MS leri ekleme ve &ccedil;?karma i?lemleri yap?labilmekte.</span></span></p>
<p lang="tr"><span><span>&nbsp;</span></span></p>
<p lang="tr"><span><span>Kendi resource poolumuzu yaratabilirmiyiz? Elbette ve hatta b&uuml;y&uuml;k bir ortam?n?z var ve g&ouml;revleri payla?mak isterseniz bunu yapman??z? tavsiye ederim. ?&ouml;yle bir senaryo d&uuml;?&uuml;n&uuml;n, 10000 tane agent?n?z var ve bunlar? idare edecek 20 tane MS iniz var. Bu MS lere de?i?ik kaynaklar? tahsis etmek mant?kl? olur ve iyi bir denge sa?layabilirsiniz. Mesela bu kadar &ccedil;ok MS &#8216;in Notification Resource pool unda olmas? mant?l? de?il dir. Ortam b&uuml;y&uuml;d&uuml;kce bu tarz i?lemleri &#8220;cutomize&#8221; etmek her zaman mant?kl? olur.</span></span></p>
<p lang="tr"><span><span>&nbsp;</span></span></p>
<p lang="tr"><span><span>Bir resource pool yaratmak olduk&ccedil;a basit bir i?lem.</span></span></p>
<p lang="tr"><span><span>Konsolumuzda Administration/Resource Pool &#8216;ge&ccedil;ip Task alan?ndan &#8220;Create Resource Pool&#8221; diyelim ve a&ccedil;?lan sihirbazda bu pool&#8217;a bir isim verelim.</span></span></p>
<p lang="tr"><span><span>&nbsp;</span></span></p>
<p><a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-44-49-metablogapi/7563.clip_5F00_image002_5F00_50A50F36.png"><img style="padding-left: 0px;padding-right: 0px;padding-top: 0px;border: 0px" border="0" alt="clip_image002" src="http://msdnrss.thecoderblogs.com/wp-content/plugins/wp-o-matic/cache/52f21_3438.clip_5F00_image002_5F00_thumb_5F00_3C3F49AB.png" width="839" height="395" /></a></p>
<p lang="tr"><span><span>&nbsp;</span></span></p>
<p lang="tr"><span><span>Bu a?amada bu pool&#8217;a &uuml;ye olacak MS leri tan?mlayal?m.</span></span></p>
<p lang="tr"><span><span>&nbsp;</span></span></p>
<p><a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-44-49-metablogapi/8540.clip_5F00_image003_5F00_531E1B27.png"><img style="padding-left: 0px;padding-right: 0px;padding-top: 0px;border: 0px" border="0" alt="clip_image003" src="http://msdnrss.thecoderblogs.com/wp-content/plugins/wp-o-matic/cache/65d69_3441.clip_5F00_image003_5F00_thumb_5F00_18567251.png" width="511" height="481" /></a></p>
<p lang="tr"><span><span>&nbsp;</span></span></p>
<p lang="tr"><span><span>Eklemeyi yapt?ktan sonra Create dememiz yeterli ve Poolumuz haz?r.</span></span></p>
<p lang="tr"><span><span>&nbsp;</span></span></p>
<p lang="tr"><span><span>Ekstra bir resource pool&#8217;u Unix ve Linux makinalar?n y&ouml;netimi i&ccedil;in kullanman?z olduk&ccedil;a iyi bir &#8220;best pratrice olur&#8221;.</span></span></p>
<div></div>
<p><img src="http://msdnrss.thecoderblogs.com/wp-content/plugins/wp-o-matic/cache/69c9c_aggbug.aspx?PostID=10308235" width="1" height="1" /></p>
]]></content:encoded>
			<wfw:commentRss>http://msdnrss.thecoderblogs.com/2012/05/scom-2012-de-resource-pool-nedir-ne-yapar/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sample Browser v5.2 Update</title>
		<link>http://msdnrss.thecoderblogs.com/2012/05/sample-browser-v5-2-update/</link>
		<comments>http://msdnrss.thecoderblogs.com/2012/05/sample-browser-v5-2-update/#comments</comments>
		<pubDate>Mon, 21 May 2012 16:59:11 +0000</pubDate>
		<dc:creator>Code Monkey</dc:creator>
				<category><![CDATA[MSDN Blog]]></category>

		<guid isPermaLink="false">http://msdnrss.thecoderblogs.com/2012/05/sample-browser-v5-2-update/</guid>
		<description><![CDATA[The Sample Browser is updated again last weekend with the following feature improvements and bug fixes.&#160;&#160;&#160; If you have already installed Sample Browser, please reopen the application to get the auto-update.&#160;&#160; If it’s your first time to learn about Sample &#8230;<p class="read-more"><a href="http://msdnrss.thecoderblogs.com/2012/05/sample-browser-v5-2-update/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p>The Sample Browser is updated again last weekend with the following feature improvements and bug fixes.&#160;&#160;&#160; If you have already installed Sample Browser, please reopen the application to get the auto-update.&#160;&#160; If it’s your first time to learn about Sample Browser, you can install it from <a href="http://aka.ms/samplebrowser">http://aka.ms/samplebrowser</a> </p>
<p><img style="border: 0px currentcolor" border="0" alt="image" src="http://msdnrss.thecoderblogs.com/wp-content/plugins/wp-o-matic/cache/808b6_5483.image_5F00_16AD4F27.png" width="578" height="431" /></p>
<p>&#160;</p>
<p><strong>1. Added SQL Server to “Featured Samples”</strong></p>
<p><img style="border: 0px currentcolor" border="0" alt="image" src="http://msdnrss.thecoderblogs.com/wp-content/plugins/wp-o-matic/cache/7a2ac_6153.image_5F00_73105F27.png" width="319" height="197" /></p>
<p>&#160;</p>
<p><strong>2. Fixed an issue when the Sample Browser loads and resolves CSS style in sample documentation.</strong>&#160; Now the Sample Browser can resolve the CSS style correctly and display the nice documentation format:</p>
<p><img style="border: 0px currentcolor" border="0" alt="image" src="http://msdnrss.thecoderblogs.com/wp-content/plugins/wp-o-matic/cache/d4f9f_3652.image_5F00_345B61C1.png" width="579" height="509" /></p>
<p>&#160;</p>
<p><strong>3. Fixed UI Accessibility errors</strong></p>
<p>We fixed almost all errors reported by <a href="http://acccheck.codeplex.com/" target="_blank">AccChecker</a>.&#160; The Sample Browser has much better support of UI Accessibility now. Thank <strong>Rob Caplan</strong> for suggesting this.</p>
<p>&#160;</p>
<p><strong>Coming Soon</strong></p>
<p>1. We are adding UI localization support.&#160; In the first batch, we are adding Simplified Chinese and Japanese UI to the Sample Browser.</p>
<p>2. Easier access to the “Download All” function in the Sample Browser.</p>
<div></div>
<p><img src="http://msdnrss.thecoderblogs.com/wp-content/plugins/wp-o-matic/cache/d4f9f_aggbug.aspx?PostID=10308221" width="1" height="1" /></p>
]]></content:encoded>
			<wfw:commentRss>http://msdnrss.thecoderblogs.com/2012/05/sample-browser-v5-2-update/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Whither WM_UNICHAR in Windows 7 (and 8!)</title>
		<link>http://msdnrss.thecoderblogs.com/2012/05/whither-wm_unichar-in-windows-7-and-8/</link>
		<comments>http://msdnrss.thecoderblogs.com/2012/05/whither-wm_unichar-in-windows-7-and-8/#comments</comments>
		<pubDate>Mon, 21 May 2012 15:59:08 +0000</pubDate>
		<dc:creator>Code Monkey</dc:creator>
				<category><![CDATA[MSDN Blog]]></category>

		<guid isPermaLink="false">http://msdnrss.thecoderblogs.com/2012/05/whither-wm_unichar-in-windows-7-and-8/</guid>
		<description><![CDATA[The&#160; WM_UNICHAR message has had an interesting history. Over time it has come up in this Blog occasionally, in blogs like Will the real Unicode character message please stand up?, which tend to&#160;be more generous in suggesting apps on Windows &#8230;<p class="read-more"><a href="http://msdnrss.thecoderblogs.com/2012/05/whither-wm_unichar-in-windows-7-and-8/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p>The&nbsp; <a href="http://msdn.microsoft.com/library/windows/desktop/ms646288">WM_UNICHAR message</a> has had an interesting history.</p>
<p>Over time it has come up in this Blog occasionally, in blogs like <strong><a title="Will the real Unicode character message please stand up?" href="http://blogs.msdn.com/b/michkap/archive/2007/03/25/1945659.aspx">Will the real Unicode character message please stand up?</a></strong>, which tend to&nbsp;be more generous in suggesting apps on Windows should just take it if they want to, but by 2008 questions like <strong><a title="Why is my WM_UNICHAR handler never called?" href="http://stackoverflow.com/questions/378296/why-is-my-wm-unichar-handler-never-called">Why is my WM_UNICHAR handler never called?</a></strong> in Stack Overflow pointed out that the message itself crystallized&nbsp;it&#8217;s&nbsp;intent/purpose pretty clearly:</p>
<p><span>The WM_UNICHAR message is equivalent to WM_CHAR, but it uses Unicode Transformation Format (UTF)-32, whereas WM_CHAR uses UTF-16. It is designed to send or post Unicode characters to ANSI windows and it can can handle Unicode Supplementary Plane characters.</span></p>
<p>But the other day, when Marc asked (on behalf of&nbsp;a customer):</p>
<p><span>When is WM_UNICHAR used in Windows 7?&nbsp; I thought that I might be able to create WM_UNICHAR&nbsp; from an IME by entering a surrogate pair through Unicode input but I only saw WM_CHAR messages.&nbsp; Under what conditions will the&nbsp; WM_UNICHAR message be used?</span></p>
<p>There are reportedly still some 3rd party IMEs that use it even for Unicode windows, but IMEs from Microsoft have largely moved away from that.</p>
<p>I suspect it is largely a philosophical idea, and how strongly you feel that a single discrete character should always be returned &#8212; an issue some 3rd party IMEs do vote with their opinion.</p>
<p>But Microsoft IMEs have another good reason to move away from the view of &#8220;one character at a time&#8221; in such messages &#8212; <strong>Unicode Variation Selectors</strong>, discussed in blog like <strong><a title="UCS-2 to UTF-16, Part 10: Variation[ Selector] on a theme..." href="http://blogs.msdn.com/b/michkap/archive/2009/06/10/9723321.aspx">UCS-2 to UTF-16, Part 10: Variation[ Selector] on a theme&#8230;</a></strong>.</p>
<p>Now not every Microsoft IME is putting out variation selectors in its output, even in Windows 8.</p>
<p>But some of them do, and that&#8217;s enough to convince the IME team at Microsoft to not bother with the &#8220;incomplete&#8221; WM_UNICHAR.</p>
<p>I still believe that if you get the message, whether it is a Unicode window or not, you should accept it.</p>
<p>For the sake of those 3rd party IMEs, if nothing else.</p>
<p>But there are people who don&#8217;t bother now, since the docs now make it clear that&nbsp;this is &#8220;off brand&#8221; usage. So perhaps at this point I am tilting at windmills?</p>
<div></div>
<p><img src="http://msdnrss.thecoderblogs.com/wp-content/plugins/wp-o-matic/cache/f21c0_aggbug.aspx?PostID=10308135" width="1" height="1" /></p>
]]></content:encoded>
			<wfw:commentRss>http://msdnrss.thecoderblogs.com/2012/05/whither-wm_unichar-in-windows-7-and-8/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Avoiding Technical Debt</title>
		<link>http://msdnrss.thecoderblogs.com/2012/05/avoiding-technical-debt/</link>
		<comments>http://msdnrss.thecoderblogs.com/2012/05/avoiding-technical-debt/#comments</comments>
		<pubDate>Mon, 21 May 2012 14:59:07 +0000</pubDate>
		<dc:creator>Code Monkey</dc:creator>
				<category><![CDATA[MSDN Blog]]></category>

		<guid isPermaLink="false">http://msdnrss.thecoderblogs.com/2012/05/avoiding-technical-debt/</guid>
		<description><![CDATA[Among the myriad of reasons why I like employing Scrum for software development, I think the main reason is the frameworks ability to remove what is often called Technical Debt (TD) or Design Debt. Ward Cunnigham was the one who &#8230;<p class="read-more"><a href="http://msdnrss.thecoderblogs.com/2012/05/avoiding-technical-debt/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p>Among the myriad of reasons why I like employing Scrum for software development, I think the main reason is the frameworks ability to remove what is often called Technical Debt (TD) or Design Debt. Ward Cunnigham was the one who coined the term and simply put, the concept is when improper code is created, the assumption is to make the code &ldquo;complete&rdquo; at later date (i.e. refactoring) however these changes are shelved and never truly completed. The finance analogy would be using your high&#8230;(<a href="http://blogs.msdn.com/b/bryang/archive/2012/05/21/avoiding-technical-debt.aspx">read more</a>)<img src="http://msdnrss.thecoderblogs.com/wp-content/plugins/wp-o-matic/cache/913d9_aggbug.aspx?PostID=10307742" width="1" height="1" /></p>
]]></content:encoded>
			<wfw:commentRss>http://msdnrss.thecoderblogs.com/2012/05/avoiding-technical-debt/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fun with the Service Bus (Part 2)</title>
		<link>http://msdnrss.thecoderblogs.com/2012/05/fun-with-the-service-bus-part-2/</link>
		<comments>http://msdnrss.thecoderblogs.com/2012/05/fun-with-the-service-bus-part-2/#comments</comments>
		<pubDate>Mon, 21 May 2012 13:59:11 +0000</pubDate>
		<dc:creator>Code Monkey</dc:creator>
				<category><![CDATA[MSDN Blog]]></category>

		<guid isPermaLink="false">http://msdnrss.thecoderblogs.com/2012/05/fun-with-the-service-bus-part-2/</guid>
		<description><![CDATA[In Part 1, we looked at a scenario using the Service Bus as a WCF relay endpoint that allowed clients on the web to communicate with a WCF service hosted on my local machine.&#160; The workflow looks something like below, &#8230;<p class="read-more"><a href="http://msdnrss.thecoderblogs.com/2012/05/fun-with-the-service-bus-part-2/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p>In <a href="http://blogs.msdn.com/b/jimoneil/archive/2012/04/24/fun-with-the-service-bus-part-1.aspx">Part 1</a>, we looked at a scenario using the Service Bus as a WCF relay endpoint that allowed clients on the web to communicate with a WCF service hosted on my local machine.&#160; The workflow looks something like below, where a publically available endpoint (a simple ASP.NET application on Windows Azure) made calls to my service, self-hosted in a WPF application and running on my local machine, behind a firewall but attached to a relay endpoint in the Service Bus. </p>
<p><img style="border-right-width: 0px;margin: 25px auto 30px;padding-left: 0px;padding-right: 0px;float: none;border-top-width: 0px;border-bottom-width: 0px;border-left-width: 0px;padding-top: 0px" border="0" alt="" src="http://msdnrss.thecoderblogs.com/wp-content/plugins/wp-o-matic/cache/4e705_0830.image_5F00_18E4EC86.png" width="640" height="245" /></p>
<p>A Service Bus relay implementation is fairly straightforward, well for anyone that has done WCF programming, since the primary difference from the on-premises scenario is the use of a Service Bus namespace to host the endpoint and a set of relay bindings, most of which have analogs in the on-premises world (we used <a href="http://msdn.microsoft.com/en-us/library/windowsazure/microsoft.servicebus.basichttprelaybinding.aspx">BasicHttpRelayBinding</a> in the <a href="http://blogs.msdn.com/b/jimoneil/archive/2012/04/24/fun-with-the-service-bus-part-1.aspx">previous post</a>).</p>
<p>All that works fine, but there is a significant drawback in the approach: both sides have to be “up” at the same time or the communication fails.&#160; Sure that happens on-premises too, and you can build retry logic in, but wouldn’t it be easier if all that were just done for you? That’s where Service Bus queues come in. A queue provides a place for the messages to sit in case there are no clients available to process them, perhaps because the client is down or too busy. As an direct result of this ‘temporal decoupling,’ it’s possible now for senders and receivers to operate at different rates; furthermore, multiple consumers that work off the same queue can process messages at their independent own rates.&#160; It’s the same type of “competing consumer” model as a queue in a bank where you’re waiting to be served by the next available teller.</p>
<p>As the focus of this post, I’ll take the existing sample I walked through in the previous blog post and modify it to work with Service Bus queues. As with that previous sample, you can <a href="https://github.com/jimoneil/Azure-Service-Bus-Samples/zipball/master">download the full source code from GitHub</a>, although you will need to modify the application settings (in <em>App.config</em> and <em>web.config</em>) to use the Service Bus identities and keys you set up for the previous sample.</p>
<h1>Creating a Queue</h1>
<p>The first step is to create a Service Bus queue.&#160; You can <a href="http://msdn.microsoft.com/en-us/library/windowsazure/hh293157.aspx">do that programmatically</a> or&#160; via the Windows Azure Portal directly under the Service Bus namespace you created in <a href="http://blogs.msdn.com/b/jimoneil/archive/2012/04/24/fun-with-the-service-bus-part-1.aspx">part 1</a>.&#160; Here I’ve created a queue named <em>thequeue</em> and left all of the properties at their default settings:</p>
<p><img style="border-right-width: 0px;margin: 30px auto;padding-left: 0px;padding-right: 0px;float: none;border-top-width: 0px;border-bottom-width: 0px;border-left-width: 0px;padding-top: 0px" border="0" alt="Service Bus Queue creation" src="http://msdnrss.thecoderblogs.com/wp-content/plugins/wp-o-matic/cache/09408_8463.image_5F00_2B0D4DC8.png" width="592" height="480" /></p>
<ul>
<li><strong>Default message time to live (TTL)</strong> indicates how long the message will sit on the queue before it is deleted.&#160; That curious default number there is just over 29000 years, by the way! If you also check the <strong>Enable Dead Lettering on Message Expiration</strong> box, the message will be moved to a special dead letter queue with an endpoint in this case of <code>sb://heyjim.servicebus.windows.net/thequeue/$DeadLetterQueue</code> </li>
<li>Queues also support duplicate message detection where a message’s uniqueness is defined by the <a href="http://msdn.microsoft.com/en-us/library/windowsazure/microsoft.servicebus.messaging.brokeredmessage.messageid.aspx">MessageId</a> property.&#160; To detect duplicates, you’d check the <strong>Requires Duplicate Detection</strong> checkbox and set the time window during which you want duplicates to be detected (<strong>Duplicate Detection History Time Window</strong>).&#160; The default is 10 minutes, which means that a second message with the same <a href="http://msdn.microsoft.com/en-us/library/windowsazure/microsoft.servicebus.messaging.brokeredmessage.messageid.aspx">MessageId</a> that arrives within 10 minutes of the first occurrence of that message will automatically be deleted. </li>
<li><strong>Lock Duration</strong> specifies the length of time (with a max of five minutes) that a message is hidden to other consumers when the queue is accessed in <a href="http://msdn.microsoft.com/en-us/library/microsoft.servicebus.messaging.receivemode.aspx">PeekLock</a> mode (versus <a href="http://msdn.microsoft.com/en-us/library/microsoft.servicebus.messaging.receivemode.aspx">ReceiveAndDelete</a> mode). </li>
<li>The <strong>Maximum Queue Size</strong> can be specified in increments of 1GB up to a maximum of 5GB; each message can be up to 256KB in size. </li>
<li>If <strong>Requires Session</strong> is checked, messages that must be processed together by the same consumer can be accommodated.&#160; A session is defined at message creation time using the <a href="http://msdn.microsoft.com/en-us/library/windowsazure/microsoft.servicebus.messaging.brokeredmessage.sessionid.aspx">SessionId</a> property.&#160; Setting this property requires that clients use a <a href="http://msdn.microsoft.com/en-us/library/microsoft.servicebus.messaging.sessionreceiver.aspx">SessionReceiver</a> to consume messages from the queue. </li>
</ul>
<p>All of these properties can be set when you programmatically create a queue as well (using the <a href="http://msdn.microsoft.com/en-us/library/windowsazure/hh293157.aspx">CreateQueue</a> method via a Service Bus identity that has the <a href="http://msdn.microsoft.com/en-us/library/windowsazure/hh403962.aspx">Manage claim</a>).&#160; In fact there are two additional (<a href="http://msdn.microsoft.com/en-us/library/windowsazure/microsoft.servicebus.messaging.queuedescription.aspx">QueueDescription</a>) properties that don’t seem settable via the portal:</p>
<ul>
<li><a href="http://msdn.microsoft.com/en-us/library/windowsazure/microsoft.servicebus.messaging.queuedescription.enablebatchedoperations.aspx">EnableBatchedOperations</a> indicates that <a href="http://msdn.microsoft.com/en-us/library/windowsazure/microsoft.servicebus.messaging.messagesender.send">Send</a> and <a href="http://msdn.microsoft.com/en-us/library/windowsazure/microsoft.servicebus.messaging.brokeredmessage.complete">Complete</a> requests to the queue can be batched (only when using&#160; asynchronous methods of the .NET managed client), which can increase efficiency; by default batched operations are enabled. </li>
<li><a href="http://msdn.microsoft.com/en-us/library/windowsazure/microsoft.servicebus.messaging.queuedescription.maxdeliverycount.aspx">MaxDeliveryCount</a> (default value: 10) indicates the maximum number of times a message can be read from the queue. This setting applies only when the <a href="http://msdn.microsoft.com/en-us/library/microsoft.servicebus.messaging.messagereceiver.aspx">MessageReceiver</a> is in <a href="http://msdn.microsoft.com/en-us/library/microsoft.servicebus.messaging.messagereceiver.mode.aspx">PeekLock</a> mode, in which a message is locked for a period of time (<a href="http://msdn.microsoft.com/en-us/library/windowsazure/microsoft.servicebus.messaging.queuedescription.lockduration.aspx">LockDuration</a>) during which it must be <a href="http://msdn.microsoft.com/en-us/library/windowsazure/microsoft.servicebus.messaging.brokeredmessage.complete">marked complete</a>, or it will again be available for processing.&#160; <em>MaxDeliveryCount</em> then figures into strategies for poison message processing, since a doomed message would never be marked complete and would otherwise reappear on the queue <em>ad infinitum</em>. </li>
</ul>
<div><strong>Windows Azure Storage also includes queues, how do they differ?</strong> In general, Service Bus queues have more capabilities and features, but they can have higher latency and are capped at 5GB.&#160; Service Bus queues are a great option for hybrid applications and those requiring “at-most-once” or “first-in-first-out” delivery. Windows Azure Storage queues have a simpler programming model and are well suited for inter-role communication, like between a Web Role and Worker Role within a cloud service.&#160; That said there are a host of other distinctions that could push your decision one way or the other. Check out <em><a href="http://msdn.microsoft.com/en-us/library/windowsazure/hh767287(v=vs.103).aspx">Windows Azure Queues and Windows Azure Service Bus Queues &#8211; Compared and Contrasted</a></em>&#160; for a detailed analysis.</div>
<h1>Coding the Consumer</h1>
<p>In our example, the message queue consumer is the WPF client application. In the on-premises scenario covered by <a href="http://blogs.msdn.com/b/jimoneil/archive/2012/04/24/fun-with-the-service-bus-part-1.aspx">my previous post</a>, the WPF application self-hosted a WCF service endpoint through the Service Bus using <a href="http://msdn.microsoft.com/en-us/library/windowsazure/microsoft.servicebus.basichttprelaybinding.aspx">BasicHttpRelayBinding</a>. With queues you can also use WCF semantics via a new binding, <a href="http://msdn.microsoft.com/en-us/library/windowsazure/hh532034(v=VS.103).aspx">NetMessagingBinding</a>, and <a href="http://blogs.msdn.com/b/tomholl/archive/2011/10/07/using-service-bus-queues-with-wcf.aspx">Tom Hollander covers this approach in his blog</a>. Alternatively, you can use the <a href="http://msdn.microsoft.com/en-us/library/windowsazure/hh780717">REST API</a> from any HTTP client, or as I’ll cover here the .NET API.</p>
<p>The code for processing the messages is launched on a separate thread from the simple UI of the WPF window. The complete code appears below, with the more salient portions highlighted and explained below.</p>
<div>
<pre><span>   1:  </span><span>internal</span> <span>void</span> ProcessMessages()</pre>
<pre><span>   2:  </span>{</pre>
<pre><span>   3:  </span>    <span>try</span></pre>
<pre><span>   4:  </span>    {</pre>
<pre><span>   5:  </span>        MessagingFactory factory = MessagingFactory.Create(             </pre>
<pre><span>   6:  </span>            ServiceBusEnvironment.CreateServiceUri(<span>&quot;sb&quot;,                </span></pre>
<pre><span>   7:  </span>                Properties.Settings.Default.SBNamespace,                </pre>
<pre><span>   8:  </span>                String.Empty),                                          </pre>
<pre><span>   9:  </span>            TokenProvider.CreateSharedSecretTokenProvider(<span>&quot;wpfsample&quot;</span>,  </pre>
<pre><span>  10:  </span>                    Properties.Settings.Default.SBListenerCredentials));</pre>
<pre><span>  11:  </span>        MessageReceiver theQueue = factory.CreateMessageReceiver(<span>&quot;thequeue&quot;</span>);</pre>
<pre><span>  12:  </span>&#160;</pre>
<pre><span>  13:  </span>        <span>while</span> (isProcessing)</pre>
<pre><span>  14:  </span>        {</pre>
<pre><span>  15:  </span>            BrokeredMessage message = theQueue.Receive(<span>new</span> TimeSpan(0, 0, 0, 5));</pre>
<pre><span>  16:  </span>            <span>if</span> (message != <span>null</span>)</pre>
<pre><span>  17:  </span>            {</pre>
<pre><span>  18:  </span>                Dispatcher.Invoke((System.Action)(()</pre>
<pre><span>  19:  </span>                    =&gt;</pre>
<pre><span>  20:  </span>&#160;</pre>
<pre><span>  21:  </span>                {</pre>
<pre><span>  22:  </span>                    NotificationWindow w;</pre>
<pre><span>  23:  </span>                    <span>try</span></pre>
<pre><span>  24:  </span>                    {</pre>
<pre><span>  25:  </span>                        w = <span>new</span> NotificationWindow(                 </pre>
<pre><span>  26:  </span>                            message.Properties[<span>&quot;Sender&quot;</span>].ToString(),</pre>
<pre><span>  27:  </span>                            message.GetBody&lt;String&gt;(),              </pre>
<pre><span>  28:  </span>                            message.Properties[<span>&quot;Color&quot;</span>].ToString());</pre>
<pre><span>  29:  </span>                    }</pre>
<pre><span>  30:  </span>                    <span>catch</span> (KeyNotFoundException)</pre>
<pre><span>  31:  </span>                    {</pre>
<pre><span>  32:  </span>                        w = <span>new</span> NotificationWindow(</pre>
<pre><span>  33:  </span>                            <span>&quot;system&quot;</span>,</pre>
<pre><span>  34:  </span>                            String.Format(<span>&quot;Invalid message:\n{0}&quot;</span>,                                                      message.GetBody&lt;String&gt;()),</pre>
<pre><span>  35:  </span>                            <span>&quot;Red&quot;</span></pre>
<pre><span>  36:  </span>                        );</pre>
<pre><span>  37:  </span>                    }</pre>
<pre><span>  38:  </span>                    WindowRegistry.Add(w);</pre>
<pre><span>  39:  </span>                    w.Show();</pre>
<pre><span>  40:  </span>                    message.Complete();</pre>
<pre><span>  41:  </span>                }));</pre>
<pre><span>  42:  </span>            }</pre>
<pre><span>  43:  </span>        }</pre>
<pre><span>  44:  </span>    }</pre>
<pre><span>  45:  </span>&#160;</pre>
<pre><span>  46:  </span>    <span>catch</span> (Exception ex)</pre>
<pre><span>  47:  </span>    {</pre>
<pre><span>  48:  </span>        Dispatcher.Invoke((System.Action)(()</pre>
<pre><span>  49:  </span>            =&gt;</pre>
<pre><span>  50:  </span>            {</pre>
<pre><span>  51:  </span>                btnServiceControl.Content = <span>&quot;Start Responding&quot;</span>;</pre>
<pre><span>  52:  </span>                <span>this</span>.Background = <span>new</span> SolidColorBrush(Colors.Orange);</pre>
<pre><span>  53:  </span>                <span>this</span>.isProcessing = <span>false</span>;</pre>
<pre><span>  54:  </span>            }));</pre>
<pre><span>  55:  </span>        MessageBox.Show(ex.Message, <span>&quot;Processing halted&quot;</span>, &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; MessageBoxButton.OK, MessageBoxImage.Stop);</pre>
<pre><span>  56:  </span>    }</pre>
<pre><span>  57:  </span>}</pre>
</div>
<p><strong>Lines 5-10</strong> set up the <a href="http://msdn.microsoft.com/en-us/library/windowsazure/microsoft.servicebus.messaging.messagingfactory.aspx">MessagingFactory</a> which establishes the Service Bus endpoint and the credentials for access (the <em>wpfsample</em> user is assumed to present the Send claim as set up in my <a href="http://blogs.msdn.com/b/jimoneil/archive/2012/04/24/fun-with-the-service-bus-part-1.aspx">prior blog post</a>).&#160; In <strong>Line 11</strong>, a <a href="http://msdn.microsoft.com/en-us/library/windowsazure/microsoft.servicebus.messaging.messagereceiver">MessageReceiver</a> is instantiated pointing to the queue that we explicitly created earlier via the Windows Azure portal.</p>
<p>The call to <a href="http://msdn.microsoft.com/en-us/library/windowsazure/hh181919">Receive</a> in <strong>Line 15</strong> yields the next message on the queue or times out after five seconds. If no message appears on the queue within that time period, the resulting message in <strong>Line 16</strong> is null. The enclosing while loop will then iterate and continue to await the next message.&#160; (The <em>isProcessing</em> flag is a class level variable that enables the WPF application user to stop and start listening on the queue; it’s set via the command button on the user interface).</p>
<p>The message returned is of type <a href="http://msdn.microsoft.com/en-us/library/windowsazure/microsoft.servicebus.messaging.brokeredmessage">BrokeredServiceMessage</a>, through which you can access header information in a <a href="http://msdn.microsoft.com/en-us/library/windowsazure/microsoft.servicebus.messaging.brokeredmessage.properties">Properties</a> bag and obtain the message payload itself via the <a href="http://msdn.microsoft.com/en-us/library/windowsazure/hh144211">GetBody</a> method (<strong>Lines 25-28</strong>).&#160; If the message doesn’t contain the expected content, for instance the headers aren’t set, some action needs to be taken. Here the remediation (<strong>Lines 30ff</strong>) is to simply display a error message via the same method as for a legitimate notification, but we could have taken another approach and moved it to the dead letter queue, via the aptly named <a href="http://msdn.microsoft.com/en-us/library/windowsazure/hh181741">DeadLetter</a> method, where some other process could inspect and forward messages for human intervention or diagnosis.</p>
<p>With the message processed, the last step is to mark it complete (<strong>Line 40</strong>). That should be a cue that I’m using the (default) <a href="http://msdn.microsoft.com/en-us/library/microsoft.servicebus.messaging.receivemode.aspx">PeekLock</a> semantics on the queue. If I’d set <code>theQueue.Mode = ReceiveMode.ReceiveAndDelete;</code> the message would automatically be deleted; however, I would have run the risk of losing that message had there been a service outage or error between retrieving the message and completing the processing of the message.</p>
<p>Other possibilities for handling the message include:</p>
<blockquote>
<p><a href="http://msdn.microsoft.com/en-us/library/windowsazure/microsoft.servicebus.messaging.brokeredmessage.abandon">abandoning it</a>, in which case the peek lock on the message is immediately released and the message become visible again for another consumer, </p>
<p>moving it to the <a href="http://msdn.microsoft.com/en-us/library/windowsazure/hh181741">dead letter queue</a> as mentioned earlier, or</p>
<p><a href="http://msdn.microsoft.com/en-us/library/windowsazure/microsoft.servicebus.messaging.brokeredmessage.defer">deferring the message</a> and moving on to the next one in the queue. Here you must retain the <a href="http://msdn.microsoft.com/en-us/library/windowsazure/microsoft.servicebus.messaging.brokeredmessage.sequencenumber">SequenceNumber</a> and call the <a href="http://msdn.microsoft.com/en-us/library/windowsazure/hh322665">overloaded Receive method</a> passing that number at the point when you do wish to process the message.</p>
</blockquote>
<h1>Coding the Producer</h1>
<p>The message producer in this case is the ASP.NET web application. It could be hosted anywhere, like say Windows Azure, but if you’re just testing it out, you can run it from the Azure emulator on your local machine or even just via the development web server (Cassini) from within Visual Studio.&#160; The code follows:</p>
<div>
<pre><span>   1:  </span><span>protected</span> <span>void</span> btnSend_Click(<span>object</span> sender, EventArgs e)</pre>
<pre><span>   2:  </span>{</pre>
<pre><span>   3:  </span>    <span>if</span> (txtMessage.Text.Trim().Length == 0) <span>return</span>;</pre>
<pre><span>   4:  </span>    String userName = (txtUser.Text.Trim().Length == 0) ? <span>&quot;guest&quot;</span> : txtUser.Text;</pre>
<pre><span>   5:  </span>&#160;</pre>
<pre><span>   6:  </span>    <span>// create and format the message</span></pre>
<pre><span>   7:  </span>    BrokeredMessage message = <span>new</span> BrokeredMessage(txtMessage.Text);</pre>
<pre><span>   8:  </span>    message.Properties[<span>&quot;Sender&quot;</span>] = txtUser.Text;</pre>
<pre><span>   9:  </span>    message.Properties[<span>&quot;Color&quot;</span>] = ddlColors.SelectedItem.Text;</pre>
<pre><span>  10:  </span>&#160;</pre>
<pre><span>  11:  </span>    <span>// send the message</span></pre>
<pre><span>  12:  </span>    MessagingFactory factory = MessagingFactory.Create(</pre>
<pre><span>  13:  </span>        ServiceBusEnvironment.CreateServiceUri(<span>&quot;sb&quot;</span>,</pre>
<pre><span>  14:  </span>        ConfigurationManager.AppSettings[<span>&quot;SBNamespace&quot;</span>],</pre>
<pre><span>  15:  </span>        String.Empty),</pre>
<pre><span>  16:  </span>        TokenProvider.CreateSharedSecretTokenProvider(</pre>
<pre><span>  17:  </span>            userName,</pre>
<pre><span>  18:  </span>            ConfigurationManager.AppSettings[<span>&quot;SBGuestCredentials&quot;</span>]));</pre>
<pre><span>  19:  </span>    factory.CreateMessageSender(<span>&quot;thequeue&quot;</span>).Send(message);</pre>
<pre><span>  20:  </span>}</pre>
</div>
<p>In <strong>Lines 7-9</strong>, a new message is created from the text provided in the Web form, and two properties set, one corresponding to the name of the sender and the other corresponding to the selected color.&#160; </p>
<p>Then in <strong>Lines 12-18</strong>, a <a href="http://msdn.microsoft.com/en-us/library/windowsazure/microsoft.servicebus.messaging.messagingfactory.aspx">MessagingFactory</a> is likewise instantiated; however, here the Service Bus identity (guest, by default) needs the <a href="http://msdn.microsoft.com/en-us/library/windowsazure/hh403962.aspx">Send versus the Listen claim</a>. </p>
<p>In <strong>Line 19</strong>, the message is sent via a <a href="http://msdn.microsoft.com/en-us/library/windowsazure/microsoft.servicebus.messaging.messagesender">MessageSender</a> instance.&#160; It’s done synchronously here, but <a href="http://msdn.microsoft.com/en-us/library/windowsazure/microsoft.servicebus.messaging.messagesender.beginsend">asynchronous versions of Send</a> and other operations on the complementary <a href="http://msdn.microsoft.com/en-us/library/windowsazure/hh144134">MessageReceiver</a> class are also available (and preferred in most cases for scalability and user experience reasons). </p>
<h1>Grab the Code!</h1>
<p><a href="https://github.com/jimoneil/Azure-Service-Bus-Samples/zipball/master"><img style="border-right-width: 0px;margin: 0px 0px 0px 20px;padding-left: 0px;padding-right: 0px;float: right;border-top-width: 0px;border-bottom-width: 0px;border-left-width: 0px;padding-top: 0px" border="0" alt="Get the code!" align="right" src="http://msdnrss.thecoderblogs.com/wp-content/plugins/wp-o-matic/cache/b7030_1220.image_5F00_502A9834.png" width="203" height="64" /></a>I’ve added the <a href="https://github.com/jimoneil/Azure-Service-Bus-Samples/zipball/master">code for the brokered messaging sample</a> to the relay sample code already on GitHub (<a href="http://msdn.microsoft.com/en-us/cc300389.aspx#P">MS-LPL license</a>) so you can experiment on your own. Next time we’ll look at a more advanced publication/subscription scenario leveraging Service Bus topics and subscriptions.</p>
<div></div>
<p><img src="http://msdnrss.thecoderblogs.com/wp-content/plugins/wp-o-matic/cache/b7030_aggbug.aspx?PostID=10307828" width="1" height="1" /></p>
]]></content:encoded>
			<wfw:commentRss>http://msdnrss.thecoderblogs.com/2012/05/fun-with-the-service-bus-part-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

