SessionStateSection.Providers Property

 

Gets the current ProviderSettingsCollection providers.

Namespace:   System.Web.Configuration
Assembly:  System.Web (in System.Web.dll)

[ConfigurationPropertyAttribute("providers")]
public ProviderSettingsCollection Providers { get; }

Property Value

Type: System.Configuration.ProviderSettingsCollection

The collection containing the SessionStateSection providers.

This property refers to the information contained by the configuration tag identified by the providers element.

The following code example demonstrates how to get the Providers property. Refer to the code example in the SessionStateSection class topic to learn how to access the SessionStateSection object.

// Display elements of the Providers collection property.
foreach (ProviderSettings providerItem in sessionStateSection.Providers)
{
  Console.WriteLine();
  Console.WriteLine("Provider Details:");
  Console.WriteLine("Name: {0}", providerItem.Name);
  Console.WriteLine("Type: {0}", providerItem.Type);
}

.NET Framework
Available since 2.0
Return to top
Show: