title: Publishing app in Azure from Visual Studio 2015 doesn't load .CSS
body: <p>I got this problem when publishing my app from Visual Studio 2015 in Azure; it looked like this:</p>
  
  <p><a href="https://i.stack.imgur.com/BFzN2.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/BFzN2.png" alt="enter image description here"></a></p>
  
  <p>Apparently It didn't load .css files properly (and who knows what else).</p>
  
  <p>I did a lot of investigation but contrary to what I expected, It was very difficult to find the source of the problem, yet in some lost forum I found out that web.config gets Its  property changed when being published, my local web.config looks like this:</p>
  
  <pre><code>&lt;system.web&gt;
  &lt;authentication mode="None" /&gt;
  &lt;compilation debug="true" targetFramework="4.5.2" /&gt;
  &lt;httpRuntime targetFramework="4.5.2" /&gt;
  &lt;httpModules&gt;
    &lt;add name="ApplicationInsightsWebTracking" type="Microsoft.ApplicationInsights.Web.ApplicationInsightsHttpModule, Microsoft.AI.Web" /&gt;
  &lt;/httpModules&gt;
  </code></pre>
  
  <p></p>
  
  <p>My remote web.config like this:</p>
  
  <pre><code>&lt;system.web&gt;
  &lt;authentication mode="None" /&gt;
  &lt;compilation targetFramework="4.5.2" /&gt;
  &lt;httpRuntime targetFramework="4.5.2" /&gt;
  &lt;httpModules&gt;
    &lt;add name="ApplicationInsightsWebTracking" type="Microsoft.ApplicationInsights.Web.ApplicationInsightsHttpModule, Microsoft.AI.Web" /&gt;
  &lt;/httpModules&gt;
  </code></pre>
  
  <p></p>
  
  <p>When I added the debug="true" in compilation it worked properly:</p>
  
  <p><a href="https://i.stack.imgur.com/fCEKC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fCEKC.png" alt="enter image description here"></a></p>
  
  <p>I want to leave this here for helping anyone else having this same problem, and by the way my questions:</p>
  
  <p>1- Why disabling debug affects how .css files (and maybe other files) are loaded?</p>
  
  <p>2- Is there another way to correct this without allowing debug on my remote server?</p>
  
  <p>3- Perhaps there is another workaround with this that I missed in my search for help, if anyone has experienced this before please share your knowledge.</p>
  
  <p>One could expect this would be very common, after all I was only publishing an app in azure xD<br>
  It may be important to mention that my app also works with a Data Base, i will now try to learn how to implement that on azure xD</p>
  
  <p>Thanks!</p>
  
  <p><strong>Edit:</strong>
  BundleConfig.cs</p>
  
  <pre><code>using System.Web;
  using System.Web.Optimization;
  
  namespace Distribuidora_Saturno
  {
      public class BundleConfig
      {
          // Para obtener más información sobre Bundles, visite http://go.microsoft.com/fwlink/?LinkId=301862
          public static void RegisterBundles(BundleCollection bundles)
          {
              bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
                          "~/Scripts/jquery-{version}.js"));
  
              bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include(
                          "~/Scripts/jquery.validate*"));
  
              // Utilice la versión de desarrollo de Modernizr para desarrollar y obtener información. De este modo, estará
              // preparado para la producción y podrá utilizar la herramienta de compilación disponible en http://modernizr.com para seleccionar solo las pruebas que necesite.
              bundles.Add(new ScriptBundle("~/bundles/modernizr").Include(
                          "~/Scripts/modernizr-*"));
  
              bundles.Add(new ScriptBundle("~/bundles/bootstrap").Include(
                        "~/Scripts/bootstrap.js",
                        "~/Scripts/respond.js"));
  
              bundles.Add(new StyleBundle("~/Content/CSS").Include(
                        "~/Content/CSS/bootstrap.css",
                        "~/Content/CSS/site.css"));
          }
      }
  }
  </code></pre>