title: Image not showing on IIS when MVC app is hosted on IIS..works on ASP.NET Devlopment server just fine
body: <p>I have a view which looks like this
  {{img src="/Scenario/Status/id" alt="status" /}}</p>
  
  <p>(replace &lt;> these {} above )</p>
  
  <p>and this is the code in action of the controller</p>
  
  <pre><code>    public ActionResult Status(int? id)
      {
          // Calculate the status
          int no = new Random().Next(0, 2);
          string file = "green.jpg";
          if (no == 0)
          {
              file = "red.jpg";
          }
          else if (no == 1)
          {
              file = "yellow.jpg";
          }
          else if (no == 2)
          {
              file = "green.jpg";
          }
          var path = Server.MapPath("/Content/images/");
          var filePath = path + file;
  
          return new FileContentResult(System.IO.File.ReadAllBytes(filePath), "image/jpeg");
      }
  </code></pre>
  
  <p>This works just fine when i run on visualstudio. But when i deploy it to local IIS, I dont see these images.
  I checked that the "StaticContent" option is checked in Windows Features under IIS and also that the MIME type is enabled on IIS. I also checked that the *.jpg files are present under "inetpub" folder of my app after I publish from visual studio. Since i'm using virtual path for images and not hardcofing the filenames , it should work...</p>
  
  <p>I just tried this </p>
  
  <p>{{img src="../Content/Images/Green.jpg" alt="status" /}} and that works too.. :(</p>
  
  <p>What else could be wrong?</p>