ServiceDebugElement Class

 

Represents a configuration element that specifies debugging and help information features for a Windows Communication Foundation (WCF) service. This class cannot be inherited.

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


public ref class ServiceDebugElement sealed : BehaviorExtensionElement

NameDescription
System_CAPS_pubmethodServiceDebugElement()

Initializes a new instance of the ServiceDebugElement class.

NameDescription
System_CAPS_pubpropertyBehaviorType

Gets the type of this behavior element.(Overrides BehaviorExtensionElement::BehaviorType.)

System_CAPS_pubpropertyConfigurationElementName

Gets the name of this configuration element.(Inherited from ServiceModelExtensionElement.)

System_CAPS_pubpropertyCurrentConfiguration

Gets a reference to the top-level Configuration instance that represents the configuration hierarchy that the current ConfigurationElement instance belongs to.(Inherited from ConfigurationElement.)

System_CAPS_pubpropertyElementInformation

Gets an ElementInformation object that contains the non-customizable information and functionality of the ConfigurationElement object. (Inherited from ConfigurationElement.)

System_CAPS_protpropertyElementProperty

Gets the ConfigurationElementProperty object that represents the ConfigurationElement object itself.(Inherited from ConfigurationElement.)

System_CAPS_pubpropertyHttpHelpPageBinding

Gets or sets a string value that specifies the binding to be used when HTTP is utilized to access the service help page.

System_CAPS_pubpropertyHttpHelpPageBindingConfiguration

Gets or sets a string that points to an XML section defining additional configuration information for the binding specified in HttpHelpPageBinding.

System_CAPS_pubpropertyHttpHelpPageEnabled

Gets or sets a value that indicates whether Windows Communication Foundation (WCF) publishes an HTML help page at the address specified by the HttpHelpPageUrl property.

System_CAPS_pubpropertyHttpHelpPageUrl

Gets or sets the location at which the HTML help file is published.

System_CAPS_pubpropertyHttpsHelpPageBinding

Gets or sets a string value that specifies the binding to be used when HTTPS is utilized to access the service help page.

System_CAPS_pubpropertyHttpsHelpPageBindingConfiguration

Gets or sets a string that points to an XML section defining additional configuration information for the binding specified in HttpsHelpPageBinding.

System_CAPS_pubpropertyHttpsHelpPageEnabled

Gets or sets a value that specifies whether Windows Communication Foundation (WCF) returns an HTML help file over HTTPS at the address specified by the HttpsHelpPageUrl property.

System_CAPS_pubpropertyHttpsHelpPageUrl

Gets or sets the location at which an HTML help file is published for retrieval using HTTPS.

System_CAPS_pubpropertyIncludeExceptionDetailInFaults

Gets or sets a value that specifies whether to include managed exception information in the detail of SOAP faults returned to the client for debugging purposes.

System_CAPS_protpropertyItem[ConfigurationProperty^]

Gets or sets a property or attribute of this configuration element.(Inherited from ConfigurationElement.)

System_CAPS_protpropertyItem[String^]

Gets or sets a property, attribute, or child element of this configuration element.(Inherited from ConfigurationElement.)

System_CAPS_pubpropertyLockAllAttributesExcept

Gets the collection of locked attributes.(Inherited from ConfigurationElement.)

System_CAPS_pubpropertyLockAllElementsExcept

Gets the collection of locked elements.(Inherited from ConfigurationElement.)

System_CAPS_pubpropertyLockAttributes

Gets the collection of locked attributes (Inherited from ConfigurationElement.)

System_CAPS_pubpropertyLockElements

Gets the collection of locked elements.(Inherited from ConfigurationElement.)

System_CAPS_pubpropertyLockItem

Gets or sets a value indicating whether the element is locked.(Inherited from ConfigurationElement.)

System_CAPS_protpropertyProperties

Gets the collection of properties.(Inherited from ConfigurationElement.)

NameDescription
System_CAPS_pubmethodCopyFrom(ServiceModelExtensionElement^)

Copies the content of the specified configuration element to this configuration element.(Overrides ServiceModelExtensionElement::CopyFrom(ServiceModelExtensionElement^).)

System_CAPS_protmethodCreateBehavior()

Creates a behavior extension based on the current configuration settings.(Inherited from BehaviorExtensionElement.)

System_CAPS_protmethodDeserializeElement(XmlReader^, Boolean)

Reads XML from the configuration file.(Inherited from ConfigurationElement.)

System_CAPS_pubmethodEquals(Object^)

Compares the current ConfigurationElement instance to the specified object.(Inherited from ConfigurationElement.)

System_CAPS_pubmethodGetHashCode()

Gets a unique value representing the current ConfigurationElement instance.(Inherited from ConfigurationElement.)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_protmethodInit()

Sets the ConfigurationElement object to its initial state.(Inherited from ConfigurationElement.)

System_CAPS_protmethodInitializeDefault()

Used to initialize a default set of values for the ConfigurationElement object.(Inherited from ConfigurationElement.)

System_CAPS_protmethodIsModified()

Indicates whether this configuration element has been modified since it was last saved or loaded, when implemented in a derived class.(Inherited from ConfigurationElement.)

System_CAPS_pubmethodIsReadOnly()

Gets a value indicating whether the ConfigurationElement object is read-only.(Inherited from ConfigurationElement.)

System_CAPS_protmethodReset(ConfigurationElement^)

Resets the internal state of the ConfigurationElement object, including the locks and the properties collections.(Inherited from ConfigurationElement.)

System_CAPS_protmethodResetModified()

Resets the value of the IsModified method to false when implemented in a derived class.(Inherited from ConfigurationElement.)

System_CAPS_protmethodSerializeElement(XmlWriter^, Boolean)

Writes the contents of this configuration element to the configuration file when implemented in a derived class.(Inherited from ConfigurationElement.)

System_CAPS_protmethodSerializeToXmlElement(XmlWriter^, String^)

Writes the outer tags of this configuration element to the configuration file when implemented in a derived class.(Inherited from ConfigurationElement.)

System_CAPS_protmethodSetReadOnly()

Sets the IsReadOnly property for the ConfigurationElement object and all subelements.(Inherited from ConfigurationElement.)

System_CAPS_pubmethodToString()

Returns a string that represents the current object.(Inherited from Object.)

System_CAPS_protmethodUnmerge(ConfigurationElement^, ConfigurationElement^, ConfigurationSaveMode)

Modifies the ConfigurationElement object to remove all values that should not be saved. (Inherited from ConfigurationElement.)

If you set the IncludeExceptionDetailInFaults property to true programmatically, you can enable the flow of managed exception information to the client for debugging purposes, as well as the publication of HTML information files for users browsing the service in Web browsers.

System_CAPS_cautionCaution

Returning managed exception information to services can be a security risk. This is because exception details expose information about the internal client implementation that could be used by unauthorized services.

The HttpHelpPageEnabled and HttpsHelpPageEnabled properties instruct the service to publish HTML help files when the service is viewed using an HTML browser.

The HttpHelpPageUrl and HttpsHelpPageUrl properties control the location of the HTML help page that is viewed.

To enable or disable one of the ServiceDebugElement features using a configuration file, you must:

  1. Add a behaviorConfiguration attribute to the <service> element for your WCF service. (Endpoint behaviors are configured on <endpoint> elements; service behaviors on <service> elements.)

  2. Add to or create a <serviceBehaviors> section and add a <behavior> of <endpointBehaviors> element to that with the name that matches the behaviorConfiguration attribute value from step 1. (Endpoint behaviors are configured using an <endpointBehaviors> element; service behaviors are configured using a <serviceBehaviors> element.

  3. Add a <serviceDebug> element to the <behavior> of <endpointBehaviors> element from step 2 and enable or disable the various properties appropriate to your scenario.

For a specific example, see the Example section.

The following code example shows how to use a configuration file to enable the HTML help page feature and return exception information inside a SOAP fault back to the client for debugging purposes (in addition to enabling metadata support).

.NET Framework
Available since 3.0

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show: