title: Where do I put the blazor.server.js script tag in a RazorPages app?
body: <p>Right now I have it at the bottom of the <code>_Layout.cshtml</code> layout page that is used by every other page. The problem I'm having is that <strong>pages under the Identity area throw errors in the console when navigating to Identity pages</strong>:</p>
  
  <pre><code>POST https://localhost:5001/Identity/Account/_blazor/negotiate 404
  </code></pre>
  
  <p>and</p>
  
  <pre><code>blazor.server.js:1 Uncaught (in promise) Error: Cannot send data if the connection is not in the 'Connected' State.
  </code></pre>
  
  <p>These errors make me think I'm doing something wrong with how I enable Blazor Server in my RazorPages app.</p>
  
  <p>So I'm wondering, should I only have the <code>blazor.server.js</code> scripts on pages that are actually using Blazor? Is there a way to make it available to Areas that putting it in the Layout seems to not do?</p>