Detecting Web.Config Authentication Mode

前端 未结 5 1168
遥遥无期
遥遥无期 2021-02-13 09:39

Say I have the following web.config:



    
        

        
5条回答
  •  走了就别回头了
    2021-02-13 10:19

    The mode property from the authenticationsection: AuthenticationSection.Mode Property (System.Web.Configuration). And you can even modify it.

    // Get the current Mode property.
    AuthenticationMode currentMode = 
        authenticationSection.Mode;
    
    // Set the Mode property to Windows.
    authenticationSection.Mode = 
        AuthenticationMode.Windows;
    

    This article describes how to get a reference to the AuthenticationSection.

提交回复
热议问题