the static file middleware allows returning static files. this middleware must come before razor page and mvc. so us your program.cs
How to fix No webpage was found for the web address
Created a new App service, and to test the web app, manually uploaded a image under WWWROOT directory in app service editor and the uploaded image was accessible through url "https://domainname/image.png" but on publishing a .net core application the above url throws page not found error but the controller functionality in the .net core works fine as expected, how to fix this I want to access all the static files under WWWROOT to be accessible using the url domainname/documentnamen, tried many ways like
adding app.UseStaticFiles(); in program.cs
can anyone help me on how to fix the above issue?