<?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>Benjamin Day Consulting, Inc.</title>
	<atom:link href="http://www.benday.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.benday.com</link>
	<description>Scrum, Team Foundation Server, and Visual Studio Best Practices</description>
	<lastBuildDate>Tue, 31 Jan 2012 20:19:44 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>TFS Lab Management VMs: &#8220;The trust relationship between this workstation and the primary domain failed.&#8221;</title>
		<link>http://www.benday.com/2012/01/31/tfs-lab-management-vms-the-trust-relationship-between-this-workstation-and-the-primary-domain-failed/</link>
		<comments>http://www.benday.com/2012/01/31/tfs-lab-management-vms-the-trust-relationship-between-this-workstation-and-the-primary-domain-failed/#comments</comments>
		<pubDate>Tue, 31 Jan 2012 20:19:44 +0000</pubDate>
		<dc:creator>Ben Day</dc:creator>
				<category><![CDATA[Application Lifecycle Management (ALM)]]></category>
		<category><![CDATA[Hyper-V]]></category>
		<category><![CDATA[TFS Lab Management]]></category>
		<category><![CDATA[Virtualization]]></category>

		<guid isPermaLink="false">http://www.benday.com/?p=442</guid>
		<description><![CDATA[<p>Have you seen this error before on you Team Foundation Server Lab Management virtual machines?&#160; “The trust relationship between this workstation and the primary domain failed.”&#160; You’ll probably see it on VMs that 1) are joined to a domain, 2) you don’t use very often, and 3) use Hyper-V snapshots (aka SCVMM “checkpoints”).&#160; </p> <p>In reality, this error has nothing to do with TFS Lab Management or Hyper-V and everything to do with Active Directory and how computer account are managed and updated for domain members.&#160; </p> <p>Huge thanks to <a href="http://www.jaylee.org/" target="_blank">Jérôme Laban’s</a> <a href="http://www.jaylee.org/post/2010/12/14/Virtual-Machines-Snapshots-Automated-Tests-and-Machine-Trust-Account.aspx" target="_blank">blog post describing the fix</a>. (Jérôme, you rock!)</p> <p>What’s going wrong?</p> <p>Here’s my understanding of how to cause the error:</p> <p>1. You create your [...]]]></description>
			<content:encoded><![CDATA[<p>Have you seen this error before on you Team Foundation Server Lab Management virtual machines?&nbsp; <em>“The trust relationship between this workstation and the primary domain failed.”</em>&nbsp; You’ll probably see it on VMs that 1) are joined to a domain, 2) you don’t use very often, and 3) use Hyper-V snapshots (aka SCVMM “checkpoints”).&nbsp; </p>
<p>In reality, this error has nothing to do with TFS Lab Management or Hyper-V and everything to do with Active Directory and how computer account are managed and updated for domain members.&nbsp; </p>
<p>Huge thanks to <a href="http://www.jaylee.org/" target="_blank">Jérôme Laban’s</a> <a href="http://www.jaylee.org/post/2010/12/14/Virtual-Machines-Snapshots-Automated-Tests-and-Machine-Trust-Account.aspx" target="_blank">blog post describing the fix</a>. (Jérôme, you rock!)</p>
<p><strong>What’s going wrong?</strong></p>
<p>Here’s my understanding of how to cause the error:</p>
<p>1. You create your VM and join it to the domain.&nbsp; <br />2. You work with the VM for a while, shut it down, and then take a snapshot of the machine in Hyper-V.<br />3. After taking the snapshot, you work with the VM for a while.<br />4. You don’t start the machine for a while (weeks or months), you revert to the snapshot, start the VM, and then try to log in.&nbsp; </p>
<p>BOOM!&nbsp; <em>“The trust relationship between this workstation and the primary domain failed.”</em> </p>
<p>Ever machine in your Active Directory domain has a computer account that has a password.&nbsp; This password is automatically changed on a schedule without you having to worry about it.&nbsp; Well, *usually* you don’t have to worry about it but somewhere during step #3, that password got changed.&nbsp; Then you go to step 4 and roll back the VM to the snapshot.&nbsp; At this point the domain controller has the *new* password and the snapshotted VM has the *old* password.&nbsp; That’s the cause of the <em>“trust relationship between this workstation and the primary domain failed”</em> error message.&nbsp; </p>
<p><strong>The Fix for the “Trust Relationship” Error</strong></p>
<p>You can either remove the computer from the domain and then rejoin the domain (aka. “the hard way”) or you can run “netdom resetpwd” (aka. &#8220;the easy way”).&nbsp; </p>
<blockquote><p>netdom resetpwd /server:MYDC /userd:MYDOMAIN\myuser /passwordD:* /securepasswordprompt</p>
</blockquote>
<p>Reboot the server and now everything’s working again.&nbsp; </p>
<p><strong>The Permanent Fix</strong></p>
<p>If your servers are not considered to be “high risk” and “high security” servers, you probably want to disable the computer account password reset.&nbsp; Here’s how you’d do it:&nbsp; <a href="http://technet.microsoft.com/en-us/library/cc962289.aspx">http://technet.microsoft.com/en-us/library/cc962289.aspx</a> and here’s the registry script (*.reg) file that you can run if you don’t feel like using RegEdit.exe.&nbsp; </p>
<blockquote><p>Windows Registry Editor Version 5.00</p>
<p>[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Netlogon\Parameters]<br />&#8220;DisablePasswordChange&#8221;=dword:00000001</p>
</blockquote>
<p>&nbsp;</p>
<p>Once again, thanks a ton to <a href="http://www.jaylee.org/" target="_blank">Jérôme Laban</a> for the information on this!</p>
<p>-Ben</p>
<p>&nbsp;</p>
<p><em>&#8211; Looking for help with Team Foundation Server Lab Management?&nbsp; Want to talk about incorporating Microsoft Test Manager and Coded UI tests into your software development process?&nbsp; We can help.&nbsp; Drop us a line at </em><a href="mailto:info@benday.com"><em>info@benday.com</em></a><em>. </em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.benday.com/2012/01/31/tfs-lab-management-vms-the-trust-relationship-between-this-workstation-and-the-primary-domain-failed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Debugging Visual Studio Load Test Rig Problems</title>
		<link>http://www.benday.com/2012/01/16/debugging-visual-studio-load-test-rig-problems-2/</link>
		<comments>http://www.benday.com/2012/01/16/debugging-visual-studio-load-test-rig-problems-2/#comments</comments>
		<pubDate>Tue, 17 Jan 2012 00:00:35 +0000</pubDate>
		<dc:creator>Ben Day</dc:creator>
				<category><![CDATA[Application Lifecycle Management (ALM)]]></category>
		<category><![CDATA[Load Tests]]></category>

		<guid isPermaLink="false">http://www.benday.com/?p=416</guid>
		<description><![CDATA[<p>I was setting up a Visual Studio Load Test rig for a customer recently and we ran into a handful of problems related to Performance Monitor Counters.&#160; Here are a couple of the problems and their solutions.</p> <p>Problem #1: You run the load tests on the Load Test rig and you get an error that says &#8220;The performance counter category &#8216;Memory&#8217; cannot be accessed on computer &#8216;{server name}&#8217; (Access is denied); check that the category and computer names are correct.&#8221; </p> <p>What’s Going Wrong?: There’s an “access is denied” error related to one or more performance counter(s) on one of servers under test.&#160; Since performance counters are collected from the Visual Studio Load Test Controller machine in the load test [...]]]></description>
			<content:encoded><![CDATA[<p>I was setting up a Visual Studio Load Test rig for a customer recently and we ran into a handful of problems related to Performance Monitor Counters.&nbsp; Here are a couple of the problems and their solutions.</p>
<p><strong>Problem #1</strong>: You run the load tests on the Load Test rig and you get an error that says &#8220;The performance counter category &#8216;Memory&#8217; cannot be accessed on computer &#8216;{server name}&#8217; (<strong>Access is denied</strong>); check that the category and computer names are correct.&#8221; </p>
<p><strong>What’s Going Wrong?: </strong>There’s an “access is denied” error related to one or more performance counter(s) on one of servers under test.&nbsp; Since performance counters are collected from the Visual Studio Load Test Controller machine in the load test rig, the service account for the Controller doesn’t have permissions to read the perfmon counter on that machine.</p>
<p><strong>The Fix:</strong> Log into the machine (“{server name}”) and add the Load Test Controller to the “Performance Monitor Users” group.&nbsp; </p>
<p><a href="http://www.benday.com/wp-content/uploads/2012/01/image.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.benday.com/wp-content/uploads/2012/01/image_thumb.png" width="421" height="468"></a></p>
<p>&nbsp;</p>
<p><strong>Problem #2: </strong>You run the load tests on the Load Test rig and you get an error that says &#8220;The performance counter category &#8216;Memory&#8217; cannot be accessed on computer &#8216;{server name}&#8217; (<strong>The network path was not found</strong>) ; check that the category and computer names are correct.&#8221;</p>
<p><strong>What’s Going Wrong?: </strong>The load test controller is running into a network problem while trying to collect the performance counter from that machine.&nbsp; There are two possibilities.&nbsp; 1) The Windows Firewall is blocking the traffic to this machine.&nbsp; 2) This machine is not set up to allow Performance Monitor (perfmon) counters to be read over the network.</p>
<p><strong>The Fix:</strong> First, check that the firewall is disabled for the offending server.&nbsp; (It’s kind of a “brute force” approach but it’s fast.)&nbsp; Second, verify that the “Remote Registry” service is running.&nbsp; This is usually enough but I’ve occasionally had to start the “Performance Logs &amp; Alerts” service, too.</p>
<p><a href="http://www.benday.com/wp-content/uploads/2012/01/SNAGHTML1d0f2eb6.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="SNAGHTML1d0f2eb6" border="0" alt="SNAGHTML1d0f2eb6" src="http://www.benday.com/wp-content/uploads/2012/01/SNAGHTML1d0f2eb6_thumb.png" width="633" height="102"></a></p>
<p>I hope this helps.</p>
<p>-Ben</p>
<p>&nbsp;</p>
<p><em>&#8211; Need some help load testing your application?&nbsp; Want some training for Visual Studio Web Performance Tests, Load Tests, and Test Agents/Controllers?&nbsp; Drop us a line at </em><a href="mailto:info@benday.com"><em>info@benday.com</em></a><em>. </em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.benday.com/2012/01/16/debugging-visual-studio-load-test-rig-problems-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Create Custom Performance Monitor (PerfMon) Counters</title>
		<link>http://www.benday.com/2011/12/17/how-to-create-custom-performance-monitor-perfmon-counters/</link>
		<comments>http://www.benday.com/2011/12/17/how-to-create-custom-performance-monitor-perfmon-counters/#comments</comments>
		<pubDate>Sat, 17 Dec 2011 16:18:56 +0000</pubDate>
		<dc:creator>Ben Day</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://benday.com/wordpress/?p=274</guid>
		<description><![CDATA[<p>I’ve been helping a customer develop some Visual Studio 2010 Web Performance Tests and Load Tests for their application.  Basically, they have an estimate in mind for how many simultaneous users they need to support and want to verify that they can actually handle this load.  </p> <p>Their application is a Silverlight front-end that talks to a number of WCF Services.  The focus for the load tests have been been primarily the WCF services and the server-side code.  For the first few days, we tried to look at how many service calls and see how many simultaneous operations they were handling and how quickly each operation completed.  You can basically figure this out by watching response times on the [ServiceOperation] [...]]]></description>
			<content:encoded><![CDATA[<p>I’ve been helping a customer develop some Visual Studio 2010 Web Performance Tests and Load Tests for their application.  Basically, they have an estimate in mind for how many simultaneous users they need to support and want to verify that they can actually handle this load.  </p>
<p>Their application is a Silverlight front-end that talks to a number of WCF Services.  The focus for the load tests have been been primarily the WCF services and the server-side code.  For the first few days, we tried to look at how many service calls and see how many simultaneous operations they were handling and how quickly each operation completed.  You can basically figure this out by watching response times on the [ServiceOperation] methods but, in our case, once we started finding some performance issues, this data was not detailed enough. </p>
<p><strong>The Problem:      <br /></strong>When load testing a running application, it’s not always possible to know exactly what’s going on in an application simply by profiling the public endpoints.  </p>
<p><strong>The Solution:      <br /></strong>Rather than indirectly guess at what’s going on, you can create custom Performance Counters that will provide detail about what’s happening in the application.  Once you’re instrumented the code with your custom performance counters, you can access the counter values at runtime using Performance Monitor (perfmon.exe) and/or.Visual Studio 2010 Load Tests.  </p>
<p><strong>The Counters:     <br /></strong>In the application, we had approximately 20 different operations that we wanted to gather performance numbers for.  For example, “Report Loading”, “Report Saving”, “Login”, etc.  For each of these operations, we needed to know     <br />1) how many of these operations have occurred    <br />2) how many operations are occurring per second    <br />3) the average duration of the operations    <br />4) number of operation-related errors </p>
<p><strong>Goals:     <br /></strong>Since we’ll have roughly 20 different operations and each operation will have approximately 4 performance counters, we wanted to create an object structure that would     <br />1) minimize duplicate or nearly duplicate code    <br />2) provide a unified and consistent way to create and delete performance counters when the application is deployed    <br />3) be easy for a developer to implement without having to understand the innards of the performance counter implementation.  </p>
<p><strong>The Design:</strong>    <br />(First off, big thanks to <a href="http://www.codeproject.com/KB/dotnet/perfcounter.aspx?msg=3261798" target="_blank">Michael Groeger’s article on The Code Project</a> for the discussion of how to create the counters.)  </p>
<p>To satisfy the design goals, we created a single class called OperationPerformanceCounterManager (figure 1). To record an operation, you access an instance of OperationPerformanceCounterManager and call RecordOperation().  If you have timing information to record, you’ll call RecordOperation(long duration) and pass the number of ticks that it took for your operation to execute.  If you encounter an error or have another operation that does not have any timing information, you’ll call the version of RecordOperation() that doesn’t take any parameters.   </p>
<p><a href="http://blog.benday.com/images/blog_benday_com/Windows-Live-Writer/How-to-Create-Custom-Performance-Monitor_A1A9/SNAGHTML1204436.png" rel="lightbox"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="SNAGHTML1204436" border="0" alt="SNAGHTML1204436" src="http://blog.benday.com/images/blog_benday_com/Windows-Live-Writer/How-to-Create-Custom-Performance-Monitor_A1A9/SNAGHTML1204436_thumb.png" width="393" height="254" /></a>    <br />Figure 1 – Operation Performance Counter Manager handles all the performance counter implementation details for a single operation type</p>
<p>The implementation in your application code is very straightforward.  You’ll create instances of OperationPerformanceCounterManager classes providing the Performance Counter Category and the Operation Name (see Figure 2).  </p>
<p><a href="http://blog.benday.com/images/blog_benday_com/Windows-Live-Writer/How-to-Create-Custom-Performance-Monitor_A1A9/SNAGHTML12c9b5a.png" rel="lightbox"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="SNAGHTML12c9b5a" border="0" alt="SNAGHTML12c9b5a" src="http://blog.benday.com/images/blog_benday_com/Windows-Live-Writer/How-to-Create-Custom-Performance-Monitor_A1A9/SNAGHTML12c9b5a_thumb.png" width="558" height="292" /></a>    <br />Figure 2 – Create instances of OperationPerformanceCounterManager by supplying the Category and Operation Name</p>
<p>Then your code only needs to gather the duration for the operation in ticks (NOT milliseconds) and then call RecordOperation() on the appropriate instance of OperationPerformanceCounterManager (see Figure 3).</p>
<p><a href="http://blog.benday.com/images/blog_benday_com/Windows-Live-Writer/How-to-Create-Custom-Performance-Monitor_A1A9/SNAGHTML1264c22.png" rel="lightbox"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="SNAGHTML1264c22" border="0" alt="SNAGHTML1264c22" src="http://blog.benday.com/images/blog_benday_com/Windows-Live-Writer/How-to-Create-Custom-Performance-Monitor_A1A9/SNAGHTML1264c22_thumb.png" width="572" height="257" /></a>    <br />Figure 3 – Gather the duration in ticks and call RecordOperation</p>
<p>When the application is running, you can either connect to it using Performance Monitor (see Figure 4) or collect the counter data using Visual Studio Load Tests.</p>
<p><a href="http://blog.benday.com/images/blog_benday_com/Windows-Live-Writer/How-to-Create-Custom-Performance-Monitor_CC01/SNAGHTMLa896493.png" rel="lightbox"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="SNAGHTMLa896493" border="0" alt="SNAGHTMLa896493" src="http://blog.benday.com/images/blog_benday_com/Windows-Live-Writer/How-to-Create-Custom-Performance-Monitor_CC01/SNAGHTMLa896493_thumb.png" width="640" height="458" /></a>     <br />Figure 4 – Accessing performance counters from perfmon.exe</p>
<p><strong>A Sample Application</strong></p>
<p>In order to prove these out, I created a <a href="http://www.benday.com/Samples/PerfmonCounters/Benday.PerfCounters.zip" target="_blank">sample application</a> that spins up a number of threads to do some work.  While the work is being performed, the application is continually updating its custom performance counters.  Figure 5 shows the user interface for the sample application.  When you click Start, it starts the threads.  In order to see the performance counters change at runtime, you can change the values for how the operations are executed.  “Min Duration Time (ms)” is the minimum number of milliseconds that an operation will take.  In order to simulate operations taking a varying amount of time, you can set “Duration Variation (ms)”.  The the operation executes, the application will pick a random number between 0 and “Duration Variation (ms)” and add it to the operation time.  “Min Wait Time (ms)” is the minimum amount of time that the application will wait before executing the next operation.  “Wait Variation (ms)” is similar to “Duration Variation (ms)” except that it becomes the random amount of time between operations. </p>
<p><a href="http://blog.benday.com/images/blog_benday_com/Windows-Live-Writer/How-to-Create-Custom-Performance-Monitor_CC01/SNAGHTML6614fe5.png" rel="lightbox"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="SNAGHTML6614fe5" border="0" alt="SNAGHTML6614fe5" src="http://blog.benday.com/images/blog_benday_com/Windows-Live-Writer/How-to-Create-Custom-Performance-Monitor_CC01/SNAGHTML6614fe5_thumb.png" width="396" height="351" /></a>     <br />Figure 5 – The sample application’s user interface</p>
<p>Performance Counters are defined within Windows and the definitions have to be created before they can be accessed.  The “Create Counters” and “Delete Counters” buttons call methods that create and delete the counter definitions on your workstation.  This only has to be run one time on each workstation or server.  <strong>NOTE: if you are going to create or delete the counter definitions, you must run the application as an Administrator.</strong></p>
<p>Once you have created the counter definitions on your box and the application is running, you can start watching the Performance Counters.  Open perfmon.exe, click the Add Counters button and then choose the counters from the list (see Figure 6).</p>
<p><a href="http://blog.benday.com/images/blog_benday_com/Windows-Live-Writer/How-to-Create-Custom-Performance-Monitor_A1A9/SNAGHTML134b2c1.png" rel="lightbox"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="SNAGHTML134b2c1" border="0" alt="SNAGHTML134b2c1" src="http://blog.benday.com/images/blog_benday_com/Windows-Live-Writer/How-to-Create-Custom-Performance-Monitor_A1A9/SNAGHTML134b2c1_thumb.png" width="469" height="364" /></a>    <br />Figure 6 – Choose the custom performance counters via perfmon.exe</p>
<p><a href="http://www.benday.com/Samples/PerfmonCounters/Benday.PerfCounters.zip" target="_blank"><strong>Here’s the link to download the source code</strong></a><strong>.</strong></p>
<p>-Ben</p>
<p> </p>
<p><em>&#8211; Have some sticky performance problems that you want help with?  Trying to make sense of Visual Studio Web Performance Tests, Load Tests, and Load Test Rigs?  Drop us a line at </em><a href="mailto:info@benday.com"><em>info@benday.com</em></a><em>.  </em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.benday.com/2011/12/17/how-to-create-custom-performance-monitor-perfmon-counters/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>&#8220;How to be a C# ninja in 10 easy steps&#8221;: Slides &amp; Code</title>
		<link>http://www.benday.com/2011/12/03/how-to-be-a-c-ninja-in-10-easy-steps-slides-code/</link>
		<comments>http://www.benday.com/2011/12/03/how-to-be-a-c-ninja-in-10-easy-steps-slides-code/#comments</comments>
		<pubDate>Sat, 03 Dec 2011 13:28:43 +0000</pubDate>
		<dc:creator>Ben Day</dc:creator>
				<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://benday.com/wordpress/?p=273</guid>
		<description><![CDATA[<p>I spoke at <a href="http://devboston.org/" target="_blank">Microsoft DevBoston</a> <a href="http://www.meetup.com/DevBoston/events/31896562/" target="_blank">a few days ago</a> and did my “How to be a C# ninja in 10 easy steps” talk.  As promised, here are my slides and my code samples.  </p> <p>Abstract: <br />Are you new to C# and want to get awesome? Are you pretty good at C# and you want to raise your game? Do you think you&#8217;re already awesome and just want to make sure? Worried about getting into a C# technical interview and Ben&#8217;s on the other side of the table lobbing tough C# questions at you just waiting for that moment where you start to sweat and then eventually crack under the pressure and then you die homeless [...]]]></description>
			<content:encoded><![CDATA[<p>I spoke at <a href="http://devboston.org/" target="_blank">Microsoft DevBoston</a> <a href="http://www.meetup.com/DevBoston/events/31896562/" target="_blank">a few days ago</a> and did my “How to be a C# ninja in 10 easy steps” talk.  As promised, here are my slides and my code samples.  </p>
<p><strong>Abstract:</strong>    <br />Are you new to C# and want to get awesome? Are you pretty good at C# and you want to raise your game? Do you think you&#8217;re already awesome and just want to make sure? Worried about getting into a C# technical interview and Ben&#8217;s on the other side of the table lobbing tough C# questions at you just waiting for that moment where you start to sweat and then eventually crack under the pressure and then you die homeless and alone all because this one interview went bad? </p>
<p>Then this is the talk for you. </p>
<p>In this session, Ben will go through 10+ important things to know about writing code in C# including what he asks for job interview questions and what he looks for during code reviews. </p>
<p><strong>Downloads:</strong>     <br /><a href="http://www.benday.com/BlogFiles/CSharpNinja_20111203/BenDay_CSharpNinja_Code.zip" target="_blank">Sample Code</a>    <br /><a href="http://www.benday.com/BlogFiles/CSharpNinja_20111203/BenDay_CSharpNinja_Slides.pdf" target="_blank">Slides</a></p>
<p>Thanks to everyone who came to the session!</p>
<p>-Ben</p>
]]></content:encoded>
			<wfw:commentRss>http://www.benday.com/2011/12/03/how-to-be-a-c-ninja-in-10-easy-steps-slides-code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TFS2010&#8217;s Stories Overview Report: What are &#8220;Test Points&#8221;?</title>
		<link>http://www.benday.com/2011/11/26/tfs2010s-stories-overview-report-what-are-test-points/</link>
		<comments>http://www.benday.com/2011/11/26/tfs2010s-stories-overview-report-what-are-test-points/#comments</comments>
		<pubDate>Sat, 26 Nov 2011 14:29:24 +0000</pubDate>
		<dc:creator>Ben Day</dc:creator>
				<category><![CDATA[Microsoft Test Manager]]></category>
		<category><![CDATA[Team Foundation Server 2010]]></category>

		<guid isPermaLink="false">http://benday.com/wordpress/?p=272</guid>
		<description><![CDATA[<p>I was visiting a new customer yesterday who is thinking of adopting Team Foundation Server 2010.  Amongst other things, they asked me for an overview of the SQL Server Reporting Services Reports –- specifically, which reports are good for Project Managers.  My first thought was the Stories Overview report.</p> <p>The Stories Overview report (see Figure 1) gives a high-level view of what User Stories (aka ‘work’ or ‘requirements’) are scheduled for the current Iteration, how much work has been completed on each User Story, how many hours of work is remaining for each User Story, plus information about QA testing activities such as test results and bugs.  </p> <p><a href="http://blog.benday.com/images/blog_benday_com/Windows-Live-Writer/What_675F/SNAGHTML23b7de68.png" rel="lightbox"></a> <br />Figure 1 – The Stories Overview Report</p> <p>As [...]]]></description>
			<content:encoded><![CDATA[<p>I was visiting a new customer yesterday who is thinking of adopting Team Foundation Server 2010.  Amongst other things, they asked me for an overview of the SQL Server Reporting Services Reports –- specifically, which reports are good for Project Managers.  My first thought was the Stories Overview report.</p>
<p>The Stories Overview report (see Figure 1) gives a high-level view of what User Stories (aka ‘work’ or ‘requirements’) are scheduled for the current Iteration, how much work has been completed on each User Story, how many hours of work is remaining for each User Story, plus information about QA testing activities such as test results and bugs.  </p>
<p><a href="http://blog.benday.com/images/blog_benday_com/Windows-Live-Writer/What_675F/SNAGHTML23b7de68.png" rel="lightbox"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="SNAGHTML23b7de68" border="0" alt="SNAGHTML23b7de68" src="http://blog.benday.com/images/blog_benday_com/Windows-Live-Writer/What_675F/SNAGHTML23b7de68_thumb.png" width="640" height="325" /></a>    <br />Figure 1 – The Stories Overview Report</p>
<p>As I was talking through the information and the value of the Stories Overview report, one of the people in the meeting asked “What’s that ‘Test Points’ column for?”  Everyone else in the meeting were apparently also thinking the same thing and chimed in “yah…what’s that column for?  Is that the number of Story Points for the User Story that’s been tested?  How do you figure that out?”  I had to admit that, although I’d looked at this report hundreds of times, I’d never noticed that Test Points column.  Mentally, I’d just filtered it out.  </p>
<p>So, yah.  <strong>What is that Test Points column for and how does it get populated?  </strong></p>
<p>The short answer is that it’s a measure of test complexity.  Basically, it answers how many different environment configurations does each requirement have associated with it.  For example, in a web application, you might need to test a feature in “Windows 7 with Internet Explorer 8”, “Windows 8 with Internet Explorer Metro”, and “Windows 7 with Chrome”.  That’s 3 different configurations and therefore that feature would get a Test Points value of 3 on the Stories Overview Report.</p>
<p><strong>Where &amp; How Do You Create Test Configurations?</strong></p>
<p>Test configurations are set using Microsoft Test Manager (MTM). In the Visual Studio Application Lifecycle Management (aka ‘Visual Studio ALM’ or ‘VS ALM’) world, MTM is the tool for QA Testers.  Where Visual Studio 2010 is the tool for developers that helps them do all their tasks as software developers, MTM is the tool for Quality Assurance people that helps them organize and do all work when they test software.  </p>
<p>MTM introduces the concepts of <strong>Test Plans, </strong><strong>Test Suites</strong> and <strong>Test Cases</strong>.  <strong>Test Plan </strong>is the top-level group of everything that needs to be done to test a given Iteration, Sprint, or Release.  Each Test Plan has one or more <strong>Test Suites</strong>.  <strong>Test Suites </strong>are the list of requirements (User Stories, Product Backlog Items) that need to be tested as part of the Test Plan.  Inside of the Test Suite, each requirement has one or more <strong>Test Cases</strong>.  A <strong>Test Case </strong>is the list of steps that need to be performed by a QA Tester in order to validate and verify the functionality that implements the requirement.  Figure 2 shows an overview of MTM’s user interface for organizing tests in a Test Plan.   </p>
<p><a href="http://blog.benday.com/images/blog_benday_com/Windows-Live-Writer/What_675F/image_12.png" rel="lightbox"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://blog.benday.com/images/blog_benday_com/Windows-Live-Writer/What_675F/image_thumb_5.png" width="640" height="390" /></a>    <br />Figure 2 –- Overview of the Microsoft Test Manager (MTM) Testing Center Window</p>
<p>If you double-click on a <strong>Test Case </strong>you get an editor (see Figure 3) that allows you to create and edit the steps that a QA Tester needs to perform.  </p>
<p><a href="http://blog.benday.com/images/blog_benday_com/Windows-Live-Writer/What_675F/SNAGHTML240bc79f.png" rel="lightbox"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="SNAGHTML240bc79f" border="0" alt="SNAGHTML240bc79f" src="http://blog.benday.com/images/blog_benday_com/Windows-Live-Writer/What_675F/SNAGHTML240bc79f_thumb.png" width="629" height="480" /></a>    <br />Figure 3 –- The Test Case editor that allows you to edit test steps</p>
<p><strong>Edit the Test Configurations for a Test Plan</strong></p>
<p>In the right-side panel in MTM, there’s a button labeled <strong>Configurations</strong> (see Figure 4).  When you select one or more Test Case from the grid and then click this button, you can then choose which Test Configurations are associated with the Test Case.  </p>
<p><a href="http://blog.benday.com/images/blog_benday_com/Windows-Live-Writer/What_675F/SNAGHTML23e2f0d0.png" rel="lightbox"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="SNAGHTML23e2f0d0" border="0" alt="SNAGHTML23e2f0d0" src="http://blog.benday.com/images/blog_benday_com/Windows-Live-Writer/What_675F/SNAGHTML23e2f0d0_thumb.png" width="646" height="302" /></a>    <br />Figure 4 –- Open the editor for the Configurations for a Test Case</p>
<p>After clicking the <strong>Configurations</strong> button, you’ll then see the <strong>Select Test Configurations</strong> screen (Figure 5).  This screen shows you the Test Cases that you selected on the previous screen and the list of available Test Configurations for the Test Suite.  You can check or uncheck the configurations for each Test Case in order to describe what is required to perform the tests.  </p>
<p><a href="http://blog.benday.com/images/blog_benday_com/Windows-Live-Writer/What_675F/SNAGHTML23ece9ce.png" rel="lightbox"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="SNAGHTML23ece9ce" border="0" alt="SNAGHTML23ece9ce" src="http://blog.benday.com/images/blog_benday_com/Windows-Live-Writer/What_675F/SNAGHTML23ece9ce_thumb.png" width="640" height="298" /></a>    <br />Figure 5 –- Associate test configurations with test cases on the Select Test Configurations screen</p>
<p>Checking or unchecking Test Configurations and then clicking the <strong>Apply Changes </strong>button associates the Configuration with the Test Case. This is the beginning of where the Test Points value in the Stories Overview report comes from. </p>
<p><strong>How Configurations Become Test Points</strong></p>
<p>After you have associated your Test Configurations with the Test Plans for the Requirement (User Story, Product Backlog Item), when you click on the Requirement in MTM’s Test Plan, you’ll see something like Figure 6.  Figure 6 shows you the list of Test Cases for the Requirement and one of the columns is <strong>Configurations</strong>.  The Configurations column shows you the number of configurations associated with each Test Case.  </p>
<p><a href="http://blog.benday.com/images/blog_benday_com/Windows-Live-Writer/What_675F/SNAGHTML24143021.png" rel="lightbox"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="SNAGHTML24143021" border="0" alt="SNAGHTML24143021" src="http://blog.benday.com/images/blog_benday_com/Windows-Live-Writer/What_675F/SNAGHTML24143021_thumb.png" width="712" height="276" /></a>    <br />Figure 6 –- Test Cases for a Requirement and the Configuration count </p>
<p>When you add up the number of Configurations for all the Test Cases in the Requirement, this number becomes that Requirement’s <strong>Test Points</strong> value in the <strong>Stories Overview</strong> report. </p>
<p>-Ben</p>
<p> </p>
<p><em>&#8211; Got questions about Microsoft Test Manager (MTM)?  Are your Test Suites a jumbled mess?  Want better ‘situational awareness’ for your project?  We can help.  Drop us a line at </em><a href="mailto:info@benday.com"><em>info@benday.com</em></a><em>. </em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.benday.com/2011/11/26/tfs2010s-stories-overview-report-what-are-test-points/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My slides and sample code from DevTeach Ottawa 2011</title>
		<link>http://www.benday.com/2011/11/04/my-slides-and-sample-code-from-devteach-ottawa-2011/</link>
		<comments>http://www.benday.com/2011/11/04/my-slides-and-sample-code-from-devteach-ottawa-2011/#comments</comments>
		<pubDate>Fri, 04 Nov 2011 20:48:58 +0000</pubDate>
		<dc:creator>Ben Day</dc:creator>
				<category><![CDATA[Unit Testing / Test-Driven Development (TDD)]]></category>
		<category><![CDATA[VSTS2010 Web Tests]]></category>

		<guid isPermaLink="false">http://benday.com/wordpress/?p=271</guid>
		<description><![CDATA[<p>I just wrapped up my sessions at DevTeach Ottawa 2011.  I gave the following two talks and, as promised, here are my slides and sample code.</p> <p>Too Slow: Use VS2010 Profiling &#38; Load Testing to Manage Performance Issues</p> <p>You thought you knew how to write fast code but your app just doesn’t perform. Massive servers and still only 20 concurrent users? What is going wrong? You can find out by using Visual Studio 2010’s code profiling features.</p> <p>Want to know how many users your app can currently support? Want to know how many users it takes to crush your servers? Or perhaps you want to know why the app breaks under load? Was it memory? Disk usage? Networking? IIS? SQL [...]]]></description>
			<content:encoded><![CDATA[<p>I just wrapped up my sessions at DevTeach Ottawa 2011.  I gave the following two talks and, as promised, here are my slides and sample code.</p>
<blockquote><p><b>Too Slow: Use VS2010 Profiling &amp; Load Testing to Manage Performance Issues</b></p>
<p>You thought you knew how to write fast code but your app just doesn’t perform. Massive servers and still only 20 concurrent users? What is going wrong? You can find out by using Visual Studio 2010’s code profiling features.</p>
<p>Want to know how many users your app can currently support? Want to know how many users it takes to crush your servers? Or perhaps you want to know why the app breaks under load? Was it memory? Disk usage? Networking? IIS? SQL Server? You can use Visual Studio’s load testing features to figure that out.</p>
<p>In this session, Ben will show you how to use these features to take a poorly performing application and make it fast. He’ll also talk about what you should be doing to find and stop performance problems before they happen by using Team Foundation Server automated builds and reporting.</p>
<p><a href="http://www.benday.com/BlogFiles/TechEd2011/Benday.Cms_WebLoadTests.zip" target="_blank">Sample Code</a>  <a href="http://www.benday.com/BlogFiles/DevTeachOttawa2011/BenDay_DevTeach_Ottawa2011_TooSlow.pptx" target="_blank">Slides</a></p>
</blockquote>
<blockquote><p><b>Design Patterns for Model-View-ViewModel Unit Testing &amp; Testability       <br /></b>      <br />MVVM is a great architecture that really lets you write well unit tested applications. In this session, Ben will talk about his experiences over the last year leading the development of a Silverlight MVVM-based application. From the architectural havoc of the async calls to layering your application to de-coupling your ViewModel from your WCF and data access code – you’ll learn from his mistakes and hear how to implement it all using unit tests with great code coverage. The goal of this session is to answer not only just “what should I test and how do I do it?” but also to answer “what’s worth testing?” in your WPF, Silverlight, and WP7 applications. Along the way, you can expect to hear a lot about interface-driven programming, design-for-testability, Dependency Injection, the Adapter and Repository patterns, and ViewModel best practices.</p>
<p><a href="http://www.benday.com/BlogFiles/DevTeachOttawa2011/BenDay_DevTeach_Ottawa2011_MvvmTestability.zip" target="_blank">Sample Code</a>  <a href="http://www.benday.com/BlogFiles/DevTeachOttawa2011/BenDay_DevTeach_Ottawa2011_MvvmTestability.pptx" target="_blank">Slides</a></p>
</blockquote>
<p>-Ben</p>
]]></content:encoded>
			<wfw:commentRss>http://www.benday.com/2011/11/04/my-slides-and-sample-code-from-devteach-ottawa-2011/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>VSLive Redmond 2011 Slides and Sample Code for my Unit Testing &amp; TFS2010 Build Sessions</title>
		<link>http://www.benday.com/2011/10/24/vslive-redmond-2011-slides-and-sample-code-for-my-unit-testing-tfs2010-build-sessions/</link>
		<comments>http://www.benday.com/2011/10/24/vslive-redmond-2011-slides-and-sample-code-for-my-unit-testing-tfs2010-build-sessions/#comments</comments>
		<pubDate>Mon, 24 Oct 2011 13:52:01 +0000</pubDate>
		<dc:creator>Ben Day</dc:creator>
				<category><![CDATA[Application Lifecycle Management (ALM)]]></category>
		<category><![CDATA[Team Build]]></category>
		<category><![CDATA[Team Foundation Server (TFS)]]></category>
		<category><![CDATA[Team Foundation Server 2010]]></category>
		<category><![CDATA[Unit Testing / Test-Driven Development (TDD)]]></category>

		<guid isPermaLink="false">http://benday.com/wordpress/?p=270</guid>
		<description><![CDATA[<p>I spoke at <a href="http://vslive.com/events/redmond-2011/home.aspx" target="_blank">VSLive in Redmond</a>, Washington last week and gave two talks: 1) “Team Foundation Server 2010 Builds: Understand, Configure, and Customize” and 2) “Design For Testability: Mocks, Stubs, Refactoring, and User Interfaces.”</p> <p>Here are the abstracts:</p> <p>Design for Testability: Mocks, Stubs, Refactoring, and User Interfaces</p> <p>You’re sold on unit testing. You’re even doing “test first” development – but there are always those nagging questions. How do your user interfaces fit into your testing plan? Do I have to call my database in order to have a good, solid test? What about calls into separate sub-systems or calls out to web services? Do you really need to have all those pieces running in order to test your [...]]]></description>
			<content:encoded><![CDATA[<p>I spoke at <a href="http://vslive.com/events/redmond-2011/home.aspx" target="_blank">VSLive in Redmond</a>, Washington last week and gave two talks: 1) “Team Foundation Server 2010 Builds: Understand, Configure, and Customize” and 2) “Design For Testability: Mocks, Stubs, Refactoring, and User Interfaces.”</p>
<p>Here are the abstracts:</p>
<blockquote><p><b>Design for Testability: Mocks, Stubs, Refactoring, and User Interfaces</b></p>
<p>You’re sold on unit testing. You’re even doing “test first” development – but there are always those nagging questions. How do your user interfaces fit into your testing plan? Do I have to call my database in order to have a good, solid test? What about calls into separate sub-systems or calls out to web services? Do you really need to have all those pieces running in order to test your logic?</p>
<p>In this session, Ben will start by clarifying the difference between “unit” and “integration” tests. After that, he’ll demonstrate how using dependency injection, mocks objects and stubs can help break dependencies and simplify your tests. Throughout the talk, you can expect to hear a lot about design patterns, how much code coverage is enough, and the fine line between too much and too little object mocking.</p>
</blockquote>
<blockquote><p><b>Team Foundation Server 2010 Builds: Understand, Configure, and Customize </b></p>
<p>The new Build system in TFS2010 could be the best new feature in the product. Actually, it’s almost definitely the best new feature in the product. It’s been completely re-written to use Windows Workflow and has done away with the old-style, clunky TFS2008 Team Build scripts. (Buh-bye, MSBuild.) It’s better integrated with Source Control through the new Gated Checkin feature that requires a build to pass before code can be checked in. (Buh-bye, broken builds.) There’s even integration with Lab Management.</p>
<p>Let’s just say that there have been a lot of changes.</p>
<p>In this talk, Ben will start by giving you a tour of the new features. Then he’ll move on to show you how to configure your build servers and builds. Finally, he’ll show you how to extend and customize the default build scripts to handle environment-specific configuration files, configuring IIS applications, and more.</p>
</blockquote>
<p>Here are the slides and code samples:</p>
<ul>
<li><a href="http://www.benday.com/presentations/VSLiveRedmond2011/BenDay_VSLiveRedmond2011_UnitTesting.ppt" target="_blank">Design for Testability slides</a></li>
<li><a href="http://www.benday.com/presentations/VSLiveRedmond2011/BenDay_VSLiveRedmond2011_UnitTesting_CodeSamples.zip" target="_blank">Design for Testability code samples</a></li>
<li><a href="http://www.benday.com/presentations/VSLiveRedmond2011/BenDay_VSLiveRedmond2011_Tfs2010Build.ppt" target="_blank">TFS2010 Build slides</a></li>
<li><a href="http://www.benday.com/presentations/VSLiveRedmond2011/BenDay_VSLiveRedmond2011_TfsBuild_SampleCode.zip" target="_blank">TFS2010 Build code samples</a></li>
</ul>
<p>-Ben</p>
]]></content:encoded>
			<wfw:commentRss>http://www.benday.com/2011/10/24/vslive-redmond-2011-slides-and-sample-code-for-my-unit-testing-tfs2010-build-sessions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Three possible causes for TFS to Project Server sync &#8220;failure&#8221;</title>
		<link>http://www.benday.com/2011/10/22/three-possible-causes-for-tfs-to-project-server-sync-failure/</link>
		<comments>http://www.benday.com/2011/10/22/three-possible-causes-for-tfs-to-project-server-sync-failure/#comments</comments>
		<pubDate>Sat, 22 Oct 2011 12:10:43 +0000</pubDate>
		<dc:creator>Ben Day</dc:creator>
				<category><![CDATA[Microsoft Project Server]]></category>
		<category><![CDATA[Team Foundation Server (TFS)]]></category>
		<category><![CDATA[Team Foundation Server 2010]]></category>

		<guid isPermaLink="false">http://benday.com/wordpress/?p=269</guid>
		<description><![CDATA[<p>If you didn’t know already, there is a connector from Microsoft that lets you <a href="http://blogs.msdn.com/b/bharry/archive/2011/03/08/vs-tfs-2010-sp1-and-tfs-project-server-integration-feature-pack-have-released.aspx" target="_blank">synchronize work items in TFS with enterprise project plans in Microsoft Project Server</a>.  I’ve been working with this synchronization feature for a project that I’m doing and ran into a couple of “user error” problems.  Put another way, everything was configured but I couldn’t get any work items to sync.  Even when I ran the command to export the work item sync errors (“tfsadmin ProjectServer /GetSyncMessages”) I was getting nothing.  </p> <p>Turns out that the problems were all related to “user error”.  (Doh!)</p> <p>First off, huge thanks to <a href="http://social.microsoft.com/profile/federico%20kolliker%20frers%20-%20ms/" target="_blank">Federico Kolliker Frers</a> and <a href="http://blogs.msdn.com/b/sbhatia/" target="_blank">Siddharth Bhatia</a> at Microsoft for them help with [...]]]></description>
			<content:encoded><![CDATA[<p>If you didn’t know already, there is a connector from Microsoft that lets you <a href="http://blogs.msdn.com/b/bharry/archive/2011/03/08/vs-tfs-2010-sp1-and-tfs-project-server-integration-feature-pack-have-released.aspx" target="_blank">synchronize work items in TFS with enterprise project plans in Microsoft Project Server</a>.  I’ve been working with this synchronization feature for a project that I’m doing and ran into a couple of “user error” problems.  Put another way, everything was configured but I couldn’t get any work items to sync.  Even when I ran the command to export the work item sync errors (“tfsadmin ProjectServer /GetSyncMessages”) I was getting nothing.  </p>
<p>Turns out that the problems were all related to “user error”.  (Doh!)</p>
<p>First off, huge thanks to <a href="http://social.microsoft.com/profile/federico%20kolliker%20frers%20-%20ms/" target="_blank">Federico Kolliker Frers</a> and <a href="http://blogs.msdn.com/b/sbhatia/" target="_blank">Siddharth Bhatia</a> at Microsoft for them help with these issues.  </p>
<p><strong><u>Issue #1: Empty Enterprise Project field</u></strong></p>
<p>In order to sync a work item between TFS and PS, you don’t have to do a lot more than just setting the “Submit to Project Server” field to “yes” on the work item.  There’s also a field called “Enterprise Project” that’s right next to “Submit to Project Server” that was empty.  I assumed that because I only had one Enterprise Project mapped to my Team Project that the sync would auto-populate the “Enterprise Project” field.  </p>
<p>Nope.  It doesn’t work that way because you can map a single Team Project to multiple Project Server Enterprise Projects.  There’s no good way for the sync to know which Enterprise Project you mean so you have have to specify it.  </p>
<p><a href="http://blog.benday.com/images/blog_benday_com/Windows-Live-Writer/Two-possible-causes-for-TFS-to-Project-S_62C6/SNAGHTML440020.png" rel="lightbox"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="SNAGHTML440020" border="0" alt="SNAGHTML440020" src="http://blog.benday.com/images/blog_benday_com/Windows-Live-Writer/Two-possible-causes-for-TFS-to-Project-S_62C6/SNAGHTML440020_thumb.png" width="599" height="439" /></a>     <br />Figure 1. Don’t forget to specify an Enterprise Project for the Work Item.</p>
<p><strong><u>Issue #2: You need to specify Project Resources, too.</u></strong></p>
<p>In Project Server, you specify pools of people who are globally available to your company by creating what are known as “Enterprise Resources”.  Basically, these are the people who can do work on your projects.  Enterprise Resources are added via the Resource Center (Figure 2) on your Project Server web site (typically, <a href="http://machinename/PWA">http://<em>machinename</em>/PWA</a>).</p>
<p><a href="http://blog.benday.com/images/blog_benday_com/Windows-Live-Writer/Two-possible-causes-for-TFS-to-Project-S_62C6/SNAGHTML56c10e.png" rel="lightbox"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="SNAGHTML56c10e" border="0" alt="SNAGHTML56c10e" src="http://blog.benday.com/images/blog_benday_com/Windows-Live-Writer/Two-possible-causes-for-TFS-to-Project-S_62C6/SNAGHTML56c10e_thumb.png" width="632" height="480" /></a>     <br />Figure 2. Add Project Server Enterprise Resources through the Resource Center</p>
<p>When you create an Enterprise Project plan in Project Server, it doesn’t mean that all of the resources in Resource Center are addressable from your Enterprise Project. Turns out that there’s a difference between <strong>Enterprise Resources</strong> and <strong><em>Project Resources</em></strong>.  Since I hadn’t populated my Project Resources, the TFS-to-Project Server sync was erroring because the TFS work item was assigned to someone who wasn’t (from the perspective of Project Server) actually working on the project.  </p>
<p><strong>To fix this:</strong></p>
<p>1. Open your Enterprise Project plan in the desktop version of Microsoft Project    <br />2. Click on the <strong>Resources </strong>tab     <br />3. Click on the <strong>Add Resources</strong> button and choose <strong>Build Team from Enterprise</strong> as shown in Figure 3</p>
<p><a href="http://blog.benday.com/images/blog_benday_com/Windows-Live-Writer/Two-possible-causes-for-TFS-to-Project-S_62C6/SNAGHTML5bf1bf.png" rel="lightbox"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="SNAGHTML5bf1bf" border="0" alt="SNAGHTML5bf1bf" src="http://blog.benday.com/images/blog_benday_com/Windows-Live-Writer/Two-possible-causes-for-TFS-to-Project-S_62C6/SNAGHTML5bf1bf_thumb.png" width="502" height="238" /></a>     <br />Figure 3. Choose Build Team from Enterprise</p>
<p>4. Add Enterprise Resources as Project Resources as shown in Figure 4</p>
<p><a href="http://blog.benday.com/images/blog_benday_com/Windows-Live-Writer/Two-possible-causes-for-TFS-to-Project-S_62C6/SNAGHTML5d404b.png" rel="lightbox"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="SNAGHTML5d404b" border="0" alt="SNAGHTML5d404b" src="http://blog.benday.com/images/blog_benday_com/Windows-Live-Writer/Two-possible-causes-for-TFS-to-Project-S_62C6/SNAGHTML5d404b_thumb.png" width="639" height="480" /></a>     <br />Figure 4. Add Enterprise Resources from the left to the Project Resources on the right</p>
<p>5. Click OK    <br />6. Publish the project plan to Project Server (Figure 5).  Click on the File tab, then click Info, and then click Publish.</p>
<p><a href="http://blog.benday.com/images/blog_benday_com/Windows-Live-Writer/Two-possible-causes-for-TFS-to-Project-S_62C6/SNAGHTML60ad9e.png" rel="lightbox"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="SNAGHTML60ad9e" border="0" alt="SNAGHTML60ad9e" src="http://blog.benday.com/images/blog_benday_com/Windows-Live-Writer/Two-possible-causes-for-TFS-to-Project-S_62C6/SNAGHTML60ad9e_thumb.png" width="536" height="474" /></a>     <br />Figure 5. Publish the project plan to Project Server</p>
<p><strong><u>Issue #3: Edits to the Enterprise Project Plan are not replicating to TFS</u></strong></p>
<p>When you make edits to a project plan in Microsoft Project and then close the file, you’ll get a dialog (Figure 6) that will ask you if you want to save your changes and check in.  </p>
<p><a href="http://blog.benday.com/images/blog_benday_com/Windows-Live-Writer/Two-possible-causes-for-TFS-to-Project-S_62C6/SNAGHTML6473d9.png" rel="lightbox"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="SNAGHTML6473d9" border="0" alt="SNAGHTML6473d9" src="http://blog.benday.com/images/blog_benday_com/Windows-Live-Writer/Two-possible-causes-for-TFS-to-Project-S_62C6/SNAGHTML6473d9_thumb.png" width="292" height="237" /></a></p>
<p>Figure 6. The Project Plan save and check in dialog</p>
<p>I made a bunch of changes to my Enterprise Project Plan and thought that just because I’d set the &#8220;Publish to Team Project” value to “yes” (Figure 7) that my Save &amp; Check In would cause them to go back to TFS from Project Server.  </p>
<p><a href="http://blog.benday.com/images/blog_benday_com/Windows-Live-Writer/Two-possible-causes-for-TFS-to-Project-S_62C6/SNAGHTML68b848.png" rel="lightbox"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="SNAGHTML68b848" border="0" alt="SNAGHTML68b848" src="http://blog.benday.com/images/blog_benday_com/Windows-Live-Writer/Two-possible-causes-for-TFS-to-Project-S_62C6/SNAGHTML68b848_thumb.png" width="412" height="249" /></a>     <br />Figure 7. To sync items in your plan with TFS, marked adjust the Publish to Team Project value</p>
<p>Turns out that there’s a difference between Checking In a project plan and actually publishing a project plan. If you check in, it isn’t fully available to the rest of Microsoft Project Server. The changes are only available to Project Server after you’ve Published them.  Once Project Server can see them, then the sync to TFS will see them, too.  </p>
<p>To Publish from Microsoft Project, click on the File tab, then click Info, and then click the Publish button as shown in Figure 8.  </p>
<p><a href="http://blog.benday.com/images/blog_benday_com/Windows-Live-Writer/Two-possible-causes-for-TFS-to-Project-S_62C6/SNAGHTML6c72ff.png" rel="lightbox"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="SNAGHTML6c72ff" border="0" alt="SNAGHTML6c72ff" src="http://blog.benday.com/images/blog_benday_com/Windows-Live-Writer/Two-possible-causes-for-TFS-to-Project-S_62C6/SNAGHTML6c72ff_thumb.png" width="536" height="474" /></a>     <br />Figure 8. Publish your changes from Microsoft Project to Project Server</p>
<p> </p>
<p>I hope this helps.</p>
<p>-Ben</p>
<p> </p>
<p><em>&#8211; Looking for help setting up Microsoft Project Server and configuring it to synchronize with Team Foundation Server?  Want some advice on how to run Scrum teams in a Waterfall-centric enterprise?  Drop us a line at </em><a href="mailto:info@benday.com"><em>info@benday.com</em></a><em>.  </em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.benday.com/2011/10/22/three-possible-causes-for-tfs-to-project-server-sync-failure/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Disable REST WebRequest URL caching on WP7 Mango</title>
		<link>http://www.benday.com/2011/10/06/disable-rest-webrequest-url-caching-on-wp7-mango/</link>
		<comments>http://www.benday.com/2011/10/06/disable-rest-webrequest-url-caching-on-wp7-mango/#comments</comments>
		<pubDate>Thu, 06 Oct 2011 12:05:17 +0000</pubDate>
		<dc:creator>Ben Day</dc:creator>
				<category><![CDATA[Windows Phone 7 (WP7)]]></category>

		<guid isPermaLink="false">http://benday.com/wordpress/?p=268</guid>
		<description><![CDATA[<p>I’m writing an application for Windows Phone 7 Mango that should be hitting the marketplace shortly.  The application allows you to access the real-time feeds that report MBTA bus locations and predictions for when buses will arrive at a particular stop.  These feeds are exposed as REST services.  </p> <p>Yesterday, I found that I wasn’t able to refresh bus stop predictions and, after I drilled into the problem, I discovered that Mango was caching the result of the request.  Same request URL always returned the same response data.  Well, this wasn’t helpful because the data changes from minute to minute. </p> <p>Problem: Windows Phone 7.5 (Mango) returns the same HTTP response result for a given request URL sent to a [...]]]></description>
			<content:encoded><![CDATA[<p>I’m writing an application for Windows Phone 7 Mango that should be hitting the marketplace shortly.  The application allows you to access the real-time feeds that report MBTA bus locations and predictions for when buses will arrive at a particular stop.  These feeds are exposed as REST services.  </p>
<p>Yesterday, I found that I wasn’t able to refresh bus stop predictions and, after I drilled into the problem, I discovered that Mango was caching the result of the request.  Same request URL always returned the same response data.  Well, this wasn’t helpful because the data changes from minute to minute. </p>
<p><strong>Problem:</strong> Windows Phone 7.5 (Mango) returns the same HTTP response result for a given request URL sent to a REST web service.  </p>
<p><strong>Cause:</strong> The HttpWebRequest and HttpWebResponse objects that are returned by WebRequest.Create(string url) use caching that is based on the URL text.  If the text of the URL doesn’t change (same base URL plus query string parameters), the caching system assumes it can save time and return the same data.</p>
<p><strong>Solution / Workaround:</strong> Append the current DateTime.Now.Ticks value to the WebRequest query string.  This makes the web requests reasonably unique from request to request and the responses become un-cacheable.</p>
<p><a href="http://blog.benday.com/images/blog_benday_com/Windows-Live-Writer/700adacee71d_6DD1/SNAGHTML320fdee.png" rel="lightbox"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="SNAGHTML320fdee" border="0" alt="SNAGHTML320fdee" src="http://blog.benday.com/images/blog_benday_com/Windows-Live-Writer/700adacee71d_6DD1/SNAGHTML320fdee_thumb.png" width="640" height="257" /></a></p>
<p>I hope this helps.</p>
<p>-Ben</p>
]]></content:encoded>
			<wfw:commentRss>http://www.benday.com/2011/10/06/disable-rest-webrequest-url-caching-on-wp7-mango/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Speaking at DevTeach Ottawa: November 2 through November 4, 2011</title>
		<link>http://www.benday.com/2011/09/30/speaking-at-devteach-ottawa-november-2-through-november-4-2011/</link>
		<comments>http://www.benday.com/2011/09/30/speaking-at-devteach-ottawa-november-2-through-november-4-2011/#comments</comments>
		<pubDate>Fri, 30 Sep 2011 17:58:31 +0000</pubDate>
		<dc:creator>Ben Day</dc:creator>
				<category><![CDATA[Application Lifecycle Management (ALM)]]></category>
		<category><![CDATA[Unit Testing / Test-Driven Development (TDD)]]></category>
		<category><![CDATA[Visual Studio 2010]]></category>
		<category><![CDATA[VSTS2010 Web Tests]]></category>

		<guid isPermaLink="false">http://benday.com/wordpress/?p=267</guid>
		<description><![CDATA[<p>Some more news.  I’ll be speaking at <a href="http://www.devteach.com/" target="_blank">DevTeach in Ottawa, ON</a>.  The schedule isn’t 100% set in stone yet but the conference runs from 11/2/2011 through 11/4/2011 and I’ll be giving two talks.</p> <p>Here are the abstracts:</p> <p>Too Slow: Use VS2010 Profiling &#38; Load Testing to Manage Performance Issues</p> <p>You thought you knew how to write fast code but your app just doesn’t perform. Massive servers and still only 20 concurrent users? What is going wrong? You can find out by using Visual Studio 2010’s code profiling features.</p> <p>Want to know how many users your app can currently support? Want to know how many users it takes to crush your servers? Or perhaps you want to know why [...]]]></description>
			<content:encoded><![CDATA[<p>Some more news.  I’ll be speaking at <a href="http://www.devteach.com/" target="_blank">DevTeach in Ottawa, ON</a>.  The schedule isn’t 100% set in stone yet but the conference runs from 11/2/2011 through 11/4/2011 and I’ll be giving two talks.</p>
<p>Here are the abstracts:</p>
<blockquote><p><b>Too Slow: Use VS2010 Profiling &amp; Load Testing to Manage Performance Issues</b></p>
<p>You thought you knew how to write fast code but your app just doesn’t perform. Massive servers and still only 20 concurrent users? What is going wrong? You can find out by using Visual Studio 2010’s code profiling features.</p>
<p>Want to know how many users your app can currently support? Want to know how many users it takes to crush your servers? Or perhaps you want to know why the app breaks under load? Was it memory? Disk usage? Networking? IIS? SQL Server? You can use Visual Studio’s load testing features to figure that out.</p>
<p>In this session, Ben will show you how to use these features to take a poorly performing application and make it fast. He’ll also talk about what you should be doing to find and stop performance problems before they happen by using Team Foundation Server automated builds and reporting.</p>
</blockquote>
<blockquote><p><b>Design Patterns for Model-View-ViewModel Unit Testing &amp; Testability       <br /></b>      <br />MVVM is a great architecture that really lets you write well unit tested applications. In this session, Ben will talk about his experiences over the last year leading the development of a Silverlight MVVM-based application. From the architectural havoc of the async calls to layering your application to de-coupling your ViewModel from your WCF and data access code – you’ll learn from his mistakes and hear how to implement it all using unit tests with great code coverage. The goal of this session is to answer not only just “what should I test and how do I do it?” but also to answer “what’s worth testing?” in your WPF, Silverlight, and WP7 applications. Along the way, you can expect to hear a lot about interface-driven programming, design-for-testability, Dependency Injection, the Adapter and Repository patterns, and ViewModel best practices.</p>
</blockquote>
<p>-Ben</p>
]]></content:encoded>
			<wfw:commentRss>http://www.benday.com/2011/09/30/speaking-at-devteach-ottawa-november-2-through-november-4-2011/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

