<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>Support Engineer Days Online</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/omnia/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/omnia/feed.xml</link>
    <description>Web Developper Support Engineer thoughts online.</description>
    <lastBuildDate>Wed, 17 Apr 2019 04:05:37 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>W3wp High CPU Usage Scenario</title>
      <link>https://docs.microsoft.com/archive/blogs/omnia/w3wp-high-cpu-usage-scenario</link>
      <pubDate>Sun, 31 May 2015 02:26:17 GMT</pubDate>
      <dc:creator><![CDATA[omniao]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/omnia/2015/05/31/w3wp-high-cpu-usage-scenario/</guid>
      <description><![CDATA[I was working on one of my customers high CPU dumps for w3wp and the reason was synchronizing access...]]></description>
      <content:encoded><![CDATA[<p>I was working on one of my customers high CPU dumps for w3wp and the reason was synchronizing access to static collections Generic.Dictionary</p>
<p>Here is you start checking Dumps&nbsp;</p>
<p>&nbsp;</p>
<p><em><strong>!threadpool</strong></em></p>
<p><span style="background-color: #ffff00;"><em><strong>CPU utilization: 100%</strong></em></span></p>
<p><em><strong>Worker Thread: Total: 32 Running: 32 Idle: 0 MaxLimit: 800 MinLimit: 8</strong></em></p>
<p><em><strong>Work Request in Queue: 886</strong></em></p>
<p>&nbsp;</p>
<p><em><strong>!cpuid</strong></em></p>
<p><em><strong>CP&nbsp; F/M/S&nbsp; Manufacturer&nbsp;&nbsp;&nbsp;&nbsp; MHz</strong></em></p>
<p><em><strong>0&nbsp; 6,7,6&nbsp; &lt;unavailable&gt;&nbsp;&nbsp; 2490</strong></em></p>
<p><em><strong>1&nbsp; 6,7,6&nbsp; &lt;unavailable&gt;&nbsp;&nbsp; 2490</strong></em></p>
<p><em><strong>2&nbsp; 6,7,6&nbsp; &lt;unavailable&gt;&nbsp;&nbsp; 2490</strong></em></p>
<p><em><strong>3&nbsp; 6,7,6&nbsp; &lt;unavailable&gt;&nbsp;&nbsp; 2490</strong></em></p>
<p><em><strong>4&nbsp; 6,7,6&nbsp; &lt;unavailable&gt;&nbsp;&nbsp; 2490</strong></em></p>
<p><em><strong>5&nbsp; 6,7,6&nbsp; &lt;unavailable&gt;&nbsp;&nbsp; 2490</strong></em></p>
<p><em><strong>6&nbsp; 6,7,6&nbsp; &lt;unavailable&gt;&nbsp;&nbsp; 2490</strong></em></p>
<p><em><strong>7&nbsp; 6,7,6&nbsp; &lt;unavailable&gt;&nbsp;&nbsp; 2490</strong></em></p>
<p>&nbsp;</p>
<p><em><strong>.time</strong></em></p>
<p><em><strong>Debug session time: Tue Jan 14 10:35:53.000 2014 (UTC + 2:00)</strong></em></p>
<p><em><strong>System Uptime: 26 days 19:17:15.503</strong></em></p>
<p><em><strong>Process Uptime: 0 days 0:08:32.000</strong></em></p>
<p><em><strong>&nbsp; Kernel time: 0 days 0:00:01.000</strong></em></p>
<p><em><strong>&nbsp; User time: 0 days 1:05:16.000</strong></em></p>
<p>&nbsp;</p>
<p>This is whole system cpu usage is 100% and 886 Request waiting in Queue</p>
<p>&nbsp;</p>
<p>Total cpu time is number of CPUs* Process Uptime = 8 cpu x 0:08:32.000 = 1:8:26&nbsp; ~68 min</p>
<p>&nbsp;</p>
<p>We have 8 CPUs in total, so the process have 8 x &nbsp;0:08:32.000 CPU total time which is 1:08:26. It means that, during the lifetime of the process, most of the CPU time is spent on user mode, which is 1:05:16.000/ 1:08:26 = ~95%.</p>
<p>&nbsp;</p>
<p># The cpu time of &nbsp;same threads are increasing over 3 dumps.</p>
<p>The CPU time taken for each thread:</p>
<p>&nbsp;</p>
<p><span style="text-decoration: underline; font-size: small;"><strong><em><span style="background-color: #ffff00;">Dump1</span>:</em></strong></span></p>
<p><strong><em><span style="font-size: x-small;">!runaway</span></em></strong></p>
<p><strong><em><span style="font-size: x-small;">User Mode Time</span></em></strong></p>
<p><strong><em><span style="font-size: x-small;">&nbsp; Thread&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Time</span></em></strong></p>
<p><strong><em><span style="font-size: x-small;">&nbsp; 39:319c&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0 days 0:04:02.987</span></em></strong></p>
<p><strong><em><span style="font-size: x-small;">&nbsp; 32:30b4&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0 days 0:03:24.657</span></em></strong></p>
<p><strong><em><span style="font-size: x-small;">&nbsp; 37:2ffc&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0 days 0:03:21.397</span></em></strong></p>
<p><strong><em><span style="font-size: x-small;">&nbsp; 31:32f8&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0 days 0:03:19.322</span></em></strong></p>
<p><strong><em><span style="font-size: x-small;">&nbsp; 36:3120&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0 days 0:03:13.238</span></em></strong></p>
<p><strong><em><span style="font-size: x-small;">&nbsp; 33:2330&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0 days 0:03:11.460</span></em></strong></p>
<p><strong><em><span style="font-size: x-small;">&nbsp; 41:900&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0 days 0:03:03.987</span></em></strong></p>
<p><strong><em><span style="font-size: x-small;">Thread CPU Time= 0:19:37.48</span></em></strong></p>
<p>&nbsp;</p>
<p><span style="text-decoration: underline; background-color: #ffff00;"><span style="font-size: small;"><strong><em>Dump2:</em></strong></span></span></p>
<p><strong><em><span style="font-size: x-small;">Thread&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Time</span></em></strong></p>
<p><strong><em><span style="font-size: x-small;">&nbsp; 38:319c&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0 days 0:04:17.292</span></em></strong></p>
<p><strong><em><span style="font-size: x-small;">&nbsp; 31:30b4&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0 days 0:03:34.984</span></em></strong></p>
<p><strong><em><span style="font-size: x-small;">&nbsp; 36:2ffc&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0 days 0:03:33.752</span></em></strong></p>
<p><strong><em><span style="font-size: x-small;">&nbsp; 30:32f8&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0 days 0:03:29.821</span></em></strong></p>
<p><strong><em><span style="font-size: x-small;">&nbsp; 35:3120&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0 days 0:03:23.019</span></em></strong></p>
<p><strong><em><span style="font-size: x-small;">&nbsp; 32:2330&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0 days 0:03:21.038</span></em></strong></p>
<p><strong><em><span style="font-size: x-small;">&nbsp; 40:900&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0 days 0:03:14.814</span></em></strong></p>
<p><strong><em><span style="font-size: x-small;">Thread CPU Time= 0:21:4.75</span></em></strong></p>
<p>&nbsp;</p>
<p><span style="font-size: small; background-color: #ffff00;"><strong><em>Dump3:</em></strong></span></p>
<p><strong><em><span style="font-size: x-small;">&nbsp;Thread&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Time</span></em></strong></p>
<p><strong><em><span style="font-size: x-small;">&nbsp; 38:319c&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0 days 0:04:26.855</span></em></strong></p>
<p><strong><em><span style="font-size: x-small;">&nbsp; 31:30b4&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0 days 0:03:44.844</span></em></strong></p>
<p><strong><em><span style="font-size: x-small;">&nbsp; 36:2ffc&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0 days 0:03:43.331</span></em></strong></p>
<p><strong><em><span style="font-size: x-small;">&nbsp; 30:32f8&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0 days 0:03:37.714</span></em></strong></p>
<p><strong><em><span style="font-size: x-small;">&nbsp; 35:3120&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0 days 0:03:32.629</span></em></strong></p>
<p><strong><em><span style="font-size: x-small;">&nbsp; 32:2330&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0 days 0:03:30.055</span></em></strong></p>
<p><strong><em><span style="font-size: x-small;">&nbsp; 40:900&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0 days 0:03:24.142</span></em></strong></p>
<p><strong><em><span style="font-size: x-small;">Thread CPU Time= 0:22:4.5</span></em></strong></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>Long Running Threads Details</p>
<p>&nbsp;</p>
<p>So these are the threads increasing CPU Time. From Dump1, the threads are 39,32,37,31,36,33,41 they are all ThreadpoolWorker thredas.</p>
<p>&nbsp;</p>
<p>&nbsp;&nbsp;<em><strong>&nbsp;&nbsp;&nbsp; OSID&nbsp;&nbsp;&nbsp;&nbsp; Special thread type</strong></em></p>
<p><em><strong>&nbsp;&nbsp; 15&nbsp;&nbsp; 4b54&nbsp;&nbsp;&nbsp; Gate</strong></em></p>
<p><em><strong>&nbsp;&nbsp;&nbsp;16&nbsp;&nbsp; 1f40&nbsp;&nbsp;&nbsp; DbgHelper</strong></em></p>
<p><em><strong>&nbsp;&nbsp;&nbsp;17&nbsp;&nbsp; 4da8&nbsp;&nbsp;&nbsp; GC</strong></em></p>
<p><em><strong>&nbsp;&nbsp;&nbsp;18&nbsp;&nbsp;&nbsp; 4dc&nbsp;&nbsp;&nbsp; GC</strong></em></p>
<p><em><strong>&nbsp;&nbsp;&nbsp;19&nbsp;&nbsp; 2170&nbsp;&nbsp;&nbsp; GC</strong></em></p>
<p><em><strong>&nbsp;&nbsp;&nbsp;20&nbsp;&nbsp; 211c&nbsp;&nbsp;&nbsp; GC</strong></em></p>
<p><em><strong>&nbsp;&nbsp;&nbsp;21&nbsp;&nbsp; 4624&nbsp;&nbsp;&nbsp; GC</strong></em></p>
<p><em><strong>&nbsp;&nbsp;&nbsp;22&nbsp;&nbsp; 1640&nbsp;&nbsp;&nbsp; GC</strong></em></p>
<p><em><strong>&nbsp;&nbsp;&nbsp;23&nbsp;&nbsp; 3bc8&nbsp;&nbsp;&nbsp; GC</strong></em></p>
<p><em><strong>&nbsp;&nbsp;&nbsp;24&nbsp;&nbsp; 42c4&nbsp;&nbsp;&nbsp; GC</strong></em></p>
<p><em><strong>&nbsp;&nbsp;&nbsp;25&nbsp;&nbsp; 31c0&nbsp;&nbsp;&nbsp; Finalizer</strong></em></p>
<p><em><strong>&nbsp;&nbsp;&nbsp;26&nbsp;&nbsp; 477c&nbsp;&nbsp;&nbsp; IOCompletion</strong></em></p>
<p><em><strong>&nbsp;&nbsp;&nbsp;27&nbsp;&nbsp; 1c30&nbsp;&nbsp;&nbsp; ProfilingAPIAttach</strong></em></p>
<p><em><strong>&nbsp;&nbsp;&nbsp;28&nbsp;&nbsp; 3a9c&nbsp;&nbsp;&nbsp; IOCompletion</strong></em></p>
<p><em><strong>&nbsp;&nbsp;&nbsp;29&nbsp;&nbsp; 277c&nbsp;&nbsp;&nbsp; Timer</strong></em></p>
<p><em><strong>&nbsp;&nbsp;&nbsp;30&nbsp;&nbsp; 4c38&nbsp;&nbsp;&nbsp; ADUnloadHelper</strong></em></p>
<p><em><strong>&nbsp;&nbsp;&nbsp;31&nbsp;&nbsp; 32f8&nbsp;&nbsp;&nbsp; ThreadpoolWorker</strong></em></p>
<p><span style="background-color: #ffff00;"><em><strong>&nbsp;&nbsp;&nbsp;32&nbsp;&nbsp; 30b4&nbsp;&nbsp;&nbsp; ThreadpoolWorker</strong></em></span></p>
<p><span style="background-color: #ffff00;"><em><strong>&nbsp;&nbsp;&nbsp;33&nbsp;&nbsp; 2330&nbsp;&nbsp;&nbsp; ThreadpoolWorker</strong></em></span></p>
<p><span style="background-color: #ffff00;"><em><strong>&nbsp;&nbsp;&nbsp;34&nbsp;&nbsp; 4c84&nbsp;&nbsp;&nbsp; ThreadpoolWorker</strong></em></span></p>
<p><span style="background-color: #ffff00;"><em><strong>&nbsp;&nbsp;&nbsp;35&nbsp;&nbsp; 1de8&nbsp;&nbsp;&nbsp; ThreadpoolWorker</strong></em></span></p>
<p><span style="background-color: #ffff00;"><em><strong>&nbsp;&nbsp;&nbsp;36&nbsp;&nbsp; 3120&nbsp;&nbsp;&nbsp; ThreadpoolWorker</strong></em></span></p>
<p><span style="background-color: #ffff00;"><em><strong>&nbsp;&nbsp;&nbsp;37&nbsp;&nbsp; 2ffc&nbsp;&nbsp;&nbsp; ThreadpoolWorker</strong></em></span></p>
<p><span style="background-color: #ffff00;"><em><strong>&nbsp;&nbsp;&nbsp;38&nbsp;&nbsp; 3e0c&nbsp;&nbsp;&nbsp; ThreadpoolWorker</strong></em></span></p>
<p><span style="background-color: #ffff00;"><em><strong>&nbsp;&nbsp;&nbsp;39&nbsp;&nbsp; 319c&nbsp;&nbsp;&nbsp; ThreadpoolWorker</strong></em></span></p>
<p><span style="background-color: #ffff00;"><em><strong>&nbsp;&nbsp;&nbsp;41&nbsp;&nbsp;&nbsp; 900&nbsp;&nbsp;&nbsp; ThreadpoolWorker</strong></em></span></p>
<p>&nbsp;</p>
<p>They are all running the web service &nbsp;AccessServer/AccessService.asmx each thread takes from&nbsp; 5 to 10 min &nbsp;and never complete</p>
<p><strong><em>!aspxpages</em></strong></p>
<p><strong><em>Going to dump the HttpContexts found in the heap.</em></strong></p>
<p><strong><em>HttpContext&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Timeout&nbsp;&nbsp;&nbsp; Completed&nbsp;&nbsp;&nbsp;&nbsp; Running&nbsp; ThreadId ReturnCode&nbsp;&nbsp; Verb RequestPath+QueryString</em></strong></p>
<p><strong><em>0x00000000ffa5bb68&nbsp;&nbsp;&nbsp;&nbsp; 3600 Sec&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; no&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background-color: #ffff00;"> 511 Sec&nbsp;</span>&nbsp;&nbsp;&nbsp;&nbsp; 31&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 200&nbsp;&nbsp; POST /AccessServer/AccessService.asmx</em></strong></p>
<p><strong><em>0x00000000ffaf5e98&nbsp;&nbsp;&nbsp;&nbsp; 3600 Sec&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; no&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="background-color: #ffff00;">508 Se</span>c&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 39&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 200&nbsp;&nbsp; POST /AccessServer/AccessService.asmx</em></strong></p>
<p><strong><em>0x00000000ffdd6328&nbsp;&nbsp;&nbsp;&nbsp; 3600 Sec&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; no&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 287 Sec&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 55&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 200&nbsp;&nbsp; POST /AccessServer/AccessService.asmx</em></strong></p>
<p><strong><em>0x00000000ffe0c3c8&nbsp;&nbsp;&nbsp;&nbsp; 3600 Sec&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; no&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 64 Sec&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 63&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 200&nbsp;&nbsp; POST /AccessServer/AccessService.asmx</em></strong></p>
<p><strong><em>0x000000011fb11358&nbsp;&nbsp;&nbsp;&nbsp; 3600 Sec&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; no&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="background-color: #ffff00;">511 Sec</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 33&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 200&nbsp;&nbsp; POST /AccessServer/AccessService.asmx</em></strong></p>
<p><strong><em>&hellip;&hellip;&hellip;&hellip;&hellip;&hellip;&hellip;&hellip;&hellip;&hellip;&hellip;&hellip;&hellip;</em></strong></p>
<p>&nbsp;</p>
<p>All threads are stuck on the same method&nbsp; .SessionFactoryImpl.Close() And Dictionary. Remove()</p>
<p><strong>0:039&gt; KL</strong></p>
<p><strong>Child-SP&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; RetAddr&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Call Site</strong></p>
<p><strong>00000000`06fece30 000007ff`0072bae1 <span style="background-color: #ffff00;">mscorlib_ni!System.Collections.Generic.Dictionary`2</span>[[System.__Canon, mscorlib],[System.__Canon, mscorlib]].Remove(System.__Canon)+0xf4</strong></p>
<p><strong>00000000`06feceb0 000007ff`0072c038 .SessionFactoryImpl.Close()+0x411</strong></p>
<p><strong>00000000`06fecf60 000007ff`001e70d2 AMWebService!AMWebService.BaseController.Dispose()+0x18</strong></p>
<p><strong>00000000`06fecf90 000007fe`f9fa10b4 AMWebService!AMWebService.AccessService.synchronize2(System.String)+0x102</strong></p>
<p><strong>00000000`06fed010 000007fe`f9fa11c9 clr!CallDescrWorker+0x84</strong></p>
<p><strong>00000000`06fed060 000007fe`f9fa1245 clr!CallDescrWorkerWithHandler+0xa9</strong></p>
<p><strong>00000000`06fed0e0 000007fe`fa167ef9 clr!MethodDesc::CallDescr+0x2a1</strong></p>
<p><strong>00000000`06fed320 000007fe`fa167dbf clr!CallWithValueTypes_RetArgSlotWrapper+0x91</strong></p>
<p><strong>00000000`06fed5b0 000007fe`fa167a74 clr!InvokeImpl+0x2e6</strong></p>
<p><strong>00000000`06feda40 000007fe`f8f7587f clr!RuntimeMethodHandle::InvokeMethodFast+0x1d8</strong></p>
<p>&nbsp;</p>
<p><span style="font-size: medium;"><strong>Conclusion</strong></span></p>
<p><span style="font-size: medium;"><strong>=========</strong></span></p>
<p>The Dictionary operation is being performed on a Generic Dictionary- Because Dictionary (and generic Dictionary) objects are not thread safe &nbsp;and if any update to a generic dictionary is not performed in a thread safe way, it will cause high CPU. Dictionary.Remove is an update operation.</p>
<p>&nbsp;</p>
<p>so please refer that back to dev team how they access the generic dictionary; this must be done in a thread safe way.</p>
<p>&nbsp;</p>
<p>Thread-Safe Collections <a href="http://msdn.microsoft.com/en-us/library/dd997305(v=vs.100).aspx">http://msdn.microsoft.com/en-us/library/dd997305(v=vs.100).aspx</a></p>
<p>&nbsp;</p>
<p>High CPU in .NET app using a static Generic.Dictionary <a href="http://blogs.msdn.com/b/tess/archive/2009/12/21/high-cpu-in-net-app-using-a-static-generic-dictionary.aspx">http://blogs.msdn.com/b/tess/archive/2009/12/21/high-cpu-in-net-app-using-a-static-generic-dictionary.aspx</a></p>
<p>&nbsp;</p>
<p><a href="http://msdn.microsoft.com/en-us/library/xfhwa508(VS.80).aspx">The MSDN documentation about Generic.Dictionary</a> has the following information about the thread safety of Dictionary objects&nbsp;</p>
<p>A Dictionary can support multiple readers concurrently, as long as the collection is not modified. Even so, enumerating through a collection is intrinsically not a thread-safe procedure. In the rare case where an enumeration contends with write accesses, the collection must be locked during the entire enumeration. To allow the collection to be accessed by multiple threads for reading and writing, you must implement your own synchronization.</p>
<p>What is happening here, and causing the high CPU is that the FindEntry method walks through the dictionary, trying to find the key.&nbsp; If multiple threads are doing this at the same time, especially if the dictionary is modified in the meantime you may end up in an infinite loop in FindEntry causing the high CPU behavior and the process may hang.</p>
<p>&nbsp;</p>
<p>Resolution:</p>
<p>Access Dictionary&nbsp; in Thread safe way. For example Use the "lock" statement inside your codes and anywhere else that uses non-thread-safe objects.</p>
<p>Hashtable and Dictionary thread safety considerations <a href="http://blogs.msdn.com/kimhamil/archive/2008/03/08/hashtable-and-dictionary-thread-safety-considerations.aspx">http://blogs.msdn.com/kimhamil/archive/2008/03/08/hashtable-and-dictionary-thread-safety-considerations.aspx</a></p>]]></content:encoded>
    </item>
    <item>
      <title>Azure Managed Cache Service Sample Solution.</title>
      <link>https://docs.microsoft.com/archive/blogs/omnia/azure-managed-cache-service-sample-solution</link>
      <pubDate>Sun, 24 May 2015 11:06:00 GMT</pubDate>
      <dc:creator><![CDATA[omniao]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/omnia/2015/05/24/azure-managed-cache-service-sample-solution/</guid>
      <description><![CDATA[Azure is a growing collection of integrated services &ndash; compute, storage, data, networking and...]]></description>
      <content:encoded><![CDATA[<p>Azure is a growing collection of integrated services &ndash; compute, storage, data, networking and app &ndash; that help you move faster, do more and save money. But that&rsquo;s just scratching the surface.</p>
<p>Azure supports any operating system, language, tool and framework &ndash; from Windows to Linux, SQL Server to Oracle, C# to Java. It puts the best of Windows and Linux ecosystems at your fingertips, so you can build great applications and services that work with every device.</p>
<p>In this Article today; you will learn how to Azure Web APPs scenarios using easy techniques which will allow you to dive quickly into the Azure web APP world.</p>
<p>But first things first you need to know some Azure Facts:</p>
<ul>
<li>Azure Web Apps enable you to easily deploy and scale web applications written in a variety of languages (including .NET, Java, PHP, Node.js and Python). The Web App service automatically handles patch management and configuration of your infrastructure &ndash; allowing you to avoid having to worry about VM management. Built-in AutoScale capability enables you to scale up/down your web application based on actual customer traffic &ndash; enabling you to serve any load, and to save money when your site is not at peak. Built-in continuous deployment support enables you to automatically deploy code updates from Visual Studio Online, GitHub and BitBucket.</li>
<li>You can integrate Web Apps with a backend Relational or NoSQL database. SQL Database is a relational database-as-a-service offering that you can use to host and scale relational databases. DocumentDB is a NoSQL document service that you can use to store, index, and query JSON based data.</li>
</ul>
<div>
<p>So now let&rsquo;s imagine the below scenario:</p>
<p><strong>You are developing an e-commerce website targeting 5 different countries, each country got its own suppliers, so you are having the same portal and you have cached the application to enable faster reach from users, what if you want the server to have a super-fast access to data with a distributed cache, in-memory,&nbsp;scalable&nbsp;solutions to have, that&rsquo;s simple Azure managed cache service which will give you the below benefits</strong><strong></strong></p>
<ul>
<li>Pre-built ASP.NET providers for session state and page output caching, enabling acceleration of web applications without having to modify application code.</li>
<li>Caches any serializable managed object - for example: CLR objects, rows, XML, binary data.</li>
<li>Consistent development model across both Azure and Windows Server AppFabric.</li>
</ul>
<p>&nbsp;</p>
<p>So in order to enable all these features, we need to do a very simple task</p>
<p><strong>Creating the cache</strong></p>
<p>Once a Managed Cache Service instance is created using the PowerShell cmdlets it can be viewed and configured in the&nbsp;Azure Management Portal, and we just need to run the below command</p>
<div>
<p><span style="background-color: #c0c0c0;"><em><strong>New-AzureManagedCache -Name Otlob -Location "Egypt" -Sku Basic -Memory 128MB</strong></em></span></p>
</div>
<p>Basic 128MB cache is created with name Otlob, in the Egypt geographic region.</p>
<p>&nbsp;</p>
<pre>Configure the cache<br />The Configure tab for Cache in the Management Portal is where you configure the options for your cache. Each cache has a default named cache, and the Standard and Premium cache offerings&nbsp;</pre>
<pre>support up to nine additional named caches, for a total of ten. Each named cache has its own set of options which allow you to configure your cache in a highly flexible manner.</pre>
</div>
<div><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/56/13/7853.1.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-56-13/7853.1.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/56/13/7853.1.png" original-url="http://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-56-13/7853.1.png" alt="" border="0" /></a></div>
<div>
<pre><br /><br />To create a named cache, type the name of the new cache into the Name box, specify the desired options, click Save, and click Yes to confirm. To cancel any changes, click Discard.<br /><br /></pre>
<pre><strong>Configure the cache clients</strong><br />A cache created using the Managed Cache Service is accessible from Azure applications running on Azure Websites, Web &amp; Worker Roles and Virtual Machines. A NuGet package is provided that simplifies the configuration of cache client applications.<br />To configure a client application using the Cache NuGet package, right-click the project in Solution Explorer and choose Manage NuGet Packages.</pre>
<pre>&nbsp;</pre>
<pre><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/56/13/8306.2.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-56-13/8306.2.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/56/13/8306.2.png" original-url="http://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-56-13/8306.2.png" alt="" border="0" /></a></pre>
</div>
<div>&nbsp;</div>
<div>
<p><span>&nbsp;</span></p>
<p><span>Type<span class="apple-converted-space">&nbsp;</span></span><strong><span>WindowsAzure.Caching</span></strong><span class="apple-converted-space"><span>&nbsp;</span></span><span>into the<span class="apple-converted-space">&nbsp;</span></span><strong><span>Search Online</span></strong><span class="apple-converted-space"><span>&nbsp;</span></span><span>text box, and select<span class="apple-converted-space">&nbsp;</span></span><strong><span>Windows Azure Cache</span></strong><span class="apple-converted-space"><span>&nbsp;</span></span><span>from the results. Click<span class="apple-converted-space">&nbsp;</span></span><strong><span>Install</span></strong><span>, and then click<span class="apple-converted-space">&nbsp;</span></span><strong><span>I Accept</span></strong><span>.</span></p>
</div>
<div><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/56/13/2134.3.jpg" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-56-13/2134.3.jpg"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/56/13/2134.3.jpg" original-url="http://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-56-13/2134.3.jpg" alt="" border="0" /></a></div>
<div>&nbsp;</div>
<div>
<p><span>&nbsp;</span></p>
<p><span>The NuGet package does several things: it adds the required configuration to the config file of the application, and it adds the required assembly references. For Cloud Services projects, it also adds a cache client diagnostic level setting to the ServiceConfiguration.cscfg file of the Cloud Service.</span></p>
<p><em><span>For ASP.NET web projects, the Cache NuGet package also adds two commented out sections to web.config. The first section enables session state to be stored in the cache, and the second section enables ASP.NET page output caching. For more information, see<span class="apple-converted-space">&nbsp;</span></span></em><a href="http://azure.microsoft.com/en-us/documentation/articles/cache-dotnet-how-to-use-service/#store-session"><em><span>How To: Store ASP.NET Session State in the Cache</span></em></a><span class="apple-converted-space"><em><span>&nbsp;</span></em></span><em><span>and<span class="apple-converted-space">&nbsp;</span></span></em><a href="http://azure.microsoft.com/en-us/documentation/articles/cache-dotnet-how-to-use-service/#store-page"><em><span>How To: Store ASP.NET Page Output Caching in the Cache</span></em></a><em><span>.</span></em></p>
<p><span>The NuGet package adds the following configuration elements into your application's web.config or app.config. A<span class="apple-converted-space">&nbsp;</span></span><strong><span>dataCacheClients</span></strong><span class="apple-converted-space"><span>&nbsp;</span></span><span>section and a</span><strong><span>cacheDiagnostics</span></strong><span class="apple-converted-space"><span>&nbsp;</span></span><span>section are added under the<span class="apple-converted-space">&nbsp;</span></span><strong><span>configSections</span></strong><span class="apple-converted-space"><span>&nbsp;</span></span><span>element. If there is no<span class="apple-converted-space">&nbsp;</span></span><strong><span>configSections</span></strong><span class="apple-converted-space"><span>&nbsp;</span></span><span>element present, one is created as a child of the</span><strong><span>configuration</span></strong><span class="apple-converted-space"><span>&nbsp;</span></span><span>element.</span></p>
<p>&nbsp;</p>
<div>
<pre><strong>&lt;configSections&gt;</strong></pre>
<pre><strong>&nbsp; &lt;!-- Existing sections omitted for clarity. --&gt;</strong></pre>
<pre><strong>&nbsp; &lt;section name="dataCacheClients" </strong></pre>
<pre><strong>&nbsp;&nbsp;&nbsp;&nbsp;type="Microsoft.ApplicationServer.Caching.DataCacheClientsSection,</strong></pre>
<pre><strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Microsoft.ApplicationServer.Caching.Core" </strong></pre>
<pre><strong>&nbsp;&nbsp;&nbsp;&nbsp;allowLocation="true" </strong></pre>
<pre><strong>&nbsp;&nbsp;&nbsp;&nbsp;allowDefinition="Everywhere" /&gt;</strong></pre>
<pre>&nbsp;</pre>
<pre><strong>&lt;section name="cacheDiagnostics" </strong></pre>
<pre><strong>&nbsp;&nbsp;&nbsp;&nbsp;type="Microsoft.ApplicationServer.Caching.AzureCommon.DiagnosticsConfigurationSection,</strong></pre>
<pre><strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Microsoft.ApplicationServer.Caching.AzureCommon" </strong></pre>
<pre><strong>&nbsp;&nbsp;&nbsp;&nbsp;allowLocation="true" </strong></pre>
<pre><strong>&nbsp;&nbsp;&nbsp;&nbsp;allowDefinition="Everywhere" /&gt;</strong></pre>
</div>
<p>These new sections include references to a&nbsp;<strong>dataCacheClients</strong>&nbsp;element, which is also added to the&nbsp;<strong>configuration</strong>&nbsp;element.</p>
<div>
<pre><em><strong>&lt;dataCacheClients&gt;</strong></em></pre>
<pre><em><strong>&nbsp; &lt;dataCacheClient name="default"&gt;</strong></em></pre>
<pre><em><strong>&nbsp;&nbsp;&nbsp; &lt;!--To use the in-role flavor of Azure Caching, </strong></em></pre>
<pre><em><strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;set identifier to be the cache cluster role name --&gt;</strong></em></pre>
<pre><em><strong>&nbsp;&nbsp;&nbsp; &lt;!--To use the Azure Caching Service,</strong></em></pre>
<pre><em><strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; set identifier to be the endpoint of the cache cluster --&gt;</strong></em></pre>
<pre><em><strong>&nbsp;&nbsp;&nbsp; &lt;autoDiscover isEnabled="true" identifier="[Cache role name or Service Endpoint]" /&gt;</strong></em></pre>
<pre><em><strong>&nbsp;&nbsp;&nbsp; &lt;!--&lt;localCache isEnabled="true" sync="TimeoutBased" objectCount="100000" ttlValue="300" /&gt;--&gt;</strong></em></pre>
<pre><em><strong>&nbsp;&nbsp;&nbsp; &lt;!--Use this section to specify security settings for connecting to your cache. </strong></em></pre>
<pre><em><strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This section is not required if your cache is hosted on a role that is a part</strong></em></pre>
<pre><em><strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; of your cloud service. --&gt;</strong></em></pre>
<pre><em><strong>&nbsp;&nbsp;&nbsp; &lt;!--&lt;securityProperties mode="Message" sslEnabled="false"&gt;</strong></em></pre>
<pre><em><strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;messageSecurity authorizationInfo="[Authentication Key]" /&gt;</strong></em></pre>
<pre><em><strong>&nbsp;&nbsp;&nbsp; &lt;/securityProperties&gt;--&gt;</strong></em></pre>
<pre><em><strong>&nbsp; &lt;/dataCacheClient&gt;</strong></em></pre>
<pre><em><strong>&lt;/dataCacheClients&gt;</strong></em></pre>
</div>
<p>After the configuration is added, replace the following two items in the newly added configuration.</p>
<ol>
<li>Replace&nbsp;<strong>[Cache role name or Service Endpoint]</strong>&nbsp;with the endpoint, which is displayed on the Dashboard in the Management Portal.</li>
</ol>
<p><span><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/56/13/6560.4.jpg" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-56-13/6560.4.jpg"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/56/13/6560.4.jpg" original-url="http://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-56-13/6560.4.jpg" alt="" border="0" /></a></span></p>
<p>&nbsp;</p>
<p>&nbsp;2.Uncomment the securityProperties section, and replace&nbsp;<strong>[Authentication Key]</strong>&nbsp;with the authentication key, which can be found in the Management Portal by clicking&nbsp;<strong>Manage Keys</strong>&nbsp;from the cache dashboard.</p>
<p><span><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/56/13/5707.5.jpg" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-56-13/5707.5.jpg"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/56/13/5707.5.jpg" original-url="http://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-56-13/5707.5.jpg" alt="" border="0" /></a></span></p>
<p>&nbsp;</p>
<p><em>These settings must be configured properly or clients will not be able to access the cache.</em></p>
<p>For Cloud Services projects, the NuGet package also adds a&nbsp;<strong>ClientDiagnosticLevel</strong>&nbsp;setting to the&nbsp;<strong>ConfigurationSettings</strong>&nbsp;of the cache client role in ServiceConfiguration.cscfg. The following example is the&nbsp;<strong>WebRole1</strong>&nbsp;section from a ServiceConfiguration.cscfg file with a&nbsp;<strong>ClientDiagnosticLevel</strong>&nbsp;of 1, which is the default&nbsp;<strong>ClientDiagnosticLevel</strong>.</p>
<div>
<pre>&lt;Role name="WebRole1"&gt;</pre>
<pre>&nbsp; &lt;Instances count="1" /&gt;</pre>
<pre>&nbsp; &lt;ConfigurationSettings&gt;</pre>
<pre>&nbsp;&nbsp;&nbsp; &lt;!-- Existing settings omitted for clarity. --&gt;</pre>
<pre>&nbsp;&nbsp;&nbsp; &lt;Setting name="Microsoft.WindowsAzure.Plugins.Caching.ClientDiagnosticLevel" </pre>
<pre>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;value="1" /&gt;</pre>
<pre>&nbsp; &lt;/ConfigurationSettings&gt;</pre>
<pre>&lt;/Role&gt;</pre>
</div>
<p><em>The client diagnostic level configures the level of caching diagnostic information collected for cache clients. For more information, see&nbsp;</em><a href="http://go.microsoft.com/fwlink/?linkid=320839&amp;clcid=0x409"><em>Troubleshooting and Diagnostics</em></a><em></em></p>
<p>The NuGet package also adds references to the following assemblies:</p>
<ul>
<li>Microsoft.ApplicationServer.Caching.Client.dll</li>
<li>Microsoft.ApplicationServer.Caching.Core.dll</li>
<li>Microsoft.WindowsFabric.Common.dll</li>
<li>Microsoft.WindowsFabric.Data.Common.dll</li>
<li>Microsoft.ApplicationServer.Caching.AzureCommon.dll</li>
<li>Microsoft.ApplicationServer.Caching.AzureClientHelper.dll</li>
</ul>
<p>If your project is a web project, the following assembly reference is also added:</p>
<ul>
<li>Microsoft.Web.DistributedCache.dll.</li>
</ul>
<p><em>These assemblies are located in the C:\Program Files\Microsoft SDKs\Windows Azure\.NET SDK\[sdk version]\ref\Caching\ folder.</em></p>
<p>Once your client project is configured for caching, you can use the techniques described in the following sections for working with your cache.</p>
<p>&nbsp;</p>
<p><strong>References</strong></p>
<p><a href="http://azure.microsoft.com/en-us/services/cache/">http://azure.microsoft.com/en-us/services/cache/</a></p>
<p><a href="http://azure.microsoft.com/en-us/services/cache/"><span>http://azure.microsoft.com/en-gb/overview/what-is-azure/</span></a></p>
<p><a href="http://azure.microsoft.com/en-gb/documentation/scenarios/web-app/">http://azure.microsoft.com/en-gb/documentation/scenarios/web-app/</a></p>
<p><a href="http://www.techrepublic.com/blog/10-things/10-reasons-to-use-azure-for-your-cloud-apps/">http://www.techrepublic.com/blog/10-things/10-reasons-to-use-azure-for-your-cloud-apps/</a></p>
<p>&nbsp;<a href="http://azure.microsoft.com/en-us/documentation/articles/cache-dotnet-how-to-use-service/">http://azure.microsoft.com/en-us/documentation/articles/cache-dotnet-how-to-use-service/</a></p>
<p><a href="http://azure.microsoft.com/en-gb/overview/what-is-azure/"><span>http://azure.microsoft.com/en-us/documentation/articles/cache-dotnet-how-to-use-service/#create-cache</span></a></p>
<p>&nbsp;</p>
<p><span>&nbsp;</span></p>
<p>&nbsp;</p>
<p><span><br /></span></p>
</div>]]></content:encoded>
    </item>
    <item>
      <title>How to loose session data in Web Farm ?</title>
      <link>https://docs.microsoft.com/archive/blogs/omnia/how-to-loose-session-data-in-web-farm</link>
      <pubDate>Wed, 15 Oct 2014 07:16:00 GMT</pubDate>
      <dc:creator><![CDATA[omniao]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/omnia/2014/10/15/how-to-loose-session-data-in-web-farm/</guid>
      <description><![CDATA[There are many things can cause session data lose but I came across very interesting scenario where...]]></description>
      <content:encoded><![CDATA[<p>There are many things can cause session data lose but I came across very interesting scenario where session data intermittently get lost while storing<br />session data in <em><strong>SqlSessionStateStore</strong></em>. And after long troubleshooting found it was the App ID assigned to the same web application is different in the 2 servers in the web farm. Thus when request complete processing on<br />the 2nd server it consider as new one and assign new AppID.</p>
<div>
<div>
<div>
<p><em><strong>SqlSessionStateStore</strong> scopes data by application, so that multiple applications can store sessions in one <strong>session state database.</strong> To that end, the session state database contains an <strong>ASPStateTempApplications</strong> table that records application names and <strong>application IDs</strong>. Application names are not explicitly specified as they are for other providers; instead, SqlSessionStateStore uses the website's IIS metabase path as the application name.<strong> Application IDs</strong></em><br /><em>are hashes generated from application names by the stored procedure GetHashCode. (<strong>SqlSessionStateStore</strong> differs in this respect, too, from other SQL providers, which use randomly generated GUIDs as application IDs.)</em></p>
<p>Ref <a href="http://msdn.microsoft.com/en-gb/library/aa478952.aspx">http://msdn.microsoft.com/en-gb/library/aa478952.aspx</a>&gt;</p>
<p><strong>Here is how can you reproduce the same</strong>:</p>
<p>&nbsp;In Web Farm of 2 web servers for example But not in the same order so you may have different app id</p>
<p>&nbsp;<a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/56/13/6523.1.jpg" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-56-13/6523.1.jpg"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/56/13/6523.1.jpg" original-url="http://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-56-13/6523.1.jpg" alt="" width="273" height="102" border="0" /></a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>Then when you check the ASPStateTempApplications table in ASPState DB you will find 2 different record for the same APP like:</p>
<p>&nbsp;</p>
<p>&nbsp;<a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/56/13/6318.2.jpg" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-56-13/6318.2.jpg"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/56/13/6318.2.jpg" original-url="http://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-56-13/6318.2.jpg" alt="" width="181" height="46" border="0" /></a></p>
<p>&nbsp;</p>
<p>&nbsp;Hence when session gets created it is formed as <strong>Session ID + App ID.</strong> So if the APP ID is different its hashing would be different so it will generate 2 different<br />session IDs for the same user as in&nbsp; the following example</p>
<p>&nbsp;<a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/56/13/7827.3.jpg" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-56-13/7827.3.jpg"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/56/13/7827.3.jpg" original-url="http://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-56-13/7827.3.jpg" alt="" width="476" height="92" border="0" /></a></p>
<p><strong>o2f3t4crsssufg0ppenzvduv<span style="background-color: #ff6600;">0e8cc1f9</span></strong> = O2f3t4crsssufg0ppenzvduv (SessionID) + 0e8cc1f9 (APP ID)</p>
<p><strong>o2f3t4crsssufg0ppenzvduv<span style="background-color: #ff6600;">2476b033 </span></strong>=O2f3t4crsssufg0ppenzvduv (Session ID) + 2476b033 (APP ID)</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;So make sure to make every single server in the farm identical.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
</div>
</div>
</div>]]></content:encoded>
    </item>
    <item>
      <title>Log Parser And IIS Log Analysis.</title>
      <link>https://docs.microsoft.com/archive/blogs/omnia/log-parser-and-iis-log-analysis</link>
      <pubDate>Thu, 09 Jan 2014 16:42:00 GMT</pubDate>
      <dc:creator><![CDATA[omniao]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/omnia/2014/01/09/log-parser-and-iis-log-analysis/</guid>
      <description><![CDATA[First have &nbsp;Log Parser installed. Then Start it from C:\Program Files (x86)\Log Parser...]]></description>
      <content:encoded><![CDATA[<p>First have &nbsp;<a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=890cd06b-abf8-4c25-91b2-f8d975cf8c07&amp;displaylang=en" target="_blank">Log Parser</a> installed. Then Start it from <strong>C:\Program Files (x86)\Log Parser 2.2</strong>&nbsp;</p>
<p>Here are some Log Parser queries which can be used across &nbsp;IIS logs for analysis</p>
<p><br /> <strong><span style="text-decoration: underline;">Request Type Distribution</span></strong></p>
<p>"SELECT EXTRACT_EXTENSION(TO_UPPERCASE(cs-uri-stem)) AS ExtType, COUNT(*) INTO FrontEndRequestType.csv FROM *.log GROUP BY ExtType ORDER BY COUNT(*) DESC " -i:W3C -o:CSV</p>
<p>&nbsp;</p>
<p><strong><span style="text-decoration: underline;">Top 20 Hits</span></strong></p>
<p>"SELECT TOP 20 TO_UPPERCASE(cs-uri-stem) AS URI, COUNT(*) AS Hits INTO Top20Hits.csv FROM *.log WHERE URI LIKE '%%.ASPX' GROUP BY URI ORDER BY Hits DESC " -i:W3C -o:CSV</p>
<p>&nbsp;</p>
<p><strong><span style="text-decoration: underline;">Top 20 Hits Overall</span></strong></p>
<p>"SELECT TOP 20 TO_UPPERCASE(cs-uri-stem) AS URI, COUNT(*) AS Hits INTO Top20Hits.csv FROM *.log GROUP BY URI ORDER BY Hits DESC " -i:W3C -o:CSV</p>
<p>&nbsp;</p>
<p><strong><span style="text-decoration: underline;">Top 20 Hits Chart</span></strong></p>
<p>"SELECT TOP 20 cs-uri-stem, COUNT(*) AS Hits INTO Top20Hits.jpg FROM *.log GROUP BY cs-uri-stem ORDER BY Hits DESC" -i:W3C -o:CHART -charttype:ColumnClustered -groupsize:640x480 -chartTitle: Top 20 Hits Chart</p>
<p>&nbsp;</p>
<p><strong><span style="text-decoration: underline;">Top 20 ASPX Hits</span></strong></p>
<p>"SELECT TOP 20 TO_UPPERCASE(cs-uri-stem) AS URI, COUNT(*) AS Hits INTO Top20ASPX.csv FROM *.log WHERE URI LIKE '%.ASPX' GROUP BY URI ORDER BY Hits DESC " -i:W3C -o:CSV</p>
<p>&nbsp;</p>
<p><strong><span style="text-decoration: underline;">Top 20 Slowest ASPX Pages</span></strong></p>
<p>"SELECT TOP 20 cs-uri-stem, max(time-taken) as MaxTime, avg(time-taken) as AvgTime INTO Top20SlowASPX.csv FROM *.log WHERE extract_extension(to_lowercase(cs-uri-stem)) = &lsquo;aspx&rsquo; GROUP BY cs-uri-stem ORDER BY MaxTime DESC" -i:W3C -o:CSV</p>
<p>&nbsp;</p>
<p><strong><span style="text-decoration: underline;">Top 20 ASMX Hits </span></strong></p>
<p>"SELECT TOP 20 TO_UPPERCASE(cs-uri-stem) AS URI, COUNT(*) AS Hits INTO Top20ASMX.csv FROM *.log WHERE URI LIKE '%.ASMX' GROUP BY URI ORDER BY Hits DESC " -i:W3C -o:CSV</p>
<p>&nbsp;</p>
<p><strong><span style="text-decoration: underline;">Top 20 Client IP Addresses </span></strong></p>
<p>"SELECT TOP 20 c-ip, COUNT(*) AS Hits INTO Top20ClientIP.csv FROM *.log GROUP BY c-ip ORDER BY Hits DESC " -i:W3C -o:CSV</p>
<p>&nbsp;</p>
<p><strong><span style="text-decoration: underline;">Requests Per Hour</span></strong></p>
<p>"SELECT TO_LOCALTIME(QUANTIZE(TO_TIMESTAMP(date, time),3600)) AS Hours, COUNT(*) AS Hits INTO RequestsPerHour.jpg FROM *.log GROUP BY Hours ORDER BY Hours " -i:W3C -o:CHART -charttype:ColumnClustered -groupsize:640x480 -chartTitle:"Requests Per Hour"</p>
<p>&nbsp;</p>
<p><strong><span style="text-decoration: underline;">HTTP Status Counts</span></strong></p>
<p>"SELECT DISTINCT sc-status AS Status, COUNT(*) AS Hits INTO HTTPStatusCount.csv FROM *.log GROUP BY Status ORDER BY Status ASC " -i:W3C -o:CSV</p>
<p>&nbsp;</p>
<p><strong><span style="text-decoration: underline;">HTTP Status Distribution</span></strong></p>
<p>"SELECT DISTINCT sc-status AS Status, COUNT(*) AS Percent INTO HTTPStatusDistribution.jpg FROM *.log GROUP BY Status ORDER BY Percent DESC " -i:W3C -o:CHART -chartType:PieExploded -chartTitle: "HTTP Status Distribution"</p>
<p>&nbsp;</p>
<p><strong><span style="text-decoration: underline;">Top 20 HTTP 304 Errors</span></strong></p>
<p>"SELECT TOP 20 TO_UPPERCASE(cs-uri-stem) AS URI, sc-substatus, sc-win32-status, COUNT(*) AS Hits INTO Top20Http304Errors.csv FROM *.log WHERE sc-status = 304 GROUP BY URI, sc-substatus, sc-win32-status ORDER BY Hits DESC" -i:W3C -o:CSV</p>
<p>&nbsp;</p>
<p><strong><span style="text-decoration: underline;">Top 20 HTTP 404 Errors</span></strong></p>
<p>"SELECT TOP 20 TO_UPPERCASE(cs-uri-stem) AS URI, sc-substatus, sc-win32-status, COUNT(*) AS Hits INTO Top20Http404Errors.csv FROM *.log WHERE sc-status = 404 GROUP BY URI, sc-substatus, sc-win32-status ORDER BY Hits DESC" -i:W3C -o:CSV</p>
<p>&nbsp;</p>
<p><strong><span style="text-decoration: underline;">Top 20 HTTP 403 Errors</span></strong></p>
<p>"SELECT TOP 20 TO_UPPERCASE(cs-uri-stem) AS URI, sc-substatus, sc-win32-status, COUNT(*) AS Hits INTO Top20Http403Errors.csv FROM *.log WHERE sc-status = 403 GROUP BY URI, sc-substatus, sc-win32-status ORDER BY Hits DESC" -i:W3C -o:CSV</p>
<p>&nbsp;</p>
<p><strong><span style="text-decoration: underline;">Top 20 HTTP 500 Errors</span></strong></p>
<p>"SELECT TOP 20 TO_UPPERCASE(cs-uri-stem) AS URI, sc-substatus, sc-win32-status, COUNT(*) AS Hits INTO Top20500Errors.csv FROM *.log WHERE sc-status = 500 GROUP BY URI, sc-substatus, sc-win32-status ORDER BY Hits DESC" -i:W3C -o:CSV</p>
<p>&nbsp;</p>
<p><strong><span style="text-decoration: underline;">Top 20 HTTP 503 Errors</span></strong></p>
<p>"SELECT TOP 20 TO_UPPERCASE(cs-uri-stem) AS URI, sc-substatus, sc-win32-status, COUNT(*) AS Hits INTOTop20503Errors.csv FROM *.log WHERE sc-status = 503 GROUP BY URI, sc-substatus, sc-win32-status ORDER BY Hits DESC" -i:W3C -o:CSV</p>
<p>&nbsp;</p>
<p><strong><span style="text-decoration: underline;">Top 20 Longest Processing Requests</span></strong></p>
<p>"SELECT TOP 20 cs-uri-stem AS URI, date AS Date, time AS Time, sc-status, time-taken as TimeTaken(ms) INTO</p>
<p>Top20LongRunningRequests.csv FROM *.log ORDER BY time-taken DESC" -i:W3C -o:CSV</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>To view results in Charts- this needs Office Web Components; there is a good post about this here <a href="http://blogs.msdn.com/b/carloc/archive/2008/08/07/charting-with-logparser.aspx">http://blogs.msdn.com/b/carloc/archive/2008/08/07/charting-with-logparser.aspx</a></p>]]></content:encoded>
    </item>
    <item>
      <title>Can I Develop Windows 8.1 App using  VS 2012?</title>
      <link>https://docs.microsoft.com/archive/blogs/omnia/can-i-develop-windows-8-1-app-using-vs-2012</link>
      <pubDate>Wed, 08 Jan 2014 08:56:30 GMT</pubDate>
      <dc:creator><![CDATA[omniao]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/omnia/2014/01/08/can-i-develop-windows-8-1-app-using-vs-2012/</guid>
      <description><![CDATA[&nbsp;The Short Answer is NO. I had a customer looking to use VS 2012 to develop Windows phone 8.0...]]></description>
      <content:encoded><![CDATA[<p>&nbsp;The Short Answer is NO. I had a customer looking to use VS 2012 to develop Windows phone 8.0 and 8.1 Apps.</p>
<p>&nbsp;The current Windows Phone 8.0 SDK is compatible with Visual Studio 2012 (Update 2) and higher (see <a href="http://dev.windowsphone.com/en-us/downloadsdk">http://dev.windowsphone.com/en-us/downloadsdk</a>) .</p>
<p>&nbsp;<strong></strong></p>
<p><strong>To develop Windows Store Apps for Windows 8.0</strong> you generally need Visual Studio 2012 or higher. Different editions of Visual Studio may introduce additional restrictions.<strong></strong></p>
<p><strong>To develop Windows Store Apps for Windows 8.1</strong> you generally need Visual Studio 2013 or higher.</p>]]></content:encoded>
    </item>
    <item>
      <title>Does Dacpack supports sqlcmd variables?</title>
      <link>https://docs.microsoft.com/archive/blogs/omnia/does-dacpack-supports-sqlcmd-variables</link>
      <pubDate>Mon, 30 Dec 2013 23:40:27 GMT</pubDate>
      <dc:creator><![CDATA[omniao]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/omnia/2013/12/30/does-dacpack-supports-sqlcmd-variables/</guid>
      <description><![CDATA[&nbsp;
&nbsp;I have a got a question from a customer want to use dbdacfx provider with Web Deploy 3...]]></description>
      <content:encoded><![CDATA[<p>&nbsp;</p>
<p>&nbsp;I have a got a question from a customer want to use dbdacfx provider with Web Deploy 3 which is working fine and only failing with &nbsp;sqlcmd variables with below error?</p>
<p>&nbsp;And the <strong>Question</strong> was Does Dacpack supports sqlcmd variables?</p>
<p>&nbsp;</p>
<p>&nbsp;<a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/56/13/5314.dac.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-56-13/5314.dac.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/56/13/5314.dac.png" original-url="http://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-56-13/5314.dac.png" alt="" border="0" /></a></p>
<p>&nbsp;</p>
<p><strong>Ref</strong> dbDacFx Provider for Incremental Database publishing &nbsp;<a href="http://www.iis.net/learn/publish/using-web-deploy/dbdacfx-provider-for-incremental-database-publishing">http://www.iis.net/learn/publish/using-web-deploy/dbdacfx-provider-for-incremental-database-publishing</a></p>
<p><strong>&nbsp;</strong></p>
<p><strong>And the Answer is:</strong>&nbsp; The dbDacFx provider does not support sqlcmd variables at this time.&nbsp; This functionality might be added later, but for now you&rsquo;ll have to rely on the dbsqlpackage provider for that sqlcmd variables support.</p>
<p>&nbsp;</p>]]></content:encoded>
    </item>
    <item>
      <title>How to block certain client apps or browsers from accessing a web App in IIS?</title>
      <link>https://docs.microsoft.com/archive/blogs/omnia/how-to-block-certain-client-apps-or-browsers-from-accessing-a-web-app-in-iis</link>
      <pubDate>Sun, 01 Dec 2013 03:48:19 GMT</pubDate>
      <dc:creator><![CDATA[omniao]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/omnia/2013/12/01/how-to-block-certain-client-apps-or-browsers-from-accessing-a-web-app-in-iis/</guid>
      <description><![CDATA[&nbsp;I got a question from one of my colleagues asking how to block certain client application or...]]></description>
      <content:encoded><![CDATA[<p>&nbsp;I got a question from one of my colleagues asking how to block certain client application or browsers from accessing a web App in IIS ?</p>
<p>The Question was raised at first from a customer have already disabled Active Sync and still his users can access through 3rd parity Applications like Cloud Magic&nbsp;https://cloudmagic.com and still would like to prevent that ??</p>
<p>So to do so we can use common request-filter settings to improve the security of the IIS web server. Any Client access your site, the browser software identifies itself by sending a user-agent string, and that is already get logged in IIS log as below:</p>
<p>&nbsp;</p>
<p>#Fields: date time s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip <span style="background-color: #ffff00;">cs(User-Agent)</span> cs(Referer) sc-status sc-substatus sc-win32-status time-taken</p>
<p>2013-12-01 10:51:45 ::1 GET / - 80 - ::1 Mozilla/5.0+(Windows+NT+6.3;+WOW64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+<span style="background-color: #ffff00;">Chrome</span>/31.0.1650.57+Safari/537.36 - 500 24 50 2206</p>
<p>&nbsp;<strong>User Agent (cs(UserAgent)) is&nbsp;</strong>the browser type that the client used.</p>
<p>&nbsp;</p>
<p>So simply you can block Chrome by configuring a Deny Rule for user-agent= Chrome</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><strong>Forexample</strong></p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;requestFiltering&gt;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;filteringRules&gt;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;filteringRule name="user agent deny" scanUrl="false" scanQueryString="false"&gt;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;scanHeaders&gt;</p>
<p><strong>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;add requestHeader="user-agent" /&gt;</strong></p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/scanHeaders&gt;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;appliesTo/&gt;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;denyStrings&gt;</p>
<p><strong>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;add string="chrome" /&gt;</strong></p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/denyStrings&gt;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/filteringRule&gt;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/filteringRules&gt;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/requestFiltering&gt;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>Or For our main Customer who liked to block&nbsp;CloudMagic it would be:</p>
<p>&nbsp;</p>
<p>&lt;denyStrings&gt;</p>
<p>&nbsp; &nbsp; &nbsp;&lt;add string="CloudMagic" /&gt;</p>
<p>&lt;/denyStrings&gt;</p>]]></content:encoded>
    </item>
    <item>
      <title>Why can't place an ascx file in the App_Code folder?</title>
      <link>https://docs.microsoft.com/archive/blogs/omnia/why-cant-place-an-ascx-file-in-the-app_code-folder</link>
      <pubDate>Fri, 20 Sep 2013 01:11:48 GMT</pubDate>
      <dc:creator><![CDATA[omniao]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/omnia/2013/09/20/why-cant-place-an-ascx-file-in-the-app_code-folder/</guid>
      <description><![CDATA[When a&nbsp;developer creates a user controls (ascx files); it is not allowed to put it in the...]]></description>
      <content:encoded><![CDATA[<p><span>When a&nbsp;developer creates a user controls (ascx files); it is not allowed to put it in the App_Code folder.</span></p>
<p><span> Before we answer this lets quickly&nbsp;remember&nbsp;the value of App_Code folder: it is just one of the w<span>eb site project folders that can store source code BUT its content would be automatically compiled at run time. And this is reason because that would cause the user control to be compiled&nbsp;</span></span>out of its required sequence and therefore is not allowed.</p>
<p>.....</p>]]></content:encoded>
    </item>
    <item>
      <title>IIS8: What is the problem that CCS (Centralized Certificate Store) resolved?</title>
      <link>https://docs.microsoft.com/archive/blogs/omnia/iis8-what-is-the-problem-that-ccs-centralized-certificate-store-resolved</link>
      <pubDate>Tue, 10 Sep 2013 00:43:00 GMT</pubDate>
      <dc:creator><![CDATA[omniao]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/omnia/2013/09/10/iis8-what-is-the-problem-that-ccs-centralized-certificate-store-resolved/</guid>
      <description><![CDATA[Securing sites is already a mandatory step in many businessas usually it is saving sensitive data...]]></description>
      <content:encoded><![CDATA[<p>Securing sites is already a mandatory step in many business<br />as usually it is saving sensitive data and documents. Moreover, with cloud<br />hosting, server capacity must be added and removed dynamically. Before Windows<br />Server 2012, there were a couple of obstacles must be considered :</p>
<ul>
<li><strong>Scalability</strong>: We can only use one certificate for one IP:Port combination only.</li>
<li><strong>Manageability</strong>: Storing certificates locally on the web server so for example when we<br />renew a certificate it must be repeated on every server.</li>
</ul>
<p><strong>&nbsp;</strong><strong>And CCS is the Solution</strong><strong>: T</strong>he DNS name and CN name of the<br />certificate must match. This contract can be further extended to the file names<br />of the certificates. (For example, www.Server1.com would use the certificate<br />with a file name www. Server1.com.pfx.) This contract enables Windows Server<br />2012 to have just one SSL binding, regardless of the number of secure sites<br />that use CCS store for binding certificates.</p>
<p><strong>Simply previously</strong><strong> </strong>if there were 100 secure sites, there would 100 SSL<br />bindings &ldquo;<strong>Explicit Binding&rdquo;</strong>. But with CCS regardless the number of secure sites, there would be single SSL<br />bindings &ldquo;<strong>Implicit Binding&rdquo;</strong>.</p>
<p>&nbsp;</p>
<p><strong>How to configure it in IIS ?</strong>&nbsp;</p>
<p><strong><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/56/13/7026.1.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-56-13/7026.1.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/56/13/7026.1.png" original-url="http://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-56-13/7026.1.png" alt="" width="300" height="196" border="0" /></a></strong></p>
<p>&nbsp;</p>
<p><strong><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/56/13/4606.2.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-56-13/4606.2.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/56/13/4606.2.png" original-url="http://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-56-13/4606.2.png" alt="" width="300" height="413" border="0" /></a></strong></p>
<p>&nbsp;</p>
<p><strong>How to configure website to use CCS? </strong></p>
<p>When choose CCS then no need to select certificate &hellip; it just go and picked it up from the share but it must be certificate name like website name exactly</p>
<p><strong></strong>&nbsp;</p>
<p><strong>Where CCS is Configured ?</strong></p>
<p>CCS configuration is stored in Registry and not in Application Host</p>
<p>IIS sslFlags is just to verify if website uses CCS.</p>
<p><strong><span style="color: #ff0000;"><em>&lt;binding protocol="https" bindingInformation="*:443:CentralSSL0" </em><em>sslFlags="3" /&gt;</em></span></strong></p>
<p>&nbsp;</p>
<p>&nbsp;</p>]]></content:encoded>
    </item>
    <item>
      <title>Don't add special bindings for FTP site</title>
      <link>https://docs.microsoft.com/archive/blogs/omnia/dont-add-special-bindings-for-ftp-site</link>
      <pubDate>Thu, 16 May 2013 06:34:51 GMT</pubDate>
      <dc:creator><![CDATA[omniao]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/omnia/2013/05/16/dont-add-special-bindings-for-ftp-site/</guid>
      <description><![CDATA[Shortly if you add bindings for ftp site, it will start to show&nbsp;abnormal&nbsp;behavior. You may...]]></description>
      <content:encoded><![CDATA[<p>Shortly if you add bindings for ftp site, it will start to show&nbsp;abnormal&nbsp;behavior. You may not be able to browse it by IP address or name.</p>
<p>You may see error 530&nbsp;</p>
<p><strong>530-Valid hostname is expected.</strong></p>
<p><strong>&nbsp;Win32 error:&nbsp;&nbsp; No such host is known.&nbsp;</strong><br /><strong>&nbsp;Error details: Hostname didn't match any configured ftp site.</strong><br /><strong>530 End</strong></p>
<p>&nbsp;</p>
<p>To resolve that simply&nbsp;remove&nbsp;any added bindings for the site and use the FTP name you&nbsp;added&nbsp;in the FTP creation wizard.</p>
<p>&nbsp;</p>
<p><span>HTTP &nbsp;pass the host name in the headers that are passed between the client and server, but FTP does not support that option.</span></p>
<p>&nbsp;</p>
<p><strong>Ref&nbsp;</strong><a href="http://blogs.msdn.com/b/robert_mcmurray/archive/2007/08/28/virtual-hosts-and-host-names-in-ftp7.aspx">http://blogs.msdn.com/b/robert_mcmurray/archive/2007/08/28/virtual-hosts-and-host-names-in-ftp7.aspx</a></p>]]></content:encoded>
    </item>
  </channel>
</rss>