Skip to content

Karol memo

IT, dev, C#, .NET, blockchain, smart contracts, advices, problems and nutshell solutions

  • Blog
  • About
  • Contact

Tag Archives: ActionResult

FileResult in controller and returning NotFound

Return NotFound() in FileResult. Just change return type to ActionResult, because FileResult inherits from ActionResult. And then it is possible to return NotFound() e.g. when object equals null. So FileResult -> ActionResult, something like this:

Posted byKarol NOctober 31, 2020October 31, 2020Posted in.NET, C#, dev, IT, programmingTags:ActionResult, FileResult, NotFoundLeave a comment on FileResult in controller and returning NotFound
  • Blog
  • About
  • Contact
Karol memo, Create a website or blog at WordPress.com
  • Follow Following
    • Karol memo
    • Already have a WordPress.com account? Log in now.
    • Karol memo
    • Customize
    • Follow Following
    • Sign up
    • Log in
    • Report this content
    • View site in Reader
    • Manage subscriptions
    • Collapse this bar