Generally directory browsing can be controlled from IIS, but in dot net core, it need to configure in middleware startup. below code snipped will help you to do this: Then run the program and specify it in the URLstaticfileDirPath, you will see staticfileDirAll contents under the folder.
To use static file, you must Add Microsoft.AspNetCore.StaticFiles to the request pipeline of asp.net core Basic information configurationThe following code shows how to configure the static file Middleware in startup. Still dot net core routing not allowed you to access static folder content untill you configure your folder/directory path. following below link will help you […]