get 404 when trying to access files directly [duplicate]

僤鯓⒐⒋嵵緔 提交于 2019-12-02 10:27:31

Under a default configuration WebAPI won't serve static files for you. You need to either

  • Set up a controller on the WebAPI endpoint that will get the files and return a FileResult
  • Configure static file handling middleware

9 times out of 10 you'll want the second one. Note that the default configuration for Microsoft's static file middleware is to serve static content out of wwwroot so you'll probably need to put your images folder there.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!