Detecting Web.Config Authentication Mode

前端 未结 5 1305
故里飘歌
故里飘歌 2021-02-13 09:15

Say I have the following web.config:



    
        

        
5条回答
  •  不思量自难忘°
    2021-02-13 10:09

    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.

提交回复
热议问题