<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="https://blog.aabech.no/rss/xslt"?>
<rss xmlns:a10="http://www.w3.org/2005/Atom" version="2.0">
  <channel>
    <title>Lars-Erik's blog</title>
    <link>https://blog.aabech.no/</link>
    <description>Ramblings about Umbraco, .net and JavaScript development. With a sprinkle of other stuff.</description>
    <generator>Articulate, blogging built on Umbraco</generator>
    <item>
      <guid isPermaLink="false">1117</guid>
      <link>https://blog.aabech.no/archive/potential-freeze-with-umbraco-and-signalr/</link>
      <title>Potential freeze with Umbraco and SignalR</title>
      <description>&lt;p&gt;I cloned the Umbraco 7.7 dev branch today to prepare a demo for my colleagues next week. SignalR has been bundled with Umbraco, and guess what - problems I've had before hit me again. It just freezes on boot, specifically at the app.MapSignalR call in the Owin startup.&lt;/p&gt;
&lt;p&gt;Turns out, the HQ guys have already been down this road and helped fix a really really weird bug with it. Read &lt;a href="https://github.com/SignalR/SignalR/issues/3414"&gt;the issue&lt;/a&gt; and &lt;a href="https://www.zpqrtbnk.net/posts/appdomains-threads-cultureinfos-and-paracetamol"&gt;Stephane's post&lt;/a&gt;, it's quite interesting. But this was not the issue that hit me, even tho it's quite similar in behavior.&lt;/p&gt;
&lt;p&gt;I've actually been down this road before myself. I recalled having had similar problems. I didn't dive into it back then, I just gave up and threw SignalR out. I'd like to say I have just as deep an analysis as Stephane has in his post, but I'm just not as good. :) In any case, it's something to do with the performance counters reading a registry key.&lt;/p&gt;
&lt;p&gt;The code is somewhere within &lt;code&gt;PerformanceCounter.NextSample()&lt;/code&gt;. My debugging symbols fu is not strong enough to get everything right there, but it's somewhere in the &lt;code&gt;PerformanceCounterLib&lt;/code&gt; and has something to do with a &lt;code&gt;RegistryKey&lt;/code&gt; being read. I had it in the stacktrace, but I'm sorry to say I didn't record it.&lt;/p&gt;
&lt;p&gt;Popping the registry editor, I find it already focused on a registry key called SignalR. I'm guessing I haven't had it open since I gave up the last time. Again, sorry for not having deeper knowledge here. You might have a gazillion keys called SignalR-something.vstemplate. These are safe, but the one only named SignalR is our suspect. I impatiently went ahead and deleted it, and now everything works.&lt;/p&gt;
&lt;p&gt;So I'm stuck trying to provide any deeper knowledge, and I was stupid enough not to record the key name before I threw it out. Although, I'm pretty sure it is from the &lt;a href="http://www.asp.net/signalr/overview/performance/signalr-performance#perfcounters"&gt;SignalR performance counters&lt;/a&gt;, and that the key in question is &lt;code&gt;HKLM\System\CurrentControlSet\Services\SignalR\Performance&lt;/code&gt;. I threw the whole &lt;code&gt;SignalR&lt;/code&gt; key out.&lt;/p&gt;
&lt;p&gt;If I gain any deeper knowledge, I'll update this post. Otherwise, at least you know that deleting that key may save your day. :)&lt;/p&gt;
</description>
      <pubDate>Fri, 23 Jun 2017 22:16:38 Z</pubDate>
      <a10:updated>2017-06-23T22:16:38Z</a10:updated>
    </item>
  </channel>
</rss>