This article is a mirror article of machine translation, please click here to jump to the original article.

View: 12205|Reply: 0

[.NET Core] Downloading the exe file in asp.net core returns a 404 error solution

[Copy link]
Posted on 11/25/2019 4:00:01 PM | | |
When using asp.net mvc core, when accessing files in static directories, some uncommonly used formats will report a 404 error, this article takes exe format as an example.

Add the following code to the Configure method in StartUp

The reason is that there is no content-type of exe by default.


.*( binary stream, don't know the download file type) application/octet-stream




Previous:(EntityFrameworkCore) EF Core automatically migrates and upgrades databases
Next:Holidays · API, offline, and easy to call by yourself (2019-2020)
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com