Deny access to 'admin' folder in web.config

前端 未结 1 554
时光取名叫无心
时光取名叫无心 2020-12-05 08:04

I am new to ASP.NET, so forgive me if this is simple.

I am trying to deny access to my \'Admin\' folder via web.config. I looked at another answer to a similar ques

1条回答
  •  醉话见心
    2020-12-05 08:24

    This is way back from my web form days.

    Place a web.config in your admin folder.

    The contents should be:

    
    
        
            
              
              
            
        
    
    

    ** EDIT to answer your question If you set the login url the framework will automatically send you to the login page if an unauthorized user tries to access your admin folder.

            
                
    
    

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