CustomErrorsSection.Errors Özellik
Tanım
Önemli
Bazı bilgiler ürünün ön sürümüyle ilgilidir ve sürüm öncesinde önemli değişiklikler yapılmış olabilir. Burada verilen bilgilerle ilgili olarak Microsoft açık veya zımni hiçbir garanti vermez.
Nesnelerin koleksiyonunu CustomError alır.
public:
property System::Web::Configuration::CustomErrorCollection ^ Errors { System::Web::Configuration::CustomErrorCollection ^ get(); };
[System.Configuration.ConfigurationProperty("", IsDefaultCollection=true)]
public System.Web.Configuration.CustomErrorCollection Errors { get; }
[<System.Configuration.ConfigurationProperty("", IsDefaultCollection=true)>]
member this.Errors : System.Web.Configuration.CustomErrorCollection
Public ReadOnly Property Errors As CustomErrorCollection
Özellik Değeri
CustomErrorCollection Özel hataları içeren bir.
- Öznitelikler
Örnekler
Aşağıdaki kod örneği koleksiyonun Errors nasıl kullanılacağını gösterir.
// Get the Web application configuration.
System.Configuration.Configuration configuration =
WebConfigurationManager.OpenWebConfiguration(
"/aspnetTest");
// Get the section.
CustomErrorsSection customErrorsSection =
(CustomErrorsSection)configuration.GetSection(
"system.web/customErrors");
// Get the collection
CustomErrorCollection customErrorsCollection =
customErrorsSection.Errors;
' Get the Web application configuration.
Dim configuration _
As System.Configuration.Configuration = _
WebConfigurationManager.OpenWebConfiguration( _
"/aspnetTest")
' Get the section.
Dim customErrorsSection _
As CustomErrorsSection = _
CType(configuration.GetSection( _
"system.web/customErrors"), _
CustomErrorsSection)
' Get the collection
Dim customErrorsCollection _
As CustomErrorCollection = customErrorsSection.Errors
Açıklamalar
Her hata bir özel hata koşuluyla ilişkilendirilir ve özel bir hata sayfası belirtir.