<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="https://www.w3.org/2005/Atom" xmlns:sy="https://purl.org/rss/1.0/modules/syndication/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:slash="https://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>Paul Lou's blog</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/paullou/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/paullou/feed.xml</link>
    <description />
    <lastBuildDate>Thu, 10 Mar 2016 16:36:57 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>TF401189: The source branch has been modified since the last merge attempt</title>
      <link>https://docs.microsoft.com/archive/blogs/paullou/tf401189-the-source-branch-has-been-modified-since-the-last-merge-attempt</link>
      <pubDate>Sat, 20 Feb 2016 22:51:00 GMT</pubDate>
      <dc:creator><![CDATA[Paul Lou]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/paullou/2016/02/20/tf401189-the-source-branch-has-been-modified-since-the-last-merge-attempt/</guid>
      <description><![CDATA[If you are using Visual Studio Online and setup your project using TFS doing a code review is...]]></description>
      <content:encoded><![CDATA[<p>If you are using Visual Studio Online and setup your project using TFS doing a code review is straightforward in visual studio.</p>
<p>However ff you are using Visual Studio Online and setup your project Git you might wonder how you can conduct a code review. You may do a quick search and then try &lsquo;new pull request&rsquo; . You might get a weird error message you don&rsquo;t understand.</p>
<p><strong>TF401189: The source branch has been modified since the last merge attempt</strong></p>
<p>Then you do another search (bing or google) you won&rsquo;t find anything useful.</p>
<p>After trial and error I found that the root cause is that I didn&rsquo;t use a topic branch. It is that simple.</p>
<p><a href="https://paullou.com/2016/02/20/tf401189-the-source-branch-has-been-modified-since-the-last-merge-attempt/">https://paullou.com/2016/02/20/tf401189-the-source-branch-has-been-modified-since-the-last-merge-attempt/</a></p>]]></content:encoded>
    </item>
    <item>
      <title>Debugging a weird process crash issue</title>
      <link>https://docs.microsoft.com/archive/blogs/paullou/debugging-a-weird-process-crash-issue</link>
      <pubDate>Tue, 22 Dec 2015 15:18:31 GMT</pubDate>
      <dc:creator><![CDATA[Paul Lou]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/paullou/2015/12/22/debugging-a-weird-process-crash-issue/</guid>
      <description><![CDATA[I recently debugged a very interesting process crash issue. The code was running in the cloud so I...]]></description>
      <content:encoded><![CDATA[<p><strong>I recently debugged a very interesting process crash issue.</strong> The code was running in the cloud so I could not just attach the debugger as easily as on my dev box. Besides using debugger should be the last option in my opinion. So I logged on to the machine. Well before that I had to go a through a process to get permission and get the environment ready for security/compliance reason. I observed that the process was recycling by using taskmgr. So I did the below things<br /> 1. <strong>Checked the log</strong>.&nbsp; No exceptions. No errors. No logs related to the crash<br /> 2. <strong>Checked crash dump files</strong>. No files were there<br /> 3. <strong>Checked OS eventlog</strong>. No crash events. Normally for any process crash there is at least one event</p>
<p>I never saw a process crash like this. But I knew the related code which caused this. It was a background task kicked off by calling <strong>Task.Run(). </strong>I thought that there must be some unhandled exceptions but I checked the code. There was already a catch block which caught all exceptions. However it was still possible that the catch block might throw exception. So I put another catch all inside the catch block to make sure that no unhandled exception was thrown.</p>
<p>However it did not work. The process was still crashing. I asked around about how a process could crash since I was relatively new to the code base. I got some pointers but none of them could match what I observed.</p>
<p>Then I had to turn to the last option. I copied windbg to all the nodes (remember that this is distributed system and there are multiple replicas) and hooked it up with the process. Boom! I got an exception in the debugger and then the process crashed.</p>
<p>I looked at the exception which was a normal .net exception. I could not think of a reason how it could cause crash. Then I looked into the call stack and saw the below line.<br /> 000007f9`8538bb27 : 0000001b`9c29cf80 0000001c`2c50c880 0000001c`2c50c888 0000001c`2c50c890 : <strong>mscorlib_ni!System.Environment.Exit</strong>(Int32)+0x7b</p>
<p>That was really weird. Please check my other blog to see the end result.</p>
<p><strong><a href="https://paullou.com/2015/12/22/debugging-a-weird-process-crash-issue/">https://paullou.com/2015/12/22/debugging-a-weird-process-crash-issue/</a></strong></p>]]></content:encoded>
    </item>
    <item>
      <title>StackOverflow Exception, Long time no see</title>
      <link>https://docs.microsoft.com/archive/blogs/paullou/stackoverflow-exception-long-time-no-see</link>
      <pubDate>Fri, 30 Oct 2015 15:24:37 GMT</pubDate>
      <dc:creator><![CDATA[Paul Lou]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/paullou/2015/10/30/stackoverflow-exception-long-time-no-see/</guid>
      <description><![CDATA[I have not seen a stackoverflow exception for a long time. Today I happened to bump into one in...]]></description>
      <content:encoded><![CDATA[<p>I have not seen a stackoverflow exception for a long time. Today I happened to bump into one in random test code. I will explain how it happened. What the code is used for and why it was written this way are not interesting to me and are not in the scope of this post.</p>
<div id="highlighter_946013" class="syntaxhighlighter  csharp">
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="gutter">
<div class="line number1 index0 alt2">1</div>
<div class="line number2 index1 alt1">2</div>
<div class="line number3 index2 alt2">3</div>
<div class="line number4 index3 alt1">4</div>
<div class="line number5 index4 alt2">5</div>
<div class="line number6 index5 alt1">6</div>
<div class="line number7 index6 alt2">7</div>
<div class="line number8 index7 alt1">8</div>
<div class="line number9 index8 alt2">9</div>
<div class="line number10 index9 alt1">10</div>
<div class="line number11 index10 alt2">11</div>
<div class="line number12 index11 alt1">12</div>
<div class="line number13 index12 alt2">13</div>
<div class="line number14 index13 alt1">14</div>
<div class="line number15 index14 alt2">15</div>
<div class="line number16 index15 alt1">16</div>
<div class="line number17 index16 alt2">17</div>
<div class="line number18 index17 alt1">18</div>
<div class="line number19 index18 alt2">19</div>
<div class="line number20 index19 alt1">20</div>
<div class="line number21 index20 alt2">21</div>
<div class="line number22 index21 alt1">22</div>
<div class="line number23 index22 alt2">23</div>
<div class="line number24 index23 alt1">24</div>
<div class="line number25 index24 alt2">25</div>
<div class="line number26 index25 alt1">26</div>
<div class="line number27 index26 alt2">27</div>
<div class="line number28 index27 alt1">28</div>
</td>
<td class="code">
<div class="container">
<div class="line number1 index0 alt2"><code class="csharp keyword">public</code> <code class="csharp keyword">class</code> <code class="csharp plain">ChildClass : BaseClass</code></div>
<div class="line number2 index1 alt1"><code class="csharp plain">{</code></div>
<div class="line number3 index2 alt2"><code class="csharp spaces">&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="csharp keyword">protected</code> <code class="csharp keyword">override</code> <code class="csharp keyword">void</code> <code class="csharp plain">Dispose(</code><code class="csharp keyword">bool</code> <code class="csharp plain">disposing)</code></div>
<div class="line number4 index3 alt1"><code class="csharp spaces">&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="csharp plain">{</code></div>
<div class="line number5 index4 alt2"><code class="csharp spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="csharp keyword">if</code> <code class="csharp plain">(disposing)</code></div>
<div class="line number6 index5 alt1"><code class="csharp spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="csharp plain">{</code></div>
<div class="line number7 index6 alt2"><code class="csharp spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="csharp keyword">base</code><code class="csharp plain">.Dispose();</code></div>
<div class="line number8 index7 alt1"><code class="csharp spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="csharp comments">//DO something</code></div>
<div class="line number9 index8 alt2"><code class="csharp spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="csharp plain">}</code></div>
<div class="line number10 index9 alt1"><code class="csharp spaces">&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="csharp plain">}</code></div>
<div class="line number11 index10 alt2"><code class="csharp plain">}</code></div>
<div class="line number12 index11 alt1">&nbsp;</div>
<div class="line number13 index12 alt2"><code class="csharp keyword">public</code> <code class="csharp keyword">class</code> <code class="csharp plain">BaseClass</code></div>
<div class="line number14 index13 alt1"><code class="csharp plain">{</code></div>
<div class="line number15 index14 alt2"><code class="csharp spaces">&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="csharp keyword">public</code> <code class="csharp keyword">void</code> <code class="csharp plain">Dispose()</code></div>
<div class="line number16 index15 alt1"><code class="csharp spaces">&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="csharp plain">{</code></div>
<div class="line number17 index16 alt2"><code class="csharp spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="csharp plain">Dispose(</code><code class="csharp keyword">true</code><code class="csharp plain">);</code></div>
<div class="line number18 index17 alt1"><code class="csharp spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="csharp plain">GC.SuppressFinalize(</code><code class="csharp keyword">this</code><code class="csharp plain">);</code></div>
<div class="line number19 index18 alt2"><code class="csharp spaces">&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="csharp plain">}</code></div>
<div class="line number20 index19 alt1">&nbsp;</div>
<div class="line number21 index20 alt2"><code class="csharp spaces">&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="csharp keyword">protected</code> <code class="csharp keyword">virtual</code> <code class="csharp keyword">void</code> <code class="csharp plain">Dispose(</code><code class="csharp keyword">bool</code> <code class="csharp plain">disposing)</code></div>
<div class="line number22 index21 alt1"><code class="csharp spaces">&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="csharp plain">{</code></div>
<div class="line number23 index22 alt2"><code class="csharp spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="csharp keyword">if</code> <code class="csharp plain">(disposing)</code></div>
<div class="line number24 index23 alt1"><code class="csharp spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="csharp plain">{</code></div>
<div class="line number25 index24 alt2"><code class="csharp spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="csharp comments">//DO something</code></div>
<div class="line number26 index25 alt1"><code class="csharp spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="csharp plain">}</code></div>
<div class="line number27 index26 alt2"><code class="csharp spaces">&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="csharp plain">}</code></div>
<div class="line number28 index27 alt1"><code class="csharp plain">}</code></div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<p>Please read more at <a href="https://paullou.com/2015/10/28/stackoverflow-exception-long-time-no-see/">https://paullou.com/2015/10/28/stackoverflow-exception-long-time-no-see/</a></p>
<div>
<div id="highlighter_946013" class="syntaxhighlighter  csharp">&nbsp;</div>
</div>]]></content:encoded>
    </item>
    <item>
      <title>Persistent MAC Address in Cloud (Microsoft Azure /Amazon AWS / Google GCP / OpenStack)</title>
      <link>https://docs.microsoft.com/archive/blogs/paullou/persistent-mac-address-in-cloud-microsoft-azure-amazon-aws-google-gcp-openstack</link>
      <pubDate>Wed, 28 Oct 2015 13:27:53 GMT</pubDate>
      <dc:creator><![CDATA[Paul Lou]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/paullou/2015/10/28/persistent-mac-address-in-cloud-microsoft-azure-amazon-aws-google-gcp-openstack/</guid>
      <description><![CDATA[What is a NIC? It is the network adaptor on your machine. MAC address is the physical address of the...]]></description>
      <content:encoded><![CDATA[<p style="font: 300 18px/27px 'Source Sans Pro', Helvetica, Arial, sans-serif; margin: 0px 0px 27px; padding: 0px; outline: 0px; border: 0px currentColor; color: #656e7f; text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; vertical-align: baseline; white-space: normal; box-sizing: border-box; widows: 1; font-size-adjust: none; font-stretch: normal; background-color: #ffffff; -webkit-text-stroke-width: 0px;">What is a NIC? It is the network adaptor on your machine. MAC address is the physical address of the adaptor. You can consider it as fixed on your machine for this discussion. However the NIC you get on a VM in cloud is a virtualized one. If you delete a VM and create a new one you will probably get a new MAC address. Why do we need a persistent MAC address? Many licensed software rely on MAC for the licenses. If you want to move licenses from one VM to another persistent MAC address becomes very useful.</p>
<p style="font: 300 18px/27px 'Source Sans Pro', Helvetica, Arial, sans-serif; margin: 0px 0px 27px; padding: 0px; outline: 0px; border: 0px currentColor; color: #656e7f; text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; vertical-align: baseline; white-space: normal; box-sizing: border-box; widows: 1; font-size-adjust: none; font-stretch: normal; background-color: #ffffff; -webkit-text-stroke-width: 0px;">It looks like a small feature. Let&rsquo;s look at a few major cloud provides to see how they deal with this.</p>
<p style="font: 300 18px/27px 'Source Sans Pro', Helvetica, Arial, sans-serif; margin: 0px 0px 27px; padding: 0px; outline: 0px; border: 0px currentColor; color: #656e7f; text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; vertical-align: baseline; white-space: normal; box-sizing: border-box; widows: 1; font-size-adjust: none; font-stretch: normal; background-color: #ffffff; -webkit-text-stroke-width: 0px;"><strong style="margin: 0px; padding: 0px; outline: 0px; border: 0px currentColor; font-family: inherit; font-size: 18px; font-style: inherit; font-weight: bold; vertical-align: baseline; box-sizing: border-box;">Microsoft Azure</strong><br style="box-sizing: border-box;" />NIC<span class="Apple-converted-space">&nbsp;</span><a style="margin: 0px; padding: 0px; outline: 0px; border: 0px currentColor; color: #f45145; font-family: inherit; font-size: 18px; font-style: inherit; font-weight: inherit; text-decoration: none; vertical-align: baseline; box-sizing: border-box; transition: all 0.2s ease-in-out;" href="https://azure.microsoft.com/en-us/documentation/articles/resource-groups-networking/#nic" rel="nofollow">https://azure.microsoft.com/en-us/documentation/articles/resource-groups-networking/#nic</a></p>
<p style="font: 300 18px/27px 'Source Sans Pro', Helvetica, Arial, sans-serif; margin: 0px 0px 27px; padding: 0px; outline: 0px; border: 0px currentColor; color: #656e7f; text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; vertical-align: baseline; white-space: normal; box-sizing: border-box; widows: 1; font-size-adjust: none; font-stretch: normal; background-color: #ffffff; -webkit-text-stroke-width: 0px;">It is not available yet. According to the post it is already planned.<br style="box-sizing: border-box;" /><a style="margin: 0px; padding: 0px; outline: 0px; border: 0px currentColor; color: #f45145; font-family: inherit; font-size: 18px; font-style: inherit; font-weight: inherit; text-decoration: none; vertical-align: baseline; box-sizing: border-box; transition: all 0.2s ease-in-out;" href="https://feedback.azure.com/forums/216843-virtual-machines/suggestions/5217933-static-mac-address" rel="nofollow">https://feedback.azure.com/forums/216843-virtual-machines/suggestions/5217933-static-mac-address</a></p>
<p style="font: 300 18px/27px 'Source Sans Pro', Helvetica, Arial, sans-serif; margin: 0px 0px 27px; padding: 0px; outline: 0px; border: 0px currentColor; color: #656e7f; text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; vertical-align: baseline; white-space: normal; box-sizing: border-box; widows: 1; font-size-adjust: none; font-stretch: normal; background-color: #ffffff; -webkit-text-stroke-width: 0px;"><strong style="margin: 0px; padding: 0px; outline: 0px; border: 0px currentColor; font-family: inherit; font-size: 18px; font-style: inherit; font-weight: bold; vertical-align: baseline; box-sizing: border-box;">Amazon AWS</strong><br style="box-sizing: border-box;" />It is already supported. The below statement is from the official AWS documentation.<br style="box-sizing: border-box;" />The interface maintains its private IP addresses, Elastic IP addresses, and MAC address.<br style="box-sizing: border-box;" /><a style="margin: 0px; padding: 0px; outline: 0px; border: 0px currentColor; color: #f45145; font-family: inherit; font-size: 18px; font-style: inherit; font-weight: inherit; text-decoration: none; vertical-align: baseline; box-sizing: border-box; transition: all 0.2s ease-in-out;" href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-eni.html" rel="nofollow">https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-eni.html</a></p>
<p style="font: 300 18px/27px 'Source Sans Pro', Helvetica, Arial, sans-serif; margin: 0px 0px 27px; padding: 0px; outline: 0px; border: 0px currentColor; color: #656e7f; text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; vertical-align: baseline; white-space: normal; box-sizing: border-box; widows: 1; font-size-adjust: none; font-stretch: normal; background-color: #ffffff; -webkit-text-stroke-width: 0px;">When did AWS start supporting this? I have no idea. From this post it was not supported yet in 3/2011 but it was supported in 2/2012.<a style="margin: 0px; padding: 0px; outline: 0px; border: 0px currentColor; color: #f45145; font-family: inherit; font-size: 18px; font-style: inherit; font-weight: inherit; text-decoration: none; vertical-align: baseline; box-sizing: border-box; transition: all 0.2s ease-in-out;" href="https://forums.aws.amazon.com/thread.jspa?messageID=107448&amp;amp" rel="nofollow">https://forums.aws.amazon.com/thread.jspa?</a></p>
<p style="font: 300 18px/27px 'Source Sans Pro', Helvetica, Arial, sans-serif; margin: 0px 0px 27px; padding: 0px; outline: 0px; border: 0px currentColor; color: #656e7f; text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; vertical-align: baseline; white-space: normal; box-sizing: border-box; widows: 1; font-size-adjust: none; font-stretch: normal; background-color: #ffffff; -webkit-text-stroke-width: 0px;">Please continue to read at <a href="https://paullou.com/2015/10/11/persistent-mac-address-in-cloud-microsoft-azure-amazon-aws-google-gcp-openstack/">https://paullou.com/2015/10/11/persistent-mac-address-in-cloud-microsoft-azure-amazon-aws-google-gcp-openstack/</a></p>
<p style="font: 300 18px/27px 'Source Sans Pro', Helvetica, Arial, sans-serif; margin: 0px 0px 27px; padding: 0px; outline: 0px; border: 0px currentColor; color: #656e7f; text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; vertical-align: baseline; white-space: normal; box-sizing: border-box; widows: 1; font-size-adjust: none; font-stretch: normal; background-color: #ffffff; -webkit-text-stroke-width: 0px;">&nbsp;</p>]]></content:encoded>
    </item>
    <item>
      <title>Forgot password for your Azure VM?</title>
      <link>https://docs.microsoft.com/archive/blogs/paullou/forgot-password-for-your-azure-vm</link>
      <pubDate>Sun, 25 Jan 2015 18:45:26 GMT</pubDate>
      <dc:creator><![CDATA[Paul Lou]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/paullou/2015/01/25/forgot-password-for-your-azure-vm/</guid>
      <description><![CDATA[Unfortunately Azure Portal doesn&rsquo;t have this simple feature. The only solution I know is using...]]></description>
      <content:encoded><![CDATA[<p>Unfortunately Azure Portal doesn&rsquo;t have this simple feature. The only solution I know is using Azure Powershell Cmdlets. There are different articles talking about this. But they are not concise at all. To me I just need simple steps to reset password for one single VM. So here you go. Just &ldquo;8 simple steps&rdquo; you can get your VM back.</p>
<p>Read on&nbsp;<a href="https://paullou.com/">https://paullou.com/</a> for the steps.</p>]]></content:encoded>
    </item>
    <item>
      <title>Two very useful small tools in Windows</title>
      <link>https://docs.microsoft.com/archive/blogs/paullou/two-very-useful-small-tools-in-windows</link>
      <pubDate>Fri, 29 Aug 2014 18:36:27 GMT</pubDate>
      <dc:creator><![CDATA[Paul Lou]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/paullou/2014/08/29/two-very-useful-small-tools-in-windows/</guid>
      <description><![CDATA[There are two small tools in Windows which saved my day multiple times. I didn't bother to write a...]]></description>
      <content:encoded><![CDATA[<p>There are two small tools in Windows which saved my day multiple times. I didn't bother to write a blog post since I thought that it was not worth it but the two tools got me out of a big problem today (again). To appreciate the two tools I decided to write it down briefly.</p>
<p>With any further ado let me introduce them as below. The nice thing is that they are in the box.<br />Takeown.exe&nbsp; - take ownership of files/directories<br />Cacls.exe - change ACLs of files/directories</p>
<p><strong>My case today</strong><br />My system hanged when I did a certain operation which unfortunately I need to do regularly. This was very annoying since I couldn't work effectively. To fix it I need to copy a system file to a system folder. This is not an easy operation. You will get access denied by default.&nbsp; If you don't believe it open the folder c:\windows\winsxs (replace c: with your system drive)&nbsp; try to create a new file/folder or delete anything or copy anything there.</p>
<p>What I did is very simple. I just ran the below command to take control of that folder and copied the file there. Then I could solve the problem. <br />takeown /f [foldername]<br />cacls [foldername] /G [username]:F</p>
<p>If you run into any problem related to access denied when doing any file/directory access operation feel free to give these two cute tools a try. It won't disappoint you.</p>]]></content:encoded>
    </item>
    <item>
      <title>A design pattern for caching – two tier caching with strong consistency between servers</title>
      <link>https://docs.microsoft.com/archive/blogs/paullou/a-design-pattern-for-caching-two-tier-caching-with-strong-consistency-between-servers</link>
      <pubDate>Thu, 03 Jul 2014 16:50:27 GMT</pubDate>
      <dc:creator><![CDATA[Paul Lou]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/paullou/2014/07/03/a-design-pattern-for-caching-two-tier-caching-with-strong-consistency-between-servers/</guid>
      <description><![CDATA[This is a very interesting and useful pattern in practice. I haven&rsquo;t seen any books for...]]></description>
      <content:encoded><![CDATA[<p>This is a very interesting and useful pattern in practice. I haven&rsquo;t seen any books for classic patterns to talk about this. But I think that it should be a classic one for caching. To make it clear I think that it is an old pattern. I do not invent it and I do not discover it. I designed the solution for our problem then I realized that it should be a pattern. I just want to write it down since I didn&rsquo;t know it is a pattern before designing the solution and the pattern is useful in real world.</p>
<p><strong>Problem</strong></p>
<ul>
<li>You have a not scalable data source which has relatively stable data (e.g. config or metadata) but the data does change.</li>
<li>You have many servers (front ends and backends) to access that data. Since the data source is not scalable you need caching.</li>
<li>You want strong consistency between the servers. i.e. when one server sees a new version of data all other servers need to see the new version or newer version(s). Simple put it is shared caching.</li>
</ul>
<p>&nbsp;</p>
<p>Please read the full text at <a href="https://paullou.com/2014/07/03/a-design-pattern-for-caching-two-tier-caching-with-strong-consistency-between-servers-2/">https://paullou.com/2014/07/03/a-design-pattern-for-caching-two-tier-caching-with-strong-consistency-between-servers-2/</a></p>]]></content:encoded>
    </item>
    <item>
      <title>Unable to retrieve metadata for ''. Ambiguous match found</title>
      <link>https://docs.microsoft.com/archive/blogs/paullou/unable-to-retrieve-metadata-for-ambiguous-match-found</link>
      <pubDate>Tue, 24 Jun 2014 15:37:00 GMT</pubDate>
      <dc:creator><![CDATA[Paul Lou]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/paullou/2014/06/24/unable-to-retrieve-metadata-for-ambiguous-match-found/</guid>
      <description><![CDATA[Right now I am working with Visual Studio 2013,&nbsp; ASP.NET MVC 5.0 and Entity Framework 6.1.1....]]></description>
      <content:encoded><![CDATA[<p>Right now I am working with Visual Studio 2013,&nbsp; ASP.NET MVC 5.0 and Entity Framework 6.1.1. One of the things I like about Visual Studio is the ability to generate scaffolded items. e.g. if I want to manage student records I just need to create a c# class named Student and Visual Studio can generate all the CRUD views and controller actions for me. This will save a lot of time and trouble for me.</p>
<p>However things might not always work as expected. I used this code generation feature quite a few times and it worked like a charm. But today it just didn't work. I got the below error. <br />There was an error running the selected code generator:<br />&lsquo;Unable to retrieve metadata for &lsquo;HomeHome Models. ServiceproviderReview&rsquo;. Ambiguous match found&rsquo;</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/39/50/3441.error_dialog.PNG" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-39-50/3441.error_5F00_dialog.PNG"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/39/50/3441.error_dialog.PNG" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-39-50/3441.error_5F00_dialog.PNG" alt="" width="331" height="145" border="0" /></a></p>
<p>I did some research and tried the below things.<br />&nbsp;1. Examine all the fields and properties to make sure that they don't have the same names with different casing<br />&nbsp;2. Comment out most properties and keep only two properties (int:Id and string:Name)<br />&nbsp;3. Rename the model, re-compile, regenerate the database<br />&nbsp;4. Uninstall entity framework 6.1.1 and install 6.0.0<br />&nbsp;5. Close visual studio and start again<br />&nbsp;6. Clean the solution and rebuild<br />&nbsp;7. Create another simple model class to just see what's going on</p>
<p>Unfortunately all of them did not work! In the end I was so frustrated after a couple of hours of trying all kind of things. I was almost going to restart my dev machine.&nbsp; Then I decided to do one last attempt by creating a new DbContext. To my surprise it worked! I think that there must be some bug with Visual Studio / Entity Framework. After that&nbsp;I removed the new DbContext &amp; the new connection string in web.config and switched to use the old DbContext. I was happy to see it still worked.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/39/50/6874.new_dbcontext.PNG" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-39-50/6874.new_5F00_dbcontext.PNG"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/39/50/6874.new_dbcontext.PNG" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-39-50/6874.new_5F00_dbcontext.PNG" alt="" border="0" /></a></p>]]></content:encoded>
    </item>
    <item>
      <title>Column '' in table ''  is of a type that is invalid for use as a key column in an index</title>
      <link>https://docs.microsoft.com/archive/blogs/paullou/column-in-table-is-of-a-type-that-is-invalid-for-use-as-a-key-column-in-an-index</link>
      <pubDate>Sat, 21 Jun 2014 12:36:35 GMT</pubDate>
      <dc:creator><![CDATA[Paul Lou]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/paullou/2014/06/21/column-in-table-is-of-a-type-that-is-invalid-for-use-as-a-key-column-in-an-index/</guid>
      <description><![CDATA[I decided to change my blogging style a little bit. Instead of writing lengthy blog posts in a more...]]></description>
      <content:encoded><![CDATA[<p>I decided to change my blogging style a little bit. Instead of writing lengthy blog posts in a more systematic way I want to write things about all the different kinds of issue I got when building stuff and learning new things. I am very experienced in some areas but new on many more areas so the issues I got might be very basic and simple. I think that it is useful to just record it for myself and also for other people since they might get into the same situation.</p>
<p>I just started using entity framework 6.1.1 and tried to define an index on a column called ZipCode as below but I got the below error when doing 'Update-Database' by using code first migrations.</p>
<pre class="scroll"><code class="csharp">public string ZipCode { get; set; }</code></pre>
<p><span style="color: #ff0000;">Column 'ZipCode' in table 'dbo.ServiceProviders' is of a type that is invalid for use as a key column in an index.</span></p>
<p>It turned out that it is a simple issue. The max length for an index column is 900 bytes. The fix is as simple as below.</p>
<pre class="scroll"><code class="csharp"> [MaxLength(20)]<br /> public string ZipCode { get; set; }<br /> </code></pre>]]></content:encoded>
    </item>
    <item>
      <title>Adding an index on a column in entity framework</title>
      <link>https://docs.microsoft.com/archive/blogs/paullou/adding-an-index-on-a-column-in-entity-framework</link>
      <pubDate>Fri, 20 Jun 2014 22:22:00 GMT</pubDate>
      <dc:creator><![CDATA[Paul Lou]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/paullou/2014/06/20/adding-an-index-on-a-column-in-entity-framework/</guid>
      <description><![CDATA[Adding an index column in entity framework was not easy until entity framework 6.1. Today...]]></description>
      <content:encoded><![CDATA[<p>Adding an index column in entity framework was not easy until entity framework 6.1. Today (6/20/2014) the entity frame 6.1.1 got released officially. I just downloaded through nuget package manager in visual studio 2013 and liked the simplicity of doing this job.&nbsp; &nbsp;I am surprised that the EF6.1.1 has been downloaded so many times on the first day. it shows how popular it is.</p>
<pre class="scroll"><code class="csharp"> [IndexAttribute]<br /> public string ZipCode { get; set; }</code>&nbsp;&nbsp;</pre>
<p><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/39/50/5086.EF6.1.1.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-39-50/5086.EF6.1.1.png" alt="" border="0" /></p>]]></content:encoded>
    </item>
  </channel>
</rss>