title: MVC4 Project Images not displaying
body: <p>I have just deployed my first MVC4 project from my development machine to my production IIS7.5 server and I am having some issues with getting the images to display correctly on the server.</p>
  
  <p>Could this be an permissions issue in IIS7?</p>
  
  <pre><code>&lt;input type="image" src="Content/Images/Product.png" runat="server" /&gt;
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/EPPbK.png" alt="enter image description here"></p>
  
  <p>When I run this on my desktop the images are displayed correctly but when I deploy to the server I get the standard broken link image. I have confirmed that the images are on the server in the correct path.</p>
  
  <p>I have also tried changing the src to use the tilde character <code>src="~/Content/Images/Product.png"</code> but it still does not work</p>
  
  <p>This is also starting to effect the loading of the site.css file</p>
  
  <pre><code>&lt;head&gt;
      &lt;meta charset="utf-8" /&gt;
      &lt;title&gt;@ViewData("Title")&lt;/title&gt;
      &lt;link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" type="text/css" /&gt;
      &lt;script src="@Url.Content("~/Scripts/jquery-1.6.2.min.js")" type="text/javascript"&gt;&lt;/script&gt;
      &lt;script src="@Url.Content("~/Scripts/modernizr-2.0.6-development-only.js")" type="text/javascript"&gt;&lt;/script&gt;
  &lt;/head&gt;
  </code></pre>
  
  <p>In Chrome I'm getting an error saying its not found and its not loading in any browse but I have confirmed its on disk.
  <img src="https://i.stack.imgur.com/XMy69.png" alt="enter image description here"></p>
  
  <p>Something strange going on here...</p>
  
  <p><strong>Web.Config</strong></p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;!--
    For more information on how to configure your ASP.NET application, please visit
    http://go.microsoft.com/fwlink/?LinkId=152368
    --&gt;
  &lt;configuration&gt;
    &lt;configSections&gt;
      &lt;!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 --&gt;
      &lt;section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=4.4.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"/&gt;
    &lt;/configSections&gt;
    &lt;appSettings&gt;
      &lt;add key="webpages:Version" value="1.0.0.0"/&gt;
      &lt;add key="ClientValidationEnabled" value="true"/&gt;
      &lt;add key="UnobtrusiveJavaScriptEnabled" value="true"/&gt;
    &lt;/appSettings&gt;
    &lt;system.web&gt;
      &lt;compilation debug="true" targetFramework="4.0"/&gt;
      &lt;authentication mode="Forms"&gt;
        &lt;forms loginUrl="~/Account/LogOn" timeout="2880"/&gt;
      &lt;/authentication&gt;
      &lt;pages controlRenderingCompatibilityVersion="4.0"&gt;
        &lt;namespaces&gt;
          &lt;add namespace="System.Web.Helpers"/&gt;
          &lt;add namespace="System.Web.Mvc"/&gt;
          &lt;add namespace="System.Web.Mvc.Ajax"/&gt;
          &lt;add namespace="System.Web.Mvc.Html"/&gt;
          &lt;add namespace="System.Web.Routing"/&gt;
          &lt;add namespace="System.Web.WebPages"/&gt;
        &lt;/namespaces&gt;
      &lt;/pages&gt;
      &lt;profile defaultProvider="DefaultProfileProvider"&gt;
        &lt;providers&gt;
          &lt;add name="DefaultProfileProvider" type="System.Web.Providers.DefaultProfileProvider, System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" connectionStringName="DefaultConnection" applicationName="/"/&gt;
        &lt;/providers&gt;
      &lt;/profile&gt;
      &lt;membership defaultProvider="DefaultMembershipProvider"&gt;
        &lt;providers&gt;
          &lt;add name="DefaultMembershipProvider" type="System.Web.Providers.DefaultMembershipProvider, System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" connectionStringName="DefaultConnection" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" applicationName="/"/&gt;
        &lt;/providers&gt;
      &lt;/membership&gt;
      &lt;roleManager defaultProvider="DefaultRoleProvider"&gt;
        &lt;providers&gt;
          &lt;add name="DefaultRoleProvider" type="System.Web.Providers.DefaultRoleProvider, System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" connectionStringName="DefaultConnection" applicationName="/"/&gt;
        &lt;/providers&gt;
      &lt;/roleManager&gt;
      &lt;sessionState mode="InProc" customProvider="DefaultSessionProvider"&gt;
        &lt;providers&gt;
          &lt;add name="DefaultSessionProvider" type="System.Web.Providers.DefaultSessionStateProvider, System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" connectionStringName="DefaultConnection"/&gt;
        &lt;/providers&gt;
      &lt;/sessionState&gt;
    &lt;/system.web&gt;
    &lt;system.webServer&gt;
      &lt;validation validateIntegratedModeConfiguration="false"/&gt;
      &lt;modules runAllManagedModulesForAllRequests="true"/&gt;
    &lt;/system.webServer&gt;
    &lt;runtime&gt;
      &lt;assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"&gt;
        &lt;dependentAssembly&gt;
          &lt;assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35"/&gt;
          &lt;bindingRedirect oldVersion="1.0.0.0-2.0.0.0" newVersion="3.0.0.0"/&gt;
        &lt;/dependentAssembly&gt;
      &lt;/assemblyBinding&gt;
    &lt;/runtime&gt;
    &lt;entityFramework&gt;
      &lt;defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework"/&gt;
    &lt;/entityFramework&gt;
    &lt;connectionStrings&gt;
      &lt;add name="DefaultConnection" providerName="System.Data.SqlClient" connectionString="Data Source=(LocalDb)\v11.0;Initial Catalog=aspnet-QSmartRectification-20120731104636;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\aspnet-QSmartRectification-20120731104636.mdf"/&gt;
    &lt;/connectionStrings&gt;
    &lt;system.serviceModel&gt;
      &lt;bindings&gt;
        &lt;basicHttpBinding&gt;
          &lt;binding name="Synchronise" /&gt;
        &lt;/basicHttpBinding&gt;
      &lt;/bindings&gt;
      &lt;client&gt;
        &lt;endpoint address="http://172.30.66.20/QSmart/Synchronise/" binding="basicHttpBinding"
          bindingConfiguration="Synchronise" contract="QSmartRectificationProvider.ISyncProvider"
          name="Synchronise" /&gt;
      &lt;/client&gt;
    &lt;/system.serviceModel&gt;
  &lt;/configuration&gt;
  </code></pre>