ScriptingProfileServiceSection Klasa

Definicja

Reprezentuje sekcję konfiguracji ustawień profilu usługi. Klasa ta nie może być dziedziczona.

public ref class ScriptingProfileServiceSection sealed : System::Configuration::ConfigurationSection
public sealed class ScriptingProfileServiceSection : System.Configuration.ConfigurationSection
type ScriptingProfileServiceSection = class
    inherit ConfigurationSection
Public NotInheritable Class ScriptingProfileServiceSection
Inherits ConfigurationSection
Dziedziczenie
ScriptingProfileServiceSection

Przykłady

W poniższym przykładzie pokazano, jak deklaratywnie określić wartości właściwości ScriptingProfileServiceSection klasy w pliku konfiguracji.

<system.web.extensions>
  <scripting>
    <webServices>
      <profileService enabled="true"
        readAccessProperties="FirstName,LastName"
        writeAccessProperties="FirstName,LastName" />
    </webServices>
  </scripting>
</system.web.extensions>

W poniższym przykładzie pokazano, jak programowo uzyskać dostęp do ScriptingProfileServiceSection sekcji.

// Get the Web application configuration.
System.Configuration.Configuration configuration =
    WebConfigurationManager.OpenWebConfiguration("/aspnetTest");

// Get the external Web services section.
ScriptingWebServicesSectionGroup webServicesSection =
    (ScriptingWebServicesSectionGroup)configuration.GetSectionGroup(
    "system.web.extensions/scripting/webServices");

// Get the profile service section.
ScriptingProfileServiceSection profileSection =
    webServicesSection.ProfileService;
' Get the Web application configuration.
Dim configuration As System.Configuration.Configuration = _
    WebConfigurationManager.OpenWebConfiguration("/aspnetTest")

' Get the external Web services section.
Dim webServicesSection As ScriptingWebServicesSectionGroup = _
    CType(configuration.GetSectionGroup( _
    "system.web.extensions/scripting/webServices"), ScriptingWebServicesSectionGroup)

' Get the profile service section.
Dim profileSection _
    As ScriptingProfileServiceSection = _
    webServicesSection.ProfileService

Uwagi

Klasa ScriptingProfileServiceSection umożliwia programowy dostęp i modyfikowanie profileService elementu konfiguracji dla aplikacji ASP.NET korzystających z funkcji AJAX.

Usługa profilu służy do pobierania i ustawiania właściwości profilu dla tożsamości użytkownika skojarzonej z bieżącym żądaniem. Oznacza to, że usługa profilu działa dla uwierzytelnionych użytkowników. Działa również w przypadku użytkowników anonimowych, gdy funkcja identyfikacji anonimowej jest włączona (lub dostępna) w pliku konfiguracji.

Konstruktory

Nazwa Opis
ScriptingProfileServiceSection()

Inicjuje nowe wystąpienie klasy ScriptingProfileServiceSection.

Właściwości

Nazwa Opis
CurrentConfiguration

Pobiera odwołanie do wystąpienia najwyższego poziomu Configuration, które reprezentuje hierarchię konfiguracji, do którego należy bieżące wystąpienie ConfigurationElement.

(Odziedziczone po ConfigurationElement)
ElementInformation

Pobiera obiekt ElementInformation zawierający informacje i funkcje obiektu ConfigurationElement, które nie można dostosowywać.

(Odziedziczone po ConfigurationElement)
ElementProperty

Pobiera obiekt ConfigurationElementProperty reprezentujący sam obiekt ConfigurationElement.

(Odziedziczone po ConfigurationElement)
Enabled

Pobiera lub ustawia wartość wskazującą, czy usługa profilu jest dostępna w aplikacji ASP.NET z obsługą AJAX.

EvaluationContext

Pobiera obiekt ContextInformation dla obiektu ConfigurationElement.

(Odziedziczone po ConfigurationElement)
HasContext

Pobiera wartość wskazującą, czy właściwość CurrentConfiguration jest null.

(Odziedziczone po ConfigurationElement)
Item[ConfigurationProperty]

Pobiera lub ustawia właściwość lub atrybut tego elementu konfiguracji.

(Odziedziczone po ConfigurationElement)
Item[String]

Pobiera lub ustawia właściwość, atrybut lub element podrzędny tego elementu konfiguracji.

(Odziedziczone po ConfigurationElement)
LockAllAttributesExcept

Pobiera kolekcję zablokowanych atrybutów.

(Odziedziczone po ConfigurationElement)
LockAllElementsExcept

Pobiera kolekcję zablokowanych elementów.

(Odziedziczone po ConfigurationElement)
LockAttributes

Pobiera kolekcję zablokowanych atrybutów.

(Odziedziczone po ConfigurationElement)
LockElements

Pobiera kolekcję zablokowanych elementów.

(Odziedziczone po ConfigurationElement)
LockItem

Pobiera lub ustawia wartość wskazującą, czy element jest zablokowany.

(Odziedziczone po ConfigurationElement)
Properties

Pobiera kolekcję właściwości.

(Odziedziczone po ConfigurationElement)
ReadAccessProperties

Pobiera lub ustawia właściwości profilu dostępu do odczytu.

SectionInformation

Pobiera obiekt SectionInformation zawierający informacje i funkcje obiektu ConfigurationSection, które nie można dostosowywać.

(Odziedziczone po ConfigurationSection)
WriteAccessProperties

Pobiera lub ustawia właściwości profilu dostępu do zapisu.

Metody

Nazwa Opis
DeserializeElement(XmlReader, Boolean)

Odczytuje kod XML z pliku konfiguracji.

(Odziedziczone po ConfigurationElement)
DeserializeSection(XmlReader)

Odczytuje kod XML z pliku konfiguracji.

(Odziedziczone po ConfigurationSection)
Equals(Object)

Porównuje bieżące wystąpienie ConfigurationElement z określonym obiektem.

(Odziedziczone po ConfigurationElement)
GetHashCode()

Pobiera unikatową wartość reprezentującą bieżące wystąpienie ConfigurationElement.

(Odziedziczone po ConfigurationElement)
GetRuntimeObject()

Zwraca obiekt niestandardowy podczas zastępowania w klasie pochodnej.

(Odziedziczone po ConfigurationSection)
GetTransformedAssemblyString(String)

Zwraca przekształconą wersję określonej nazwy zestawu.

(Odziedziczone po ConfigurationElement)
GetTransformedTypeString(String)

Zwraca przekształconą wersję określonej nazwy typu.

(Odziedziczone po ConfigurationElement)
GetType()

Pobiera Type bieżącego wystąpienia.

(Odziedziczone po Object)
Init()

Ustawia obiekt ConfigurationElement na stan początkowy.

(Odziedziczone po ConfigurationElement)
InitializeDefault()

Służy do inicjowania domyślnego zestawu wartości dla obiektu ConfigurationElement.

(Odziedziczone po ConfigurationElement)
IsModified()

Wskazuje, czy ten element konfiguracji został zmodyfikowany od czasu ostatniego zapisania, czy załadowany podczas implementacji w klasie pochodnej.

(Odziedziczone po ConfigurationSection)
IsReadOnly()

Pobiera wartość wskazującą, czy obiekt ConfigurationElement jest tylko do odczytu.

(Odziedziczone po ConfigurationElement)
ListErrors(IList)

Dodaje błędy nieprawidłowej właściwości w tym obiekcie ConfigurationElement i we wszystkich elementach podrzędnych do przekazanej listy.

(Odziedziczone po ConfigurationElement)
MemberwiseClone()

Tworzy płytkią kopię bieżącego Object.

(Odziedziczone po Object)
OnDeserializeUnrecognizedAttribute(String, String)

Pobiera wartość wskazującą, czy podczas deserializacji napotkano nieznany atrybut.

(Odziedziczone po ConfigurationElement)
OnDeserializeUnrecognizedElement(String, XmlReader)

Pobiera wartość wskazującą, czy podczas deserializacji napotkano nieznany element.

(Odziedziczone po ConfigurationElement)
OnRequiredPropertyNotFound(String)

Zgłasza wyjątek, gdy nie można odnaleźć wymaganej właściwości.

(Odziedziczone po ConfigurationElement)
PostDeserialize()

Wywoływana po deserializacji.

(Odziedziczone po ConfigurationElement)
PreSerialize(XmlWriter)

Wywoływana przed serializacji.

(Odziedziczone po ConfigurationElement)
Reset(ConfigurationElement)

Resetuje stan wewnętrzny obiektu ConfigurationElement, w tym blokady i kolekcje właściwości.

(Odziedziczone po ConfigurationElement)
ResetModified()

Resetuje wartość metody IsModified(), aby false po zaimplementowaniu w klasie pochodnej.

(Odziedziczone po ConfigurationSection)
SerializeElement(XmlWriter, Boolean)

Zapisuje zawartość tego elementu konfiguracji w pliku konfiguracji po zaimplementowaniu w klasie pochodnej.

(Odziedziczone po ConfigurationElement)
SerializeSection(ConfigurationElement, String, ConfigurationSaveMode)

Tworzy ciąg XML zawierający niezaergowany widok obiektu ConfigurationSection jako pojedynczą sekcję do zapisu w pliku.

(Odziedziczone po ConfigurationSection)
SerializeToXmlElement(XmlWriter, String)

Zapisuje zewnętrzne tagi tego elementu konfiguracji do pliku konfiguracji po zaimplementowaniu w klasie pochodnej.

(Odziedziczone po ConfigurationElement)
SetPropertyValue(ConfigurationProperty, Object, Boolean)

Ustawia właściwość na określoną wartość.

(Odziedziczone po ConfigurationElement)
SetReadOnly()

Ustawia właściwość IsReadOnly() dla obiektu ConfigurationElement i wszystkich podelementów.

(Odziedziczone po ConfigurationElement)
ShouldSerializeElementInTargetVersion(ConfigurationElement, String, FrameworkName)

Wskazuje, czy określony element powinien być serializowany, gdy hierarchia obiektów konfiguracji jest serializowana dla określonej wersji docelowej platformy .NET.

(Odziedziczone po ConfigurationSection)
ShouldSerializePropertyInTargetVersion(ConfigurationProperty, String, FrameworkName, ConfigurationElement)

Wskazuje, czy określona właściwość powinna być serializowana, gdy hierarchia obiektów konfiguracji jest serializowana dla określonej wersji docelowej programu .NET Framework.

(Odziedziczone po ConfigurationSection)
ShouldSerializeSectionInTargetVersion(FrameworkName)

Wskazuje, czy bieżące wystąpienie ConfigurationSection powinno być serializowane, gdy hierarchia obiektów konfiguracji jest serializowana dla określonej wersji docelowej programu .NET Framework.

(Odziedziczone po ConfigurationSection)
ToString()

Zwraca ciąg reprezentujący bieżący obiekt.

(Odziedziczone po Object)
Unmerge(ConfigurationElement, ConfigurationElement, ConfigurationSaveMode)

Modyfikuje obiekt ConfigurationElement, aby usunąć wszystkie wartości, które nie powinny być zapisywane.

(Odziedziczone po ConfigurationElement)

Dotyczy

Zobacz też