How to secure Elmah.axd?

后端 未结 7 2188
温柔的废话
温柔的废话 2020-12-08 00:43

We\'re using Elmah as our error logging system for an app that will be going into production soon. It\'s extremely useful, but if it goes into production like this anyone in

7条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-08 01:08

    If you're using ASP.NET Membership, it's pretty easy to restrict access to the elmah.axd HttpHandler for anonymous users and only allow logged in users in an "Administrators" group. I've done it like this:

    
      ...
      
        
          
            
            
          
        
      
    
    

    Anybody who's logged in AND member of the "Administrators" role can access the page now.

提交回复
热议问题