etag

Cache headers for MVC File Action Result (ASP.NET Core 2.0)

You typically work with one of the following action results when you want to write a file to the response. FileContentResult (writes a binary file to response) FileStreamResult (writes a file from a stream to the response) VirtualFileResult (writes a file specified using a virtual path to the response) These are all coming from ASP.NET Core's MVC package. In earlier version of ASP.NET Core (1.*); using these action results, you could have served files but there wasn't any way of configuring cache headers for the responses. I'm pretty…

Keep reading