Form Authentication / Profiles slow on Azure Cloud, fine locally <p>I'm using MVC 4 on Azure, and it loads very slowly (over a minute). Here are the load times of a few pages: <img src="https://i.stack.imgur.com/nzmy3.png" alt="http://i.imgur.com/V4brS.png"> (the 6.9 minutes was when I tried loading 7 tabs with different pages)</p> <p>This problem does not occur when I'm using the Azure emulator, locally. </p> <p>I've tried using an extra large instance, and using remote desktop to run the site locally, and it was just as slow. Also I have tried using IIS Express and normal IIS, and nothing there either.</p> <p>I created a completely fresh MVC project using the "Internet application" template, which includes security, and it is very slow as well, so I'm pretty sure the other things I'm using in my project are not causing the problem. Here are the load times with just the default MVC project: <img src="https://i.stack.imgur.com/YUd25.png" alt="enter image description here"></p> <p>I was originally using separate affinity regions for my membership DB and my website, but I've tried using matching affinity groups on both the blank MVC template with forms authentication and my project.</p> <p>Revisiting pages doesn't improve their speed significantly.</p> <p>I also tried creating just a MVC site without authentication, with a 10x5000 table generated:</p> <pre><code>&lt;html&gt; &lt;body&gt; &lt;table&gt; &lt;thead&gt; &lt;tr&gt; @for (int i = 0; i &lt; 10; i++) { &lt;th&gt;@i &lt;/th&gt; } &lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt; @for(int i = 0; i &lt; 5000; i++) { &lt;tr&gt; @for(int j = 0; j &lt; 10; j++) { &lt;td&gt;Row @i , column @j&lt;/td&gt; } &lt;/tr&gt; } &lt;/tbody&gt; &lt;/table&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>This loads fine, both locally and on the cloud. Even from a cold start it is only ~10-15 seconds.</p> <p>So I'm fairly certain that the issue lies in the Profile/Membership/Authentication of ASP.NET, but only while it is deployed to Azure (since I'm using the same SQL Azure database with Universal Providers when running locally, and there aren't these slowdowns).</p> <p>I expected this problem to be more common, but the only thing that really seemed relevant was this: <a href="http://social.msdn.microsoft.com/Forums/en-US/windowsazuremanagement/thread/7d3323d8-571b-4b8f-9fdb-bd5ccc6c39b7" rel="nofollow noreferrer">social.msdn.microsoft.com/Forums/en-US/windowsazuremanagement/thread/7d3323d8-571b-4b8f-9fdb-bd5ccc6c39b7</a> (possibly this: <a href="http://stackoverflow.com/questions/10791433/saving-changes-very-slow-via-datacontext">stackoverflow.com/questions/10791433/saving-changes-very-slow-via-datacontext</a>)</p> <p>I'm working through the things to try, as suggested in that thread, at: <a href="http://windowsazure.com/en-us/manage/windows/best-practices/" rel="nofollow noreferrer">windowsazure.com/en-us/manage/windows/best-practices/</a></p>