2
votes

I have a JSON file and want to view it directly in the web browser. when I attempt to access the file via its route it returns 404.

How can I view the JSON file?

1

1 Answers

0
votes
  1. Move the files inside of the wwwroot folder directory
  2. Set the UseStaticFiles variable in your SetUp file

    public void Configure(IApplicationBuilder app) { app.UseStaticFiles(); }

Referene Here