title: Broken Images on IIS7
body: <p>I have a ASP.NET MVC site and it works just fine when I run it locally. Once I deploy that site to IIS 7 all links to resources are broken (ie. script files, images, css files). Could this be a route issue or would it be an IIS setting?</p>
  
  <p>Here are my routes:</p>
  
  <pre><code>public static void RegisterRoutes(RouteCollection routes)
  {
      routes.IgnoreRoute("elmah.axd");
      routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
  
      routes.MapRoute(
          "Search",
          "Basic/Page/{page}",
          new { controller = "Search", action = "Basic" }
      );
  
      routes.MapRoute(
          "Default",                                                                          // Route name
          "{controller}/{action}/{id}",                                                       // URL with parameters
          new { controller = MVC.Welcome.Name, action = MVC.Welcome.Actions.Index, id = "" }  // Parameter defaults
      );
  }
  </code></pre>
  
  <p>EDIT:</p>
  
  <p>I reference all content using T4MVC template. The template is correct when it specifies the paths with ~/content/. The problem is that when the html is generated the output doesn't include the "~" it is just /content/.</p>
  
  <pre><code>&lt;img src="&lt;%= Links.Content.Images.logo_png %&gt;" alt="Logo" /&gt;
  
  &lt;img src="/Content/Images/logo.png" alt="Logo" /&gt;
  </code></pre>
  
  <p>NOTE:</p>
  
  <p>The issue actually was that there is something wrong with this line in web.config. Turns out the January 1st 2011 is not a Friday but Saturday. For some reason it still didn't like that line.</p>
  
  <pre><code>&lt;clientCache httpExpires="Fri, 1 Jan 2011 15:30:00 UTC" cacheControlMode="UseExpires"/&gt;
  </code></pre>
  
  <p>Changing it to this works just fine;</p>
  
  <pre><code>&lt;clientCache cacheControlMode="UseExpires" httpExpires="Tue, 19 Jan 2038 03:14:07 GMT" /&gt;
  </code></pre>
  
  <p>Adding it here in hopes that it helps others with this issue.</p>
  
  <p>Thanks!</p>