public ActionResult ViewAd(string id) { var ad = AdRotator.GetAdById(id); if (ad != null) { bool addImpression = this.Request.QueryString["noimpression"] == null; if (addImpression) { StoredProcs.AdImpressions_IncrementCount(ad.FileName, DateTime.Now.Date, 1).Execute(); } return(File(ad.DiskPath, MimeMapping.GetMimeMapping(ad.DiskPath))); } Logger.Error("Invalid Ad attempted to be loaded from: /fblast/{0}", id); return(HttpNotFound()); }
public ActionResult ViewAd(string id) { var ad = AdRotator.GetAdById(id); return(File(ad.DiskPath, MimeMapping.GetMimeMapping(ad.DiskPath))); }