title: Improving TTFB for ASP.NET Websites
body: <p><a href="https://i.stack.imgur.com/sjVY7.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/sjVY7.png" alt="enter image description here"></a>Trying to figure out why my website is so slow, it's an asp.net empty template using a bootstrap theme. Not using any database or Entity Framework so I am at a loss as to why a simple asp.net website can be so slow.</p>
  
  <p>It seems to be the TTFB (Time to First Byte) is reaching upwards of 15-20 seconds. Sometimes the site is fast but often after some time the site will slow down, my understanding being that IIS is suspending the app pool.</p>
  
  <p>The challenge is I am using Host4Asp and GoDaddy hosting, both have this issue and I can't access IIS to configure it as it's a shared hosting. I created the same website in PHP and it loads instantly, everytime. </p>
  
  <p>I've implemented caching in webconfig and use the CacheOutput attribute on all my controller actions.</p>
  
  <pre><code>&lt;system.webServer&gt;
    &lt;staticContent&gt;
      &lt;clientCache httpExpires="Sun, 29 Mar 2020 00:00:00 GMT" cacheControlMode="UseExpires" /&gt;
    &lt;/staticContent&gt;
    &lt;urlCompression doDynamicCompression="true" doStaticCompression="true" dynamicCompressionBeforeCache="true" /&gt;
    &lt;httpProtocol&gt;
      &lt;customHeaders&gt;
        &lt;add name="Cache-Control" value="public" /&gt;
      &lt;/customHeaders&gt;
    &lt;/httpProtocol&gt;
  &lt;/system.webServer&gt;
  </code></pre>
  
  <p>So the question is how do you improve the TTFB of an asp.net website comparable in performance when you have limited access to IIS and you're using a shared host. Surely asp.net is expecting every developer to have a high performance VPS or dedicated server.</p>
  
  <p>I've made a repo on GitHub containing the full solution code if it helps.
  <a href="https://github.com/devfunkd/zenwire" rel="nofollow noreferrer">https://github.com/devfunkd/zenwire</a></p>