AnonymousIdentificationModule.Enabled Propriété

Définition

Obtient une valeur qui indique si l'identification anonyme est activée pour l'application ASP.NET.

public:
 static property bool Enabled { bool get(); };
public static bool Enabled { get; }
static member Enabled : bool
Public Shared ReadOnly Property Enabled As Boolean

Valeur de propriété

truesi l'identification anonyme est activée pour l'application ASP.NET; sinon, false. La valeur par défaut est false.

Exemples

L’exemple de code suivant montre un fichier Web.config pour une application qui permet l’identification anonyme.

<configuration>  
  <system.web>  
    <authentication mode="Forms" >  
      <forms loginUrl="login.aspx" name=".ASPXFORMSAUTH" />  
    </authentication>  

    <anonymousIdentification enabled="true" />  

    <profile defaultProvider="AspNetSqlProvider">  
      <properties>  
        <add name="ZipCode" allowAnonymous="true" />  
        <add name="CityAndState" allowAnonymous="true" />  
        <add name="StockSymbols" type="System.Collections.ArrayList"   
          allowAnonymous="true" />  
      </properties>  
    </profile>  
  </system.web>  
</configuration>  

S’applique à