I have a controller action that downloads a file from an azure blob based on the container reference name (i.e. full path name of the file in the blob). The code looks somet
NotFound()
Your controller must inherit of Controller and the method must return ActionResult
Controller
ActionResult
Example:
public ActionResult GetFile(string path) { if (!File.Exists(path)) { return NotFound(); } return new FileContentResult(File.ReadAllBytes(path), "application/octet-stream"); }