MVC website - how to prevent access to static files

前端 未结 1 1693
后悔当初
后悔当初 2021-01-25 09:37

I have a MVC website, without authentication. In the website directory I have a folder \\ProjectNotes which contains a file inside, Notes.txt. Neither this folder nor the text f

1条回答
  •  孤城傲影
    2021-01-25 10:22

    You should use Web.Config file for your case. Add to your root Web.Config file into section:

    
      
        
          
        
      
    
    

    Actually, your question has nothing with MVC, but with IIS restrictions (Or other web server restrictions but I assume you using IIS)

    0 讨论(0)
提交回复
热议问题