Freigeben über


remove-Element für providers für profile (ASP.NET-Einstellungsschema)

Entfernt eine Profilanbieterinstanz aus der Auflistung der Benutzerprofilanbieter.

Dieses Element ist neu in .NET Framework, Version 2.0.

<remove name=" provider name" />

Attribute und Elemente

In den folgenden Abschnitten werden Attribute, untergeordnete Elemente und übergeordnete Elemente beschrieben.

Attribute

Attribut

Beschreibung

name

Erforderliches String-Attribut.

Der Name des aus der Auflistung zu entfernenden Profilanbieterobjekts.

Untergeordnete Elemente

Keine.

Übergeordnete Elemente

Element

Beschreibung

configuration

Gibt das erforderliche Stammelement in jeder Konfigurationsdatei an, die von der Common Language Runtime und den .NET Framework-Anwendungen verwendet wird.

system.web

Gibt das Stammelement für den ASP.NET-Konfigurationsabschnitt an.

profile

Konfiguriert das Benutzerprofil für eine Anwendung.

providers

Definiert eine Auflistung von Profilanbietern für das Benutzerprofil.

Hinweise

Informationen darüber, wie Sie im Anwendungscode auf Konfigurationswerte für das profile-Element zugreifen und diese ändern können, finden Sie unter ProfileSection.

Beispiel

Das folgende Codebeispiel veranschaulicht, wie eine ASP.NET-Anwendung konfiguriert wird, damit sie den SqlProfileProvider-Anbieter zum Speichern und Abrufen von Profilinformationen verwendet. Mithilfe des <remove>-Elements wird vor dem Hinzufügen des neuen SqlProfileProvider die Instanz des standardmäßigen SQL Server-Profilanbieters entfernt.

<configuration>
  <connectionStrings>
    <add name="SqlServices" connectionString="Data Source=localhost;Integrated Security=SSPI;Initial 
         Catalog=aspnetdb;" />
  </connectionStrings>

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

    <authorization>
      <deny users="?" />
    </authorization>

    <membership defaultProvider="SqlProvider" userIsOnlineTimeWindow="15">
      <providers>
        <clear/>
        <add name="SqlProvider" 
             type="System.Web.Security.SqlMembershipProvider" 
             connectionStringName="SqlServices"
             applicationName="SampleApplication"
             enablePasswordRetrieval="true"
             enablePasswordReset="true"
             passwordFormat="Encrypted"
             requiresQuestionAndAnswer="true" />
      </providers>
    </membership>

    <profile defaultProvider="SqlProvider">
      <providers>
        <remove name="AspNetSqlProvider" />
        <add name="SqlProvider"
             type="System.Web.Profile.SqlProfileProvider"
             connectionStringName="SqlServices"
             applicationName="SampleApplication"
             description="SqlProfileProvider for SampleApplication" />
      </providers>

      <properties>
        <add name="ZipCode" />
        <add name="CityAndState" />
      </properties>
    </profile>
  </system.web>
</configuration>

Elementinformationen

Konfigurationsabschnittshandler

System.Web.Configuration.ProfileSection

Konfigurationsmember

ProfileSection.Providers

Konfigurierbare Speicherorte

Machine.config

Web.config auf der Stammebene

Web.config auf der Anwendungsebene

Anforderungen

Microsoft Internetinformationsdienste (IIS), Version 5.0, 5.1 oder 6.0

.NET Framework, Version 2.0

Microsoft Visual Studio 2005

Siehe auch

Aufgaben

Gewusst wie: Sperren von ASP.NET-Konfigurationseinstellungen

Referenz

profile-Element (ASP.NET-Einstellungsschema)

system.web-Element (ASP.NET-Einstellungsschema)

<configuration>-Element

add-Element für providers für profile (ASP.NET-Einstellungsschema)

clear-Element für providers für profile (ASP.NET-Einstellungsschema)

ProfileSection

System.Configuration

System.Web.Configuration

Konzepte

Übersicht über ASP.NET-Profileigenschaften

Übersicht über die ASP.NET-Konfiguration

ASP.NET-Webserversteuerelemente und Browserfunktionen

Absichern der ASP.NET-Konfiguration

ASP.NET-Konfigurationsszenarios

Weitere Ressourcen

ASP.NET-Konfigurationsdateien

ASP.NET-Konfigurationseinstellungen

Allgemeine Konfigurationseinstellungen (ASP.NET)

ASP.NET-Konfigurations-API