<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Niraj Bhatt - Architect&#039;s Blog</title>
	<atom:link href="http://nirajrules.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://nirajrules.wordpress.com</link>
	<description>Ruminations on .NET, Architecture &#38; Design</description>
	<lastBuildDate>Fri, 27 Jan 2012 03:04:15 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='nirajrules.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Niraj Bhatt - Architect&#039;s Blog</title>
		<link>http://nirajrules.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://nirajrules.wordpress.com/osd.xml" title="Niraj Bhatt - Architect&#039;s Blog" />
	<atom:link rel='hub' href='http://nirajrules.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Demystifying Access Control Service</title>
		<link>http://nirajrules.wordpress.com/2011/11/28/demystifying-access-control-service/</link>
		<comments>http://nirajrules.wordpress.com/2011/11/28/demystifying-access-control-service/#comments</comments>
		<pubDate>Mon, 28 Nov 2011 03:11:43 +0000</pubDate>
		<dc:creator>nirajrules</dc:creator>
				<category><![CDATA[Visual Studio .NET]]></category>
		<category><![CDATA[Windows Azure]]></category>

		<guid isPermaLink="false">http://nirajrules.wordpress.com/?p=1741</guid>
		<description><![CDATA[Having presented quite a few sessions on Claims Based Idenitity and Access Control Service I still see quite a few participants confused on how to get started. While most of them are able to understand the underlying business motivation, they are list lost admist all the new terms like SAML, SWT, OAuth, WRAP, WIF, ACS, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nirajrules.wordpress.com&amp;blog=3953176&amp;post=1741&amp;subd=nirajrules&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Having presented quite a few sessions on Claims Based Idenitity and Access Control Service I still see quite a few participants confused on how to get started. While most of them are able to understand the underlying business motivation, they are list lost admist all the new terms like SAML, SWT, OAuth, WRAP, WIF, ACS, ADFS, Claims, Active / Passive Federation, etc. Let&#8217;s get them in turn.</p>
<p>At the heart of these offerings is the below simple block diagram which drives the key concept of -  Relying on a trusted External Entity (Identity Provider) for &#8211; Authenticating users and Providing user attributes (claims) to saves our services / applications from Identity nightmares. So, for your Service or your Application, you establish trust with an identity provider by sharing a X509 certificate or a shared secret. Clients or users of your service / application no longer connect with you for authentication, rather they authenticate with an identity provider to get back a claims token. That token is then presented to your service / application. As your service / application has a trust established with that IP they can validate the trust of the incoming token and then use the claims bundled in it to authorize the level of access for client / user.</p>
<p><a href="http://nirajrules.files.wordpress.com/2011/11/identity-provider.png"><img src="http://nirajrules.files.wordpress.com/2011/11/identity-provider.png?w=604&#038;h=266" alt="" title="Identity Provider" width="604" height="266" class="alignnone size-full wp-image-1770" /></a></p>
<p>Above flow becomes little complex when RP needs to trust multiple identity providers (for instance you are offering a multi-tenant service for individuals and coporates with each of them having a different identity provider). Not only RP would have to establish trust with all these providers but the Identity Providers too would have to register this RP to issue tokens on request. This is where a mediator called federation provider comes into picture. RP get registered only with federation provider and federation provider in turn is registered and trusted by various identity providers. Hence it simplifies many-to-many relationship into easily manageable one-to-one. Access control service (ACS) is a federation provider hosted on Windows Azure.</p>
<p><a href="http://nirajrules.files.wordpress.com/2011/11/federation-provider.png"><img src="http://nirajrules.files.wordpress.com/2011/11/federation-provider.png?w=604&#038;h=191" alt="" title="Federation Provider" width="604" height="191" class="alignnone size-full wp-image-1766" /></a></p>
<p>You will also find two federation terms used quite frequently &#8211; Passive &amp; Active federation. Passive federation is assoicated with web applications (rather web browsers) where authentication happens via a set of redirects. Active federation is assoicated with Web Services and clients that explicity get authenticated.</p>
<p>Once a client authenticates with Identity Provider he get a token back. There are two token formats supported by Access Control Service &#8211; SAML and SWT. SAML exchange happens over WS-* protocols while SWT tokens are usually transferred over OAuth WRAP / OAuth 2.0 protocols (<a href="http://msdn.microsoft.com/en-us/library/windowsazure/gg185948.aspx" target="_blank">details here</a>). You are most likely to use SWT tokens for RESTful services hosted in Azure. You can find more details about these token formats explained <a href="http://msdn.microsoft.com/en-us/library/windowsazure/gg185950.aspx" target="_blank">here</a></p>
<p>ACS would accept either of the token formats as input and would also return either of them as outputs. For instance there could be scenarios where you get a SAML token from ADFS (corporate identity provider), you use that to get authenticated with ACS and ACS returns you back a SWT token which in turn is used to access a protected REST Service (offered by a business partner).</p>
<p>Let&#8217;s start with SWT tokens. To see SWT tokens and OAuth WRAP in action protecting a WCF REST Service (active federation) I would recommend you have  a look at the <a href="http://acs.codeplex.com/" target="_blank">ACS samples</a>. Establishing trust between RP &amp; ACS is quite simple &#8211; you exchange a shared secret. When client authenticates with ACS he gets back a SWT token which integrated HMAC256 hash. Relying part checks the authenticity of hash and claims inside the token on incoming tokens  to allow access to requesting client. You should see that retrieving SWT tokens using WRAP protocol from ACS and sending it to a RP is quite simple, infact you would hardly need anything beyond HTTP client library.</p>
<p>//Requesting a SWT token with username / password from Access Control Service</p>
<p>var client = new WebClient();<br />
client.BaseAddress = string.Format(&#8220;https://{0}.{1}&#8221;, serviceNamespace, acsHostName);</p>
<p>var values = new NameValueCollection();<br />
values.Add(&#8220;wrap_name&#8221;, unamepass.Username); /*Service Identity to be specified in Access Control Service*/<br />
values.Add(&#8220;wrap_password&#8221;, unamepass.Password);<br />
values.Add(&#8220;wrap_scope&#8221;, ConfigurationManager.AppSettings["relyingpartyname"]);</p>
<p>byte[] responseBytes = client.UploadValues(&#8220;WRAPv0.9/&#8221;, &#8220;POST&#8221;, values); /*SWT token is received in raw format*/</p>
<p>SAML on the other hand is little more complex. Luckily for us Microsoft provides nice Visual Studio integreated tooling (FedUtil &#8211; Add STS Reference) for working with SAML tokens along with WIF (Windows Identity Foundation) SDK. This tooling can be leveraged by both services and applications. In fact all you need to establish trust with identity providers is federation metadata and tooling generates that for you in form a file called FederationMedata.xml. WIF SDK, in addition, provides web controls for federated sign in and sign in status (Look at this <a href="http://zamd.net/2011/02/08/using-simple-web-token-swt-with-wif/" target="_blank">article</a> in case you want WIF to work with SWT for web applications (passive federation)).</p>
<p><a href="http://nirajrules.files.wordpress.com/2011/11/sts-reference.png"><img src="http://nirajrules.files.wordpress.com/2011/11/sts-reference.png?w=604" alt="" title="STS Reference"   class="alignnone size-full wp-image-1768" /></a></p>
<p><a href="http://nirajrules.files.wordpress.com/2011/11/federation-metadata.png"><img src="http://nirajrules.files.wordpress.com/2011/11/federation-metadata.png?w=604" alt="" title="Federation Metadata"   class="alignnone size-full wp-image-1767" /></a></p>
<p>Tooling also sets you up by plugging necessary modules in your RP&#8217;s web.config namely &#8211; WSFederationAuthenticationModule and SessionAuthenticationModule. Former helps you validate authenticity of incoming token while later establishes a session between client and relying party (FedAuth Cookie) so that token validation doesn&#8217;t become an overhead for every operation invoked. You can also add an additional module to this called ClaimsAuthorizationModule which let&#8217;s you invoke your custom ClaimsAuthorizationManger class as shown below.</p>
<p>&lt;microsoft.identityModel&gt;    <br />
&lt;service&gt;<br />
&lt;claimsAuthorizationManager type=&#8221;WebApplication4.CustomAuthorizationManager&#8221;/&gt;<br />
&lt;/service&gt;<br />
&lt;/microsoft.identityModel&gt; </p>
<p>public class CustomAuthorizationManager : ClaimsAuthorizationManager    <br />
{        <br />
public override bool CheckAccess(AuthorizationContext context)        <br />
{      <br />
//&#8230;      <br />
return base.CheckAccess(context);        <br />
}    <br />
}</p>
<p>HTH!!!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nirajrules.wordpress.com/1741/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nirajrules.wordpress.com/1741/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nirajrules.wordpress.com/1741/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nirajrules.wordpress.com/1741/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/nirajrules.wordpress.com/1741/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/nirajrules.wordpress.com/1741/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/nirajrules.wordpress.com/1741/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/nirajrules.wordpress.com/1741/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nirajrules.wordpress.com/1741/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nirajrules.wordpress.com/1741/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nirajrules.wordpress.com/1741/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nirajrules.wordpress.com/1741/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nirajrules.wordpress.com/1741/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nirajrules.wordpress.com/1741/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nirajrules.wordpress.com&amp;blog=3953176&amp;post=1741&amp;subd=nirajrules&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://nirajrules.wordpress.com/2011/11/28/demystifying-access-control-service/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/13043c1961009b200ac731912a963b42?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">nirajrules</media:title>
		</media:content>

		<media:content url="http://nirajrules.files.wordpress.com/2011/11/identity-provider.png" medium="image">
			<media:title type="html">Identity Provider</media:title>
		</media:content>

		<media:content url="http://nirajrules.files.wordpress.com/2011/11/federation-provider.png" medium="image">
			<media:title type="html">Federation Provider</media:title>
		</media:content>

		<media:content url="http://nirajrules.files.wordpress.com/2011/11/sts-reference.png" medium="image">
			<media:title type="html">STS Reference</media:title>
		</media:content>

		<media:content url="http://nirajrules.files.wordpress.com/2011/11/federation-metadata.png" medium="image">
			<media:title type="html">Federation Metadata</media:title>
		</media:content>
	</item>
		<item>
		<title>Book Review: Microsoft Windows Azure Development Cookbook</title>
		<link>http://nirajrules.wordpress.com/2011/11/05/book-review-microsoft-windows-azure-development-cookbook/</link>
		<comments>http://nirajrules.wordpress.com/2011/11/05/book-review-microsoft-windows-azure-development-cookbook/#comments</comments>
		<pubDate>Sat, 05 Nov 2011 16:20:38 +0000</pubDate>
		<dc:creator>nirajrules</dc:creator>
				<category><![CDATA[Architecture Design]]></category>
		<category><![CDATA[Most Valuable Professional]]></category>
		<category><![CDATA[Windows Azure]]></category>
		<category><![CDATA[Review]]></category>

		<guid isPermaLink="false">http://nirajrules.wordpress.com/?p=1744</guid>
		<description><![CDATA[Apparently, this is my first public book review. A month back when PACKT Publishing asked me to do a review of this book I was delighted for couple of reasons. Firstly, I would get my hands on a book I so much wanted to read and secondly review the work of the maestro – Neil [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nirajrules.wordpress.com&amp;blog=3953176&amp;post=1744&amp;subd=nirajrules&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Apparently, this is my first public book review. A month back when PACKT Publishing asked me to do a review of this <a href="http://www.packtpub.com/microsoft-windows-azure-development-cookbook/book">book</a> I was delighted for couple of reasons. Firstly, I would get my hands on a book I so much wanted to read and secondly review the work of the maestro – Neil Mackenzie. If you don’t know Neil most probably you haven’t done a serious Windows Azure project <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  . Neil is the most active person on <a href="http://social.msdn.microsoft.com/Forums/en-US/windowsazure/thread/6440ee65-9d32-4790-a4f4-2ec2a8de3d1a">Windows Azure MSDN Forum</a>, maintains a comprehensive <a href="http://convective.wordpress.com/">blog</a> on Windows Azure (at times I have felt that the depth of his blog entries surpasses that of MSDN documentation) and a Windows Azure MVP we all are proud of. </p>
<p><a href="http://nirajrules.files.wordpress.com/2011/11/bookcoverlargenew.png"><img src="http://nirajrules.files.wordpress.com/2011/11/bookcoverlargenew.png?w=604" alt="" title="bookcoverlargenew"   class="alignnone size-full wp-image-1745" /></a></p>
<p>Highlight of the book for me are the exercises (referred as recipes), which are to the point, with concise code snippets, cutting the unnecessary verbose. Book’s first chapter starts with a very important yet very less discussed topic – authenticating with Windows Azure Platform. Chapter covers authentication scenarios pertaining to Azure Storage, Service Management, and AppFabric (caching) covering subtle topic of storage key rotation. Second chapter gives a thorough coverage of Blob storage including Leasing and leveraging Azure CDN. Third and fourth chapter dive into Tables and Queues again discussing key topics Pagination and polling back off (we recently helped a client cut on its transactional cost using similar approach). Fifth chapter which happens to be longest chapter of the book is really packed. You would be amazed at how much information is covered in these hundred pages. Chapter covers everything about hosting on Azure – multiple websites in a single role, HTTPS support, VM Role, Azure Connect and MarketPlace DataMarket among others. Chapter sixth and seventh contains vital topics of diagnostics (your key to success on Azure Platform) and service management APIs. It’s interesting to read the PowerShell coverage of these chapters. Finally book ends with couple of chapters around SQL Azure and Azure AppFabric.  I was impressed with Neil’s knowledge around SQL Server DB and detailing of DMVs (dynamic management views).  </p>
<p>Coming to the cons of the book, depending on your experience you might feel that book could have been better organized. May be an introduction chapter or an appendix at the end providing a 360 degree overview of Windows Azure could have been helpful. Also, while recipes are compact; snippets and corresponding explanations are done separately which at times is tedious to shuffle between. Lack of screenshots might be a concern to few readers. Also few topics like Access Control Service, WCF services, etc. have lesser focus (in case those are your prime use cases).</p>
<p>To sum up, writing Azure book is tough, especially with the rapid release cycles and features being churned regularly. Considering that, I would commend author for his work and would strongly recommend this book to accelerate your knowledge on Windows Azure. Three hundred plus pages can easily transform you into a PRO, helping you create more effective Windows Azure solutions. </p>
<p>Happy Reading <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  !!!</p>
<p>(P.S. You can download a sample chapter of the book from <a href="http://www.packtpub.com/sites/default/files/2220-chapter-7-managing-hosted-services-with-the-service-management-api.pdf?utm_source=packtpub&amp;utm_medium=free&amp;utm_campaign=pdf">here</a>).</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nirajrules.wordpress.com/1744/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nirajrules.wordpress.com/1744/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nirajrules.wordpress.com/1744/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nirajrules.wordpress.com/1744/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/nirajrules.wordpress.com/1744/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/nirajrules.wordpress.com/1744/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/nirajrules.wordpress.com/1744/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/nirajrules.wordpress.com/1744/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nirajrules.wordpress.com/1744/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nirajrules.wordpress.com/1744/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nirajrules.wordpress.com/1744/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nirajrules.wordpress.com/1744/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nirajrules.wordpress.com/1744/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nirajrules.wordpress.com/1744/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nirajrules.wordpress.com&amp;blog=3953176&amp;post=1744&amp;subd=nirajrules&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://nirajrules.wordpress.com/2011/11/05/book-review-microsoft-windows-azure-development-cookbook/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/13043c1961009b200ac731912a963b42?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">nirajrules</media:title>
		</media:content>

		<media:content url="http://nirajrules.files.wordpress.com/2011/11/bookcoverlargenew.png" medium="image">
			<media:title type="html">bookcoverlargenew</media:title>
		</media:content>
	</item>
		<item>
		<title>Dummy vs. Stub vs. Spy vs. Fake vs. Mock</title>
		<link>http://nirajrules.wordpress.com/2011/08/27/dummy-vs-stub-vs-spy-vs-fake-vs-mock/</link>
		<comments>http://nirajrules.wordpress.com/2011/08/27/dummy-vs-stub-vs-spy-vs-fake-vs-mock/#comments</comments>
		<pubDate>Sat, 27 Aug 2011 11:49:16 +0000</pubDate>
		<dc:creator>nirajrules</dc:creator>
				<category><![CDATA[Unit Testing]]></category>
		<category><![CDATA[Visual Studio .NET]]></category>

		<guid isPermaLink="false">http://nirajrules.wordpress.com/?p=1720</guid>
		<description><![CDATA[One of the fundamental requirements of making Unit testing work is isolation. Isolation is hard in real world as there are always dependencies (collaborators) across the system. That’s where concept of something generically called ‘Test Double’ comes into picture. A ‘Double’ allow us to break the original dependency, helping isolate the unit (or System Under [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nirajrules.wordpress.com&amp;blog=3953176&amp;post=1720&amp;subd=nirajrules&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>One of the fundamental requirements of making Unit testing work is isolation. Isolation is hard in real world as there are always dependencies (collaborators) across the system. That’s where concept of something generically called ‘Test Double’ comes into picture. A ‘Double’ allow us to break the original dependency, helping isolate the unit (or System Under Test (SUT) – as commonly referred). As this Double is used to pass a unit test it’s generally referred to as ‘Test Double’. There are variations in types of Test Doubles depending on their intent (reminds me of GOF’s Proxy pattern).</p>
<p>Test doubles are not only useful in state verification but also in behavior verification; help us enhance the code coverage of our unit tests. While demarcating various test doubles may not provide exceptional value add, knowing about them can definitely organize our thinking process around unit testing.  Interestingly Mock Frameworks available today, allow us to seamlessly create all the variations of test doubles. I would be using <a href="http://code.google.com/p/moq/">moq</a> for this blog post. The variations of Test Doubles described below are taken from <a href="http://xunitpatterns.com" target="_blank">xUnit Patterns.com</a>. Below are the various test doubles along with examples:</p>
<p>a) <strong>Dummy</strong> is simple of all. It’s a placeholder required to pass the unit test. Unit in the context (SUT) doesn’t exercise this placeholder. Dummy can be something as simple as passing ‘null’ or a void implementation with exceptions to ensure it’s never leveraged.</p>
<p><code>[TestMethod]<br />
public void PlayerRollDieWithMaxFaceValue()<br />
{<br />
   var dummyBoard = new Mock&lt;IBoard&gt;();<br />
   var player = new Player(dummyBoard.Object, new Die() ); //null too would have been just fine<br />
   player.RollDie();<br />
   Assert.AreEqual(6, player.UnitsToMove);<br />
}</code></p>
<p>While the above test would work just fine, it won’t throw any exceptions if RollDie implementation is invoking Board Object. To ensure that Board object isn’t exercised at  all you can leverage strict mock. Strict Mock with throw an exception if no expectation is set for member.</p>
<p><code>[TestMethod]<br />
public void PlayerRollDieWithMaxFaceValueStrictTest()<br />
{<br />
   var dummyBoard = new Mock&lt;IBoard&gt;(MockBehavior.Strict); //Ensure Board class is never invoked<br />
   var player = new Player( dummyBoard.Object, new Die() );<br />
   player.RollDie();<br />
   Assert.AreEqual( 6, player.UnitsToMove );<br />
}</code></p>
<p>b) <strong>Fake</strong> is used to simplify a dependency so that unit test can pass easily. There is very thin line between Fake and Stub which is best described <a href="http://xunitpatterns.com/Fake%20Object.html" target="_blank">here</a> as – “a Test Stub acts as a control point to inject indirect inputs into the SUT the Fake Object does not. It merely provides a way for the interactions to occur in a self-consistent manner. These interactions (between the SUT and the Fake Object) will typically be many and the values passed in as arguments of earlier method calls will often be returned as results of later method calls“. A common place where you would use fake is database access. Below sample shows the same by creating a FakeProductRepository instead of using live database.</p>
<p><code>public interface IProductRepository<br />
{<br />
   void AddProduct(IProduct product);<br />
   IProduct GetProduct(int productId);<br />
}</code></p>
<p><code>public class FakeProductRepository : IProductRepository<br />
{<br />
    List&lt;IProduct&gt;<br />
    _products = new List&lt;IProduct&gt;();<br />
    public void AddProduct(IProduct product)<br />
    {<br />
        //...<br />
    }<br />
    public IProduct GetProduct(int productId)<br />
    {<br />
        //...<br />
    }<br />
}</code></p>
<p><code>[TestMethod]<br />
public void BillingManagerCalcuateTax()<br />
{<br />
     var fakeProductRepository = new FakeProductRepository();<br />
     BillingManager billingManager = new BillingManager(fakeProductRepository);<br />
     //...<br />
}</code></p>
<p>Fakes can be also be implemented by moq using callbacks.</p>
<p>c) <strong>Stub</strong> is used to provide indirect inputs to the SUT coming from its collaborators / dependencies. These inputs could be in form of objects, exceptions or primitive values. Unlike Fake, stubs are exercised by SUT. Going back to the Die example, we can use a Stub to return a fixed face value. This could simply our tests by taking out the randomness associated with rolling a Die.</p>
<p><code>[TestMethod]<br />
public void PlayerRollDieWithMaxFaceValue()<br />
{<br />
   var stubDie = new Mock&lt;IDie&gt;();<br />
   stubDie.Setup(d =&gt; d.GetFaceValue()).Returns(6).Verifiable();<br />
   IDie die = stubDie.Object;<br />
   Assert.AreEqual(6, die.GetFaceValue()); //Excercise the return value<br />
}</code></p>
<p>d) <strong>Mock</strong> – Like Indirect Inputs that flow back to SUT from its collaborators, there are also Indirect Outputs. Indirect outputs are tricky to test as they don’t return to SUT and are encapsulated by collaborator. Hence it becomes quite difficult to assert on them from a SUT standpoint. This is where behavior verification kicks in. Using behavior verification we can set expectations for SUT to exhibit the right behavior during its interactions with collaborators. Classic example of this is logging. When a SUT invokes logger it might quite difficult for us to assert on the actual log store (file, database, etc.). But what we can do is assert that logger is invoked by SUT. Below is an example that shows a typical mock in action</p>
<p><code>[TestMethod]<br />
public void ModuleThrowExceptionInvokesLogger()<br />
{<br />
   var mock = new Mock&lt;ILogger&gt;();<br />
   Module module = new Module();<br />
   ILogger logger = mock.Object;<br />
   module.SetLogger(logger);<br />
   module.ThrowException("Catch me if you can");<br />
   mock.Verify( m =&gt; m.Log( "Catch me if you can" ) );<br />
}</code></p>
<p>e) <strong>Spy</strong> – Spy is a variation of behavior verification. Instead of setting up behavior expectations, Spy records calls made to the collaborator. SUT then can later assert the recordings of Spy. Below is variation of Logger shown for Mock. Focus on this test is to count the number of times Log is invoked on Logger. It’s doesn’t care about the inputs passed to Log, it just records the Log calls and asserts them. Complex Spy objects can also leverage callback features of moq framework.</p>
<p><code>[TestMethod]<br />
public void ModuleThrowExceptionInvokesLoggerOnlyOnce()<br />
{<br />
    var spyLogger = new Mock&lt;ILogger&gt;();<br />
    Module module = new Module();<br />
    ILogger logger = spyLogger.Object;<br />
    module.SetLogger( logger );<br />
    module.ThrowException( "Catch me if you can" );<br />
    module.ThrowException( "Catch me if you can" );<br />
    spyLogger.Verify( m =&gt; m.Log( It.IsAny&lt;string&gt;()), Times.Exactly(2) );<br />
}</code></p>
<p>Hope this helps!!!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nirajrules.wordpress.com/1720/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nirajrules.wordpress.com/1720/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nirajrules.wordpress.com/1720/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nirajrules.wordpress.com/1720/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/nirajrules.wordpress.com/1720/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/nirajrules.wordpress.com/1720/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/nirajrules.wordpress.com/1720/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/nirajrules.wordpress.com/1720/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nirajrules.wordpress.com/1720/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nirajrules.wordpress.com/1720/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nirajrules.wordpress.com/1720/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nirajrules.wordpress.com/1720/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nirajrules.wordpress.com/1720/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nirajrules.wordpress.com/1720/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nirajrules.wordpress.com&amp;blog=3953176&amp;post=1720&amp;subd=nirajrules&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://nirajrules.wordpress.com/2011/08/27/dummy-vs-stub-vs-spy-vs-fake-vs-mock/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/13043c1961009b200ac731912a963b42?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">nirajrules</media:title>
		</media:content>
	</item>
		<item>
		<title>ASP.NET Session Timeout Not Working</title>
		<link>http://nirajrules.wordpress.com/2011/08/26/asp-net-session-timeout-not-working/</link>
		<comments>http://nirajrules.wordpress.com/2011/08/26/asp-net-session-timeout-not-working/#comments</comments>
		<pubDate>Fri, 26 Aug 2011 15:49:49 +0000</pubDate>
		<dc:creator>nirajrules</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[Performance Tuning]]></category>
		<category><![CDATA[Session]]></category>

		<guid isPermaLink="false">http://nirajrules.wordpress.com/?p=1712</guid>
		<description><![CDATA[Many of us are familiar with ASP.NET session state and various options surrounding it. Applications are either aggressive or relaxed about their session timeline and in most cases you would be inclined to change the default session timeout limit of 20 minutes. The obvious place to do this in web.config’s sessionState element as shown below: [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nirajrules.wordpress.com&amp;blog=3953176&amp;post=1712&amp;subd=nirajrules&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Many of us are familiar with ASP.NET session state and various options surrounding it. Applications are either aggressive or relaxed about their session timeline and in most cases you would be inclined to change the default session timeout limit of 20 minutes. The obvious place to do this in web.config’s sessionState element as shown below:</p>
<p>&lt;system.web&gt;<br />
&#8230;<br />
&lt;sessionState timeout=&#8221;40&#8243; /&gt; &lt;!&#8211;timeout is in minutes&#8211;&gt;</p>
<p>But unfortunately there are caveats to it. In case you are using forms authentication there is a timeout for the underlying forms authentication cookie. The default value of this timeout is <a href="http://weblogs.asp.net/scottgu/archive/2005/11/08/430011.aspx">30 minutes</a> and hence you might witness user being thrown out of the system before his session expires. Hence you want to ensure that the cookie lifetime matches the session time.</p>
<p>&lt;system.web&gt;<br />
&lt;authentication mode=&#8221;Forms&#8221;&gt;<br />
&lt;forms loginUrl=&#8221;~/Login.aspx&#8221; timeout=&#8221;40&#8243; /&gt; &lt;!&#8211;timeout is in minutes&#8211;&gt;<br />
&lt;/authentication&gt;</p>
<p>Finally you might also want to check your Application Pool&#8217;s idle timeout. If there is sole user browsing your site (could be rare case) and user idle time exceeds the application pool idle time, you might again see an unexpected behavior. So ensure application pool idle timeout too matches your session timeout.</p>
<p><a href="http://nirajrules.files.wordpress.com/2011/08/session-idle-timeout.png"><img src="http://nirajrules.files.wordpress.com/2011/08/session-idle-timeout.png?w=604" alt="" title="Session Idle Timeout"   class="alignnone size-full wp-image-1714" /></a></p>
<p>Hope this helps!!!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nirajrules.wordpress.com/1712/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nirajrules.wordpress.com/1712/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nirajrules.wordpress.com/1712/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nirajrules.wordpress.com/1712/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/nirajrules.wordpress.com/1712/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/nirajrules.wordpress.com/1712/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/nirajrules.wordpress.com/1712/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/nirajrules.wordpress.com/1712/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nirajrules.wordpress.com/1712/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nirajrules.wordpress.com/1712/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nirajrules.wordpress.com/1712/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nirajrules.wordpress.com/1712/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nirajrules.wordpress.com/1712/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nirajrules.wordpress.com/1712/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nirajrules.wordpress.com&amp;blog=3953176&amp;post=1712&amp;subd=nirajrules&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://nirajrules.wordpress.com/2011/08/26/asp-net-session-timeout-not-working/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/13043c1961009b200ac731912a963b42?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">nirajrules</media:title>
		</media:content>

		<media:content url="http://nirajrules.files.wordpress.com/2011/08/session-idle-timeout.png" medium="image">
			<media:title type="html">Session Idle Timeout</media:title>
		</media:content>
	</item>
		<item>
		<title>Association vs. Dependency vs. Aggregation vs. Composition</title>
		<link>http://nirajrules.wordpress.com/2011/07/15/association-vs-dependency-vs-aggregation-vs-composition/</link>
		<comments>http://nirajrules.wordpress.com/2011/07/15/association-vs-dependency-vs-aggregation-vs-composition/#comments</comments>
		<pubDate>Fri, 15 Jul 2011 11:27:45 +0000</pubDate>
		<dc:creator>nirajrules</dc:creator>
				<category><![CDATA[Architecture Design]]></category>
		<category><![CDATA[Food For Thought]]></category>
		<category><![CDATA[Visio]]></category>
		<category><![CDATA[OOAD]]></category>
		<category><![CDATA[UML]]></category>

		<guid isPermaLink="false">http://nirajrules.wordpress.com/?p=1680</guid>
		<description><![CDATA[This might sound like a preliminary topic but recently I had a healthy discussion around them and thought of sharing few thoughts here. The description below is in context with Class Diagrams and this blog post uses UML to express the relationship in form a diagram. Association is reference based relationship between two classes. Here [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nirajrules.wordpress.com&amp;blog=3953176&amp;post=1680&amp;subd=nirajrules&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This might sound like a preliminary topic but recently I had a healthy discussion around them and thought of sharing few thoughts here. The description below is in context with Class Diagrams and this blog post uses UML to express the relationship in form a diagram.</p>
<p><strong>Association</strong> is reference based relationship between two classes. Here a class A holds a class level reference to class B. Association can be represented by a line between these classes with an arrow indicating the navigation direction. In case arrow is on the both sides, association has bidirectional navigation.</p>
<p><a href="http://nirajrules.files.wordpress.com/2011/07/association.png"><img src="http://nirajrules.files.wordpress.com/2011/07/association.png?w=604" alt="" title="Association"   class="alignnone size-full wp-image-1681" /></a></p>
<p><code>class Asset { ... }<br />
class Player {<br />
Asset asset;<br />
public Player(Assest purchasedAsset) { ... } /*Set the asset via Constructor or a setter*/<br />
}<br />
</code></p>
<p><strong>Dependency</strong> is often confused as Association. Dependency is normally created when you receive a reference to a class as part of a particular operation / method. Dependency indicates that you may invoke one of the APIs of the received class reference and any modification to that class may break your class as well. Dependency is represented by a dashed arrow starting from the dependent class to its dependency. Multiplicity normally doesn&#8217;t make sense on a Dependency.</p>
<p><a href="http://nirajrules.files.wordpress.com/2011/07/dependency.png"><img src="http://nirajrules.files.wordpress.com/2011/07/dependency.png?w=604" alt="" title="Dependency"   class="alignnone size-full wp-image-1682" /></a></p>
<p><code>class Die { public void Roll() { ... } }<br />
class Player<br />
{<br />
    public void TakeTurn(Die die) /*Look ma, I am dependent on Die and it's Roll method to do my work*/<br />
    { die.Roll(); ... }<br />
}</code></p>
<p><strong>Aggregation</strong> is same as association and is often seen as redundant relationship. A common perception is that aggregation represents one-to-many / many-to-many / part-whole relationships (i.e. higher multiplicity), which of course can be represented by via association too (hence the redundancy). As aggregation doesn’t convey anything more effective about a software design than an association, there is no separate UML representation for it (though some developers use a hollow diamond  to indicate aggregation). You can give aggregation a miss unless you use it to convey something special.</p>
<p><a href="http://nirajrules.files.wordpress.com/2011/07/aggregation.png"><img src="http://nirajrules.files.wordpress.com/2011/07/aggregation.png?w=604" alt="" title="Aggregation"   class="alignnone size-full wp-image-1683" /></a> </p>
<p><code>class Asset { ... }<br />
class Player {<br />
   List assets;<br />
   public void AddAsset(Asset newlyPurchasedAsset) { assets.Add(newlyPurchasedAssest); ... }<br />
   ...<br />
}</code></p>
<p><strong>Composition</strong> relates to instance creational responsibility. When class B is composed by class A, class A instance owns the creation or controls lifetime of instance of class B. Needless to say when class instance A instance is destructed (garbage collected), class B instance would meet the same fate. Composition is usually indicated by line connecting two classes with addition of a solid diamond at end of the class who owns the creational responsibility. It&#8217;s also a perceived wrong notion that composition is implemented as nested classes. Composition binds lifetime of a specific instance for a given class, while class itself may be accessible by other parts of the system.</p>
<p><a href="http://nirajrules.files.wordpress.com/2011/07/composition.png"><img src="http://nirajrules.files.wordpress.com/2011/07/composition.png?w=604" alt="" title="Composition"   class="alignnone size-full wp-image-1684" /></a></p>
<p><code>public class Piece { ... }<br />
public class Player<br />
{<br />
    Piece piece = new Piece(); /*Player owns the responsibility of creating the Piece*/<br />
    ...<br />
}</code></p>
<p>Though elementary, I hope above distills your thinking <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nirajrules.wordpress.com/1680/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nirajrules.wordpress.com/1680/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nirajrules.wordpress.com/1680/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nirajrules.wordpress.com/1680/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/nirajrules.wordpress.com/1680/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/nirajrules.wordpress.com/1680/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/nirajrules.wordpress.com/1680/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/nirajrules.wordpress.com/1680/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nirajrules.wordpress.com/1680/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nirajrules.wordpress.com/1680/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nirajrules.wordpress.com/1680/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nirajrules.wordpress.com/1680/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nirajrules.wordpress.com/1680/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nirajrules.wordpress.com/1680/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nirajrules.wordpress.com&amp;blog=3953176&amp;post=1680&amp;subd=nirajrules&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://nirajrules.wordpress.com/2011/07/15/association-vs-dependency-vs-aggregation-vs-composition/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/13043c1961009b200ac731912a963b42?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">nirajrules</media:title>
		</media:content>

		<media:content url="http://nirajrules.files.wordpress.com/2011/07/association.png" medium="image">
			<media:title type="html">Association</media:title>
		</media:content>

		<media:content url="http://nirajrules.files.wordpress.com/2011/07/dependency.png" medium="image">
			<media:title type="html">Dependency</media:title>
		</media:content>

		<media:content url="http://nirajrules.files.wordpress.com/2011/07/aggregation.png" medium="image">
			<media:title type="html">Aggregation</media:title>
		</media:content>

		<media:content url="http://nirajrules.files.wordpress.com/2011/07/composition.png" medium="image">
			<media:title type="html">Composition</media:title>
		</media:content>
	</item>
		<item>
		<title>Setting Auto Commit Off SQL Server</title>
		<link>http://nirajrules.wordpress.com/2011/07/12/setting-auto-commit-off-sql-server/</link>
		<comments>http://nirajrules.wordpress.com/2011/07/12/setting-auto-commit-off-sql-server/#comments</comments>
		<pubDate>Tue, 12 Jul 2011 10:56:36 +0000</pubDate>
		<dc:creator>nirajrules</dc:creator>
				<category><![CDATA[Food For Thought]]></category>
		<category><![CDATA[SQL SERVER]]></category>

		<guid isPermaLink="false">http://nirajrules.wordpress.com/?p=1668</guid>
		<description><![CDATA[In this post I will share a useful tip for SQL Server. While working with a live database, turning Auto Commit Off / Implicit transactions ON can be quite handy, especially for mitigating human errors. This is often the case when you make an unintentional change to your database (I have seen this even in [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nirajrules.wordpress.com&amp;blog=3953176&amp;post=1668&amp;subd=nirajrules&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In this post I will share a useful tip for SQL Server. While working with a live database, turning Auto Commit Off / Implicit transactions ON can be quite handy, especially for mitigating human errors. This is often the case when you make an unintentional change to your database (I have seen this even in tightly controlled environments) and your only options are to restore a database backup or rollback your changes. Rollback being relatively easy option can be put in place via implict transactions (though by no means it would mitigate all human errors). Implicit transactions can be turned on via simple T-SQL statement or it can be done across all sessions by modifying SQL Server Management Studio Options (Tools -&gt; Options) as shown below</p>
<p>T-SQL:<br />
<strong>SET IMPLICIT_TRANSACTIONS ON;</strong></p>
<p>SSMS:<a href="http://nirajrules.files.wordpress.com/2011/07/ssms-implicit-transactions.png"><img src="http://nirajrules.files.wordpress.com/2011/07/ssms-implicit-transactions.png?w=604&#038;h=405" alt="" title="SSMS Implicit Transactions" width="604" height="405" class="alignnone size-full wp-image-1669" /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nirajrules.wordpress.com/1668/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nirajrules.wordpress.com/1668/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nirajrules.wordpress.com/1668/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nirajrules.wordpress.com/1668/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/nirajrules.wordpress.com/1668/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/nirajrules.wordpress.com/1668/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/nirajrules.wordpress.com/1668/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/nirajrules.wordpress.com/1668/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nirajrules.wordpress.com/1668/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nirajrules.wordpress.com/1668/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nirajrules.wordpress.com/1668/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nirajrules.wordpress.com/1668/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nirajrules.wordpress.com/1668/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nirajrules.wordpress.com/1668/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nirajrules.wordpress.com&amp;blog=3953176&amp;post=1668&amp;subd=nirajrules&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://nirajrules.wordpress.com/2011/07/12/setting-auto-commit-off-sql-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/13043c1961009b200ac731912a963b42?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">nirajrules</media:title>
		</media:content>

		<media:content url="http://nirajrules.files.wordpress.com/2011/07/ssms-implicit-transactions.png" medium="image">
			<media:title type="html">SSMS Implicit Transactions</media:title>
		</media:content>
	</item>
		<item>
		<title>Integrating Web Config Transformations with TFS Build</title>
		<link>http://nirajrules.wordpress.com/2011/07/04/integrating-web-config-transformations-with-tfs-build/</link>
		<comments>http://nirajrules.wordpress.com/2011/07/04/integrating-web-config-transformations-with-tfs-build/#comments</comments>
		<pubDate>Mon, 04 Jul 2011 18:05:13 +0000</pubDate>
		<dc:creator>nirajrules</dc:creator>
				<category><![CDATA[Team Foundation Server]]></category>
		<category><![CDATA[TFS]]></category>

		<guid isPermaLink="false">http://nirajrules.wordpress.com/?p=1654</guid>
		<description><![CDATA[Web Config Transformations a new feature available with .NET Framework 4.0 allows us to alter the configuration settings depending on the application target environment. Transformations are specified using Locator and Transform attributes within your configuration elements. You need to qualify these transformations with corresponding XML namespace as shown below (extract of sample web.staging.config): &#60;configuration xmlns:xdt=&#8221;http://schemas.microsoft.com/XML-Document-Transform&#8221;&#62; [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nirajrules.wordpress.com&amp;blog=3953176&amp;post=1654&amp;subd=nirajrules&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://msdn.microsoft.com/en-us/library/dd465326.aspx">Web Config Transformations</a> a new feature available with .NET Framework 4.0 allows us to alter the configuration settings depending on the application target environment. Transformations are specified using Locator and Transform attributes within your configuration elements. You need to qualify these transformations with corresponding XML namespace as shown below (extract of sample web.staging.config):</p>
<p>&lt;configuration <strong>xmlns:xdt=&#8221;http://schemas.microsoft.com/XML-Document-Transform&#8221;</strong>&gt;<br />
&lt;connectionStrings&gt;<br />
     &lt;add name=&#8221;DBConnString&#8221; … <strong>xdt:Transform=&#8221;Replace&#8221; xdt:Locator=&#8221;Match(name)&#8221;</strong><br />
 /&gt;<br />
&lt;/connectionStrings&gt;<br />
…</p>
<p>It’s important to note the outer elements (configuration/connectionStrings) which form the effective path of the XPath Expression. If Locator is missing implicit path is considered of the current element is considered which needs to be transformed. Locator attribute provides operations like Condition, Match and XPath to locate elements. Transform attribute provides operations like Replace, Insert, InsertBefore, InsertAfter, Remove, RemoveAll, RemoveAttributes, and SetAttributes among others. </p>
<p>Ideal productivity booster would be to integrate these transforms into our TFS Builds. So we select a build configuration and trigger a build and build picks up the corresponding transforms to be applied. Let’s see how we can do that. </p>
<p>To start with you need to add a new Solution Configuration using Configuration Manager.</p>
<p><a href="http://nirajrules.files.wordpress.com/2011/07/config-manager.png"><img class="alignnone size-full wp-image-1655" title="Config Manager" src="http://nirajrules.files.wordpress.com/2011/07/config-manager.png?w=604&#038;h=378" alt="" width="604" height="378" /></a></p>
<p>Right click the web.config and select ‘Add Config Transforms’</p>
<p><a href="http://nirajrules.files.wordpress.com/2011/07/config-transforms.png"><img class="alignnone size-full wp-image-1656" title="Config Transforms" src="http://nirajrules.files.wordpress.com/2011/07/config-transforms.png?w=604" alt=""   /></a></p>
<p>You can use the newly created file – ‘Web.Staging.Config’ to add all the transformations. Next step is to create a new TFS Build definition. While creating a new definition you need to specify ‘Staging’ for configuration build (this has to be a manual entry as the drop down would only support Debug / Release). We also pass an argument to via build definition (IsTFSBuild) in this case. Provide all the entries as appropriate inside the build definition.</p>
<p><a href="http://nirajrules.files.wordpress.com/2011/07/new-build-tfs.png"><img class="alignnone size-full wp-image-1657" title="New Build TFS" src="http://nirajrules.files.wordpress.com/2011/07/new-build-tfs.png?w=604&#038;h=269" alt="" width="604" height="269" /></a></p>
<p>Final step is to modify your CSPROJ file (you could have modify the BuildTemplate workflow but that&#8217;s not for faint hearted like me). Add the MSBuild target element as below which checks the ‘IsTFSBuild’ flag and applies the necessary transformations</p>
<p>&lt;Target Name=&#8221;AfterBuild&#8221; Condition=&#8221;$(IsTFSBuild)==&#8217;True&#8217;&#8221;&gt;<br />
    &lt;ItemGroup&gt;<br />
      &lt;DeleteAfterBuild Include=&#8221;$(WebProjectOutputDir)\Web.*.config&#8221; /&gt;<br />
    &lt;/ItemGroup&gt;<br />
    &lt;TransformXml Source=&#8221;Web.config&#8221; Transform=&#8221;$(ProjectConfigTransformFileName)&#8221; Destination=&#8221;$(WebProjectOutputDir)\Web.config&#8221; /&gt;<br />
    &lt;Delete Files=&#8221;@(DeleteAfterBuild)&#8221; /&gt;<br />
&lt;/Target&gt;</p>
<p>You may not find necessary MSBuild tasks like ‘TransformXml’ on your build machine. You would have to copy the below shown files to the MSBuild directory</p>
<p><a href="http://nirajrules.files.wordpress.com/2011/07/msbuild-files.png"><img class="alignnone size-full wp-image-1658" title="MSBuild Files" src="http://nirajrules.files.wordpress.com/2011/07/msbuild-files.png?w=604&#038;h=181" alt="" width="604" height="181" /></a></p>
<p>Hope this sets you up for higher levels of productivity <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  .</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nirajrules.wordpress.com/1654/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nirajrules.wordpress.com/1654/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nirajrules.wordpress.com/1654/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nirajrules.wordpress.com/1654/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/nirajrules.wordpress.com/1654/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/nirajrules.wordpress.com/1654/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/nirajrules.wordpress.com/1654/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/nirajrules.wordpress.com/1654/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nirajrules.wordpress.com/1654/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nirajrules.wordpress.com/1654/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nirajrules.wordpress.com/1654/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nirajrules.wordpress.com/1654/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nirajrules.wordpress.com/1654/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nirajrules.wordpress.com/1654/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nirajrules.wordpress.com&amp;blog=3953176&amp;post=1654&amp;subd=nirajrules&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://nirajrules.wordpress.com/2011/07/04/integrating-web-config-transformations-with-tfs-build/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/13043c1961009b200ac731912a963b42?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">nirajrules</media:title>
		</media:content>

		<media:content url="http://nirajrules.files.wordpress.com/2011/07/config-manager.png" medium="image">
			<media:title type="html">Config Manager</media:title>
		</media:content>

		<media:content url="http://nirajrules.files.wordpress.com/2011/07/config-transforms.png" medium="image">
			<media:title type="html">Config Transforms</media:title>
		</media:content>

		<media:content url="http://nirajrules.files.wordpress.com/2011/07/new-build-tfs.png" medium="image">
			<media:title type="html">New Build TFS</media:title>
		</media:content>

		<media:content url="http://nirajrules.files.wordpress.com/2011/07/msbuild-files.png" medium="image">
			<media:title type="html">MSBuild Files</media:title>
		</media:content>
	</item>
		<item>
		<title>Your Deals, Your Way &#8211; Leveraging Windows Azure for Facebook Applications</title>
		<link>http://nirajrules.wordpress.com/2011/06/26/your-deals-your-way-leveraging-windows-azure-for-facebook-applications/</link>
		<comments>http://nirajrules.wordpress.com/2011/06/26/your-deals-your-way-leveraging-windows-azure-for-facebook-applications/#comments</comments>
		<pubDate>Sat, 25 Jun 2011 18:50:16 +0000</pubDate>
		<dc:creator>nirajrules</dc:creator>
				<category><![CDATA[Windows Azure]]></category>
		<category><![CDATA[Azure]]></category>
		<category><![CDATA[Facebook]]></category>

		<guid isPermaLink="false">http://nirajrules.wordpress.com/?p=1628</guid>
		<description><![CDATA[In this blog post I will describe how you can use the demo version of Your Deals, Your Way (YDYW). YDYW is a web application hosted on Windows Azure and integrates with Facebook. You can access the application at – http://apps.facebook.com/yourdealsyourway. Below is a quick walkthrough of major workflows of the application (subscribing a deal [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nirajrules.wordpress.com&amp;blog=3953176&amp;post=1628&amp;subd=nirajrules&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In this blog post I will describe how you can use the demo version of <strong>Your Deals, Your Way (YDYW)</strong>. YDYW is a web application hosted on Windows Azure and integrates with Facebook. You can access the application at – <a href="http://apps.facebook.com/yourdealsyourway" target="_blank">http://apps.facebook.com/yourdealsyourway</a>. Below is a quick walkthrough of major workflows of the application (subscribing a deal and posting a deal) and a quick discussion on preventing your Facebook account from being spammed. Let;s get started:</p>
<p><strong>a) SUBSCRIBING TO DEALS</strong><br />
As a first step you need login with your Facebook account and grant it the required permissions. </p>
<p><a href="http://nirajrules.files.wordpress.com/2011/06/fb1.png"><img src="http://nirajrules.files.wordpress.com/2011/06/fb1.png?w=604" alt="" title="FB1"   class="alignnone size-full wp-image-1629" /></a></p>
<p><a href="http://nirajrules.files.wordpress.com/2011/06/fb2.png"><img src="http://nirajrules.files.wordpress.com/2011/06/fb2.png?w=604" alt="" title="FB2"   class="alignnone size-full wp-image-1630" /></a> </p>
<p>Now you will be moved to ‘Pick Your Deals!!!’ Page where you can pick deals you wish for</p>
<p><a href="http://nirajrules.files.wordpress.com/2011/06/fb3.png"><img src="http://nirajrules.files.wordpress.com/2011/06/fb3.png?w=604&#038;h=432" alt="" title="FB3" width="604" height="432" class="alignnone size-full wp-image-1631" /></a></p>
<p>Once you pick up a deal you see it populated in your wishful deals. </p>
<p><a href="http://nirajrules.files.wordpress.com/2011/06/fb4.png"><img src="http://nirajrules.files.wordpress.com/2011/06/fb4.png?w=604&#038;h=457" alt="" title="FB4" width="604" height="457" class="alignnone size-full wp-image-1632" /></a></p>
<p>Now whenever these deals would be available YDYW would leave a message on your Facebook wall, helping your friends to know about them and help you connect with others in case a bulk order discount is offered by vendor.</p>
<p><strong>b) POSTING DEALS</strong><br />
For the demo version posting a deal is open to anyone. One needs to browse the application page &#8211; <a href="http://yourdealsyourway.cloudapp.net" target="_blank">http://yourdealsyourway.cloudapp.net</a>. Login with account for which you want to post the deal</p>
<p><a href="http://nirajrules.files.wordpress.com/2011/06/fb5.png"><img src="http://nirajrules.files.wordpress.com/2011/06/fb5.png?w=604&#038;h=158" alt="" title="FB5" width="604" height="158" class="alignnone size-full wp-image-1633" /></a></p>
<p>Once logged into the application, you can see the subscribers’ graph allowing the account owner to see how many people are subscribed for his products, at what discounts and identify what is the viral reach of total subscribers for each product.</p>
<p><a href="http://nirajrules.files.wordpress.com/2011/06/fb6.png"><img src="http://nirajrules.files.wordpress.com/2011/06/fb6.png?w=604&#038;h=245" alt="" title="FB6" width="604" height="245" class="alignnone size-full wp-image-1634" /></a></p>
<p>Deals can be placed then for a given product, given discount till a given date and once placed they too will be available inside ‘Deals already placed’ section</p>
<p><a href="http://nirajrules.files.wordpress.com/2011/06/fb7.png"><img src="http://nirajrules.files.wordpress.com/2011/06/fb7.png?w=604" alt="" title="FB7"   class="alignnone size-full wp-image-1635" /></a></p>
<p>Whenever deal is placed it would notify all the subscribes in step (a) by leaving a message on their wall as below</p>
<p><a href="http://nirajrules.files.wordpress.com/2011/06/fb13.png"><img src="http://nirajrules.files.wordpress.com/2011/06/fb13.png?w=604" alt="" title="FB13"   class="alignnone size-full wp-image-1644" /></a></p>
<p><strong>c) PREVENT FB ACCOUNT FROM SPAM</strong><br />
As posting deals is open to general public at times you might find lot more posts on your walls. They way to turn of them is either deleting that post or unsubscribing to all the deals or remove access to the application. These are described below.</p>
<p>1) Removing a post on your wall is simple – just remove it by clicking close button</p>
<p><a href="http://nirajrules.files.wordpress.com/2011/06/fb8.png"><img src="http://nirajrules.files.wordpress.com/2011/06/fb8.png?w=604" alt="" title="FB8"   class="alignnone size-full wp-image-1636" /></a></p>
<p>2) Unsubscribing to deals too is quite easy just delete them. Application notifies you only when you are subscribed to a deal, removing these deals would ensure that you receive any unwanted messages</p>
<p><a href="http://nirajrules.files.wordpress.com/2011/06/fb91.png"><img src="http://nirajrules.files.wordpress.com/2011/06/fb91.png?w=604" alt="" title="FB9"   class="alignnone size-full wp-image-1638" /></a></p>
<p>3) Finally you can remove the access to ‘Your Deals, Your Way’, a route which I hope you won’t take . Do the same you need to go your account privacy settings as shown below</p>
<p><a href="http://nirajrules.files.wordpress.com/2011/06/fb10.png"><img src="http://nirajrules.files.wordpress.com/2011/06/fb10.png?w=604" alt="" title="FB10"   class="alignnone size-full wp-image-1639" /></a></p>
<p>Browse to Apps and Websites</p>
<p><a href="http://nirajrules.files.wordpress.com/2011/06/fb11.png"><img src="http://nirajrules.files.wordpress.com/2011/06/fb11.png?w=604" alt="" title="FB11"   class="alignnone size-full wp-image-1640" /></a></p>
<p>And finally remove the ‘Your Deals, Your Way’</p>
<p><a href="http://nirajrules.files.wordpress.com/2011/06/fb12.png"><img src="http://nirajrules.files.wordpress.com/2011/06/fb12.png?w=604&#038;h=66" alt="" title="FB12" width="604" height="66" class="alignnone size-full wp-image-1641" /></a></p>
<p>That’s it!!! Hope you had a good time visiting YDYW. Thanks for your time in testing out the alpha version and I look forward to your feedback <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  .</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nirajrules.wordpress.com/1628/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nirajrules.wordpress.com/1628/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nirajrules.wordpress.com/1628/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nirajrules.wordpress.com/1628/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/nirajrules.wordpress.com/1628/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/nirajrules.wordpress.com/1628/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/nirajrules.wordpress.com/1628/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/nirajrules.wordpress.com/1628/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nirajrules.wordpress.com/1628/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nirajrules.wordpress.com/1628/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nirajrules.wordpress.com/1628/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nirajrules.wordpress.com/1628/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nirajrules.wordpress.com/1628/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nirajrules.wordpress.com/1628/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nirajrules.wordpress.com&amp;blog=3953176&amp;post=1628&amp;subd=nirajrules&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://nirajrules.wordpress.com/2011/06/26/your-deals-your-way-leveraging-windows-azure-for-facebook-applications/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/13043c1961009b200ac731912a963b42?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">nirajrules</media:title>
		</media:content>

		<media:content url="http://nirajrules.files.wordpress.com/2011/06/fb1.png" medium="image">
			<media:title type="html">FB1</media:title>
		</media:content>

		<media:content url="http://nirajrules.files.wordpress.com/2011/06/fb2.png" medium="image">
			<media:title type="html">FB2</media:title>
		</media:content>

		<media:content url="http://nirajrules.files.wordpress.com/2011/06/fb3.png" medium="image">
			<media:title type="html">FB3</media:title>
		</media:content>

		<media:content url="http://nirajrules.files.wordpress.com/2011/06/fb4.png" medium="image">
			<media:title type="html">FB4</media:title>
		</media:content>

		<media:content url="http://nirajrules.files.wordpress.com/2011/06/fb5.png" medium="image">
			<media:title type="html">FB5</media:title>
		</media:content>

		<media:content url="http://nirajrules.files.wordpress.com/2011/06/fb6.png" medium="image">
			<media:title type="html">FB6</media:title>
		</media:content>

		<media:content url="http://nirajrules.files.wordpress.com/2011/06/fb7.png" medium="image">
			<media:title type="html">FB7</media:title>
		</media:content>

		<media:content url="http://nirajrules.files.wordpress.com/2011/06/fb13.png" medium="image">
			<media:title type="html">FB13</media:title>
		</media:content>

		<media:content url="http://nirajrules.files.wordpress.com/2011/06/fb8.png" medium="image">
			<media:title type="html">FB8</media:title>
		</media:content>

		<media:content url="http://nirajrules.files.wordpress.com/2011/06/fb91.png" medium="image">
			<media:title type="html">FB9</media:title>
		</media:content>

		<media:content url="http://nirajrules.files.wordpress.com/2011/06/fb10.png" medium="image">
			<media:title type="html">FB10</media:title>
		</media:content>

		<media:content url="http://nirajrules.files.wordpress.com/2011/06/fb11.png" medium="image">
			<media:title type="html">FB11</media:title>
		</media:content>

		<media:content url="http://nirajrules.files.wordpress.com/2011/06/fb12.png" medium="image">
			<media:title type="html">FB12</media:title>
		</media:content>
	</item>
		<item>
		<title>Print Page Alignment – SQL Server Reporting Services</title>
		<link>http://nirajrules.wordpress.com/2011/06/20/print-page-alignment-%e2%80%93-sql-server-reporting-services/</link>
		<comments>http://nirajrules.wordpress.com/2011/06/20/print-page-alignment-%e2%80%93-sql-server-reporting-services/#comments</comments>
		<pubDate>Mon, 20 Jun 2011 07:13:35 +0000</pubDate>
		<dc:creator>nirajrules</dc:creator>
				<category><![CDATA[SQL SERVER]]></category>
		<category><![CDATA[SSRS]]></category>

		<guid isPermaLink="false">http://nirajrules.wordpress.com/?p=1620</guid>
		<description><![CDATA[There could be times when you see an SSRS report fit quite nicely on your monitor but things turn out quite different when you actually hit ‘Print’ button. At times this could be due to overlooked sections of report, unnecessary white space, etc. but mostly due to bad printing alignment. To specify proper print alignment [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nirajrules.wordpress.com&amp;blog=3953176&amp;post=1620&amp;subd=nirajrules&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>There could be times when you see an SSRS report fit quite nicely on your monitor but things turn out quite different when you actually hit ‘Print’ button. At times this could be due to overlooked sections of report, unnecessary white space, etc. but mostly due to bad printing alignment.<br />
To specify proper print alignment for report one needs to measure its page size. You can do this by Selecting Report Menu -&gt; View -&gt; Ruler</p>
<p><a href="http://nirajrules.files.wordpress.com/2011/06/menu-options.png"><img src="http://nirajrules.files.wordpress.com/2011/06/menu-options.png?w=604" alt="" title="Menu Options"   class="alignnone size-full wp-image-1621" /></a></p>
<p>Try to assess the width of your report via Ruler (if you care for the height you can measure that too) </p>
<p><a href="http://nirajrules.files.wordpress.com/2011/06/ruler.png"><img src="http://nirajrules.files.wordpress.com/2011/06/ruler.png?w=604" alt="" title="Ruler"   class="alignnone size-full wp-image-1622" /></a></p>
<p>After assessing the width, go to report menu -&gt; report properties -&gt; page setup. Here you can select various options like Paper size, Page Units, Width, Height, Margins, etc. Ensure that the width you specify over here matches your width calculation via ruler and has necessary buffer for margins too. E.g. if the width via ruler indicates that report size is 10 inches, and your margins (Left and right) are one inch each, the width in page setup should be 12 inches as shown below or alternately you may to have to report per se to decrease its width:</p>
<p><a href="http://nirajrules.files.wordpress.com/2011/06/page-setup.png"><img src="http://nirajrules.files.wordpress.com/2011/06/page-setup.png?w=604&#038;h=468" alt="" title="Page Setup" width="604" height="468" class="alignnone size-full wp-image-1623" /></a></p>
<p>Hope this helps!!!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nirajrules.wordpress.com/1620/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nirajrules.wordpress.com/1620/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nirajrules.wordpress.com/1620/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nirajrules.wordpress.com/1620/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/nirajrules.wordpress.com/1620/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/nirajrules.wordpress.com/1620/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/nirajrules.wordpress.com/1620/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/nirajrules.wordpress.com/1620/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nirajrules.wordpress.com/1620/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nirajrules.wordpress.com/1620/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nirajrules.wordpress.com/1620/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nirajrules.wordpress.com/1620/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nirajrules.wordpress.com/1620/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nirajrules.wordpress.com/1620/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nirajrules.wordpress.com&amp;blog=3953176&amp;post=1620&amp;subd=nirajrules&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://nirajrules.wordpress.com/2011/06/20/print-page-alignment-%e2%80%93-sql-server-reporting-services/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/13043c1961009b200ac731912a963b42?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">nirajrules</media:title>
		</media:content>

		<media:content url="http://nirajrules.files.wordpress.com/2011/06/menu-options.png" medium="image">
			<media:title type="html">Menu Options</media:title>
		</media:content>

		<media:content url="http://nirajrules.files.wordpress.com/2011/06/ruler.png" medium="image">
			<media:title type="html">Ruler</media:title>
		</media:content>

		<media:content url="http://nirajrules.files.wordpress.com/2011/06/page-setup.png" medium="image">
			<media:title type="html">Page Setup</media:title>
		</media:content>
	</item>
		<item>
		<title>Installations for Setting up Windows Azure</title>
		<link>http://nirajrules.wordpress.com/2011/05/29/installations-for-setting-up-windows-azure/</link>
		<comments>http://nirajrules.wordpress.com/2011/05/29/installations-for-setting-up-windows-azure/#comments</comments>
		<pubDate>Sun, 29 May 2011 16:18:31 +0000</pubDate>
		<dc:creator>nirajrules</dc:creator>
				<category><![CDATA[Windows Azure]]></category>

		<guid isPermaLink="false">http://nirajrules.wordpress.com/?p=1601</guid>
		<description><![CDATA[Recently I had to format my machine and then had to go through the pain of setting it up again. I always have Windows Azure bits running on my machine. Hence, I thought of sharing related links which I have kept handy, hoping in case you have fresh machine to start with it would be [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nirajrules.wordpress.com&amp;blog=3953176&amp;post=1601&amp;subd=nirajrules&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Recently I had to format my machine and then had to go through the pain of setting it up again. I always have Windows Azure bits running on my machine. Hence, I thought of sharing related links which I have kept handy, hoping in case you have fresh machine to start with it would be helpful to you as well. Quick note to check the date of this blog post as the steps outlined could have been outdated (though I would try my best to revise the post as much as possible). Below are tools / SDKs one would ideally install after installing VS.NET 2010 (and SQL Server Express).</p>
<p>a) <a href="http://www.microsoft.com/downloads/en/details.aspx?familyid=7a1089b6-4050-4307-86c4-9dadaa5ed018">Windows Azure SDK and tools for Visual Studio</a> – The latest release of Windows Azure SDK is 1.4. If you want to install SDK and corresponding tooling for Visual Studio you can use the bundle – ‘VSCloudService.exe’. I would encourage you to follow the steps outlined in the Instructions section of the download page.</p>
<p>b) <a href="http://www.microsoft.com/downloads/en/details.aspx?FamilyID=EB9C345F-E830-40B8-A5FE-AE7A864C4D76">Windows Identity Foundation Runtime</a> – One would need this runtime for working with Windows Azure AppFabric  components like Service Bus and Access Control Service</p>
<p>c) <a href="http://www.microsoft.com/downloads/en/details.aspx?FamilyID=C148B2DF-C7AF-46BB-9162-2C9422208504">Windows Identity Foundation SDK</a> – Apart from providing samples this WIF SDK provides tooling for Visual Studio making the WIF work experience a breeze</p>
<p>d) <a href="http://www.microsoft.com/downloads/en/details.aspx?FamilyID=39856A03-1490-4283-908F-C8BF0BFAD8A5">Windows Azure AppFabric SDK V 1.0</a> – The necessary SDK to work with Windows Azure Appfabric</p>
<p>e) <a href="http://www.microsoft.com/downloads/en/details.aspx?FamilyID=D89640FC-C552-446E-AEAD-B1E0D940F31B">Windows Azure AppFabric  SDK V 2.0</a> – This update provides access to latest components of Windows Azure AppFabric like Caching Service and few enhancements to the existing components</p>
<p>Hope this helps!!!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nirajrules.wordpress.com/1601/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nirajrules.wordpress.com/1601/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nirajrules.wordpress.com/1601/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nirajrules.wordpress.com/1601/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/nirajrules.wordpress.com/1601/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/nirajrules.wordpress.com/1601/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/nirajrules.wordpress.com/1601/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/nirajrules.wordpress.com/1601/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nirajrules.wordpress.com/1601/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nirajrules.wordpress.com/1601/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nirajrules.wordpress.com/1601/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nirajrules.wordpress.com/1601/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nirajrules.wordpress.com/1601/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nirajrules.wordpress.com/1601/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nirajrules.wordpress.com&amp;blog=3953176&amp;post=1601&amp;subd=nirajrules&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://nirajrules.wordpress.com/2011/05/29/installations-for-setting-up-windows-azure/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/13043c1961009b200ac731912a963b42?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">nirajrules</media:title>
		</media:content>
	</item>
	</channel>
</rss>
