Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
533 lines (455 sloc) 43.1 KB
<Type Name="ServiceDebugBehavior" FullName="System.ServiceModel.Description.ServiceDebugBehavior">
<TypeSignature Language="C#" Value="public class ServiceDebugBehavior : System.ServiceModel.Description.IServiceBehavior" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit ServiceDebugBehavior extends System.Object implements class System.ServiceModel.Description.IServiceBehavior" />
<TypeSignature Language="DocId" Value="T:System.ServiceModel.Description.ServiceDebugBehavior" />
<TypeSignature Language="VB.NET" Value="Public Class ServiceDebugBehavior&#xA;Implements IServiceBehavior" />
<TypeSignature Language="C++ CLI" Value="public ref class ServiceDebugBehavior : System::ServiceModel::Description::IServiceBehavior" />
<TypeSignature Language="F#" Value="type ServiceDebugBehavior = class&#xA; interface IServiceBehavior" />
<AssemblyInfo>
<AssemblyName>System.ServiceModel</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Object</BaseTypeName>
</Base>
<Interfaces>
<Interface>
<InterfaceName>System.ServiceModel.Description.IServiceBehavior</InterfaceName>
</Interface>
</Interfaces>
<Docs>
<summary>Enables debugging and help information features for a Windows Communication Foundation (WCF) service.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Use the <xref:System.ServiceModel.Description.ServiceDebugBehavior> properties from a configuration file or programmatically to 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.
Set the <xref:System.ServiceModel.Description.ServiceDebugBehavior.IncludeExceptionDetailInFaults%2A> property to `true` to instruct WCF to return managed exception information in SOAP faults to clients for debugging purposes.
> [!CAUTION]
> Returning managed exception information to clients can be a security risk because exception details expose information about the internal service implementation that could be used by unauthorized clients. In addition, although the <xref:System.ServiceModel.Description.ServiceDebugBehavior> properties can also be set programmatically, it can be easy to forget to disable <xref:System.ServiceModel.Description.ServiceDebugBehavior.IncludeExceptionDetailInFaults%2A> when deploying.
Because of the security issues involved, it is strongly recommended that:
- You use an application configuration file to set the value of the <xref:System.ServiceModel.Description.ServiceDebugBehavior.IncludeExceptionDetailInFaults%2A> property to `true`.
- You only do so only in controlled debugging scenarios.
For more information about the security issues related to managed exception information, see [Specifying and Handling Faults in Contracts and Services](~/docs/framework/wcf/specifying-and-handling-faults-in-contracts-and-services.md).
The <xref:System.ServiceModel.Description.ServiceDebugBehavior.HttpHelpPageEnabled%2A> and <xref:System.ServiceModel.Description.ServiceDebugBehavior.HttpsHelpPageEnabled%2A> properties instruct the service to publish HTML help files when the service is viewed using an HTML browser.
The <xref:System.ServiceModel.Description.ServiceDebugBehavior.HttpHelpPageUrl%2A> and <xref:System.ServiceModel.Description.ServiceDebugBehavior.HttpsHelpPageUrl%2A> properties control the location of the HTML help page that is viewed.
To enable or disable one of the <xref:System.ServiceModel.Description.ServiceDebugBehavior> features using a configuration file:
1. Add a `behaviorConfiguration` attribute to the [&lt;service&gt;](~/docs/framework/configure-apps/file-schema/wcf/service.md) element for your WCF service. Endpoint behaviors are configured on [\<endpoint>](https://msdn.microsoft.com/library/13aa23b7-2f08-4add-8dbf-a99f8127c017) elements; service behaviors on [&lt;service&gt;](~/docs/framework/configure-apps/file-schema/wcf/service.md) elements.
2. Add to or create a [&lt;serviceBehaviors&gt;](~/docs/framework/configure-apps/file-schema/wcf/servicebehaviors.md) section and add a [&lt;behavior&gt;](~/docs/framework/configure-apps/file-schema/wcf/behavior-of-endpointbehaviors.md) element to that with the name that matches the `behaviorConfiguration` attribute value from step 1. Endpoint behaviors are configured using an [&lt;endpointBehaviors&gt;](~/docs/framework/configure-apps/file-schema/wcf/endpointbehaviors.md) element; service behaviors are configured using a [&lt;serviceBehaviors&gt;](~/docs/framework/configure-apps/file-schema/wcf/servicebehaviors.md) element.
3. Add a [&lt;serviceDebug&gt;](~/docs/framework/configure-apps/file-schema/wcf/servicedebug.md) element to the [&lt;behavior&gt;](~/docs/framework/configure-apps/file-schema/wcf/behavior-of-endpointbehaviors.md) element from step 2 and enable or disable the various properties appropriate to your scenario.
For a specific example, see the Example section.
## Examples
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. This configuration file shows the following basic steps to adding support for the <xref:System.ServiceModel.Description.ServiceDebugBehavior> features:
- Because the <xref:System.ServiceModel.Description.ServiceDebugBehavior> type is an <xref:System.ServiceModel.Description.IServiceBehavior?displayProperty=nameWithType> implementation, the [&lt;service&gt;](~/docs/framework/configure-apps/file-schema/wcf/service.md) element that represents the service type has a behavior configuration identifier of `behaviorConfiguration="metadataAndDebug"`.
- Because the <xref:System.ServiceModel.Description.ServiceDebugBehavior> type is an <xref:System.ServiceModel.Description.IServiceBehavior?displayProperty=nameWithType> implementation a [&lt;behavior&gt;](~/docs/framework/configure-apps/file-schema/wcf/behavior-of-endpointbehaviors.md) element is added to a [&lt;serviceBehaviors&gt;](~/docs/framework/configure-apps/file-schema/wcf/servicebehaviors.md) section. Set the `name` attribute of the [&lt;behavior&gt;](~/docs/framework/configure-apps/file-schema/wcf/behavior-of-endpointbehaviors.md) element the value of which is the identifier of the `behaviorConfiguration` attribute of the [&lt;service&gt;](~/docs/framework/configure-apps/file-schema/wcf/service.md) element. In this case, the value is `metadataAndDebug`.
- Add a [&lt;serviceDebug&gt;](~/docs/framework/configure-apps/file-schema/wcf/servicedebug.md) element with the various attributes set to the desired configuration. In this case, the `httpHelpPageEnabled` and `includeExceptionDetailInFaults` attribute values are set to `true`.
[!code-xml[ServiceDebugBehaviorConfig#1](~/samples/snippets/csharp/VS_Snippets_CFX/servicedebugbehaviorconfig/cs/hostapplication.exe.config#1)]
]]></format>
</remarks>
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public ServiceDebugBehavior ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
<MemberSignature Language="DocId" Value="M:System.ServiceModel.Description.ServiceDebugBehavior.#ctor" />
<MemberSignature Language="VB.NET" Value="Public Sub New ()" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; ServiceDebugBehavior();" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System.ServiceModel</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters />
<Docs>
<summary>Initializes a new instance of the <see cref="T:System.ServiceModel.Description.ServiceDebugBehavior" /> class.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The constructor creates a <xref:System.ServiceModel.Description.ServiceDebugBehavior> object with the following defaults:
- The <xref:System.ServiceModel.Description.ServiceDebugBehavior.IncludeExceptionDetailInFaults%2A> property is `false`.
- The <xref:System.ServiceModel.Description.ServiceDebugBehavior.HttpHelpPageEnabled%2A> property is `true`.
- The <xref:System.ServiceModel.Description.ServiceDebugBehavior.HttpsHelpPageEnabled%2A> property is `true`.
- The <xref:System.ServiceModel.Description.ServiceDebugBehavior.HttpHelpPageUrl%2A> property is the base address of the service that supports HTTP requests.
- The <xref:System.ServiceModel.Description.ServiceDebugBehavior.HttpsHelpPageUrl%2A> is the base address of the service that supports HTTPS requests.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="HttpHelpPageBinding">
<MemberSignature Language="C#" Value="public System.ServiceModel.Channels.Binding HttpHelpPageBinding { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.ServiceModel.Channels.Binding HttpHelpPageBinding" />
<MemberSignature Language="DocId" Value="P:System.ServiceModel.Description.ServiceDebugBehavior.HttpHelpPageBinding" />
<MemberSignature Language="VB.NET" Value="Public Property HttpHelpPageBinding As Binding" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::ServiceModel::Channels::Binding ^ HttpHelpPageBinding { System::ServiceModel::Channels::Binding ^ get(); void set(System::ServiceModel::Channels::Binding ^ value); };" />
<MemberSignature Language="F#" Value="member this.HttpHelpPageBinding : System.ServiceModel.Channels.Binding with get, set" Usage="System.ServiceModel.Description.ServiceDebugBehavior.HttpHelpPageBinding" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.ServiceModel</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.ServiceModel.Channels.Binding</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets high-level access to the definition of a binding.</summary>
<value>A channel binding.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="HttpHelpPageEnabled">
<MemberSignature Language="C#" Value="public bool HttpHelpPageEnabled { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool HttpHelpPageEnabled" />
<MemberSignature Language="DocId" Value="P:System.ServiceModel.Description.ServiceDebugBehavior.HttpHelpPageEnabled" />
<MemberSignature Language="VB.NET" Value="Public Property HttpHelpPageEnabled As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property bool HttpHelpPageEnabled { bool get(); void set(bool value); };" />
<MemberSignature Language="F#" Value="member this.HttpHelpPageEnabled : bool with get, set" Usage="System.ServiceModel.Description.ServiceDebugBehavior.HttpHelpPageEnabled" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.ServiceModel</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8">
<AttributeName>System.ComponentModel.DefaultValue(true)</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>set: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets a value that controls whether Windows Communication Foundation (WCF) publishes an HTML help page at the address controlled by the <see cref="P:System.ServiceModel.Description.ServiceDebugBehavior.HttpHelpPageUrl" /> property.</summary>
<value>
<see langword="true" /> if WCF publishes an HTML help page; otherwise, <see langword="false" />. The default is <see langword="true" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Set the <xref:System.ServiceModel.Description.ServiceDebugBehavior.HttpHelpPageEnabled%2A> property to `false` to disable the publication of an HTML help page visible to HTML browsers.
To ensure the HTML help page is published at the location controlled by the <xref:System.ServiceModel.Description.ServiceDebugBehavior.HttpsHelpPageUrl%2A> property, you must set this property to `true` and then one of the following conditions must also be true:
- The <xref:System.ServiceModel.Description.ServiceDebugBehavior.HttpsHelpPageUrl%2A> property is an absolute address that supports the HTTP protocol scheme.
- There is a base address for the service that supports the HTTP protocol scheme.
Although an exception is thrown if an absolute address that does not support the HTTP protocol scheme is assigned to the <xref:System.ServiceModel.Description.ServiceDebugBehavior.HttpsHelpPageUrl%2A> property, any other scenario in which neither of the preceding criteria is met results in no exception and no HTML help page.
## Examples
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. This configuration file shows the following basic steps to adding support for the <xref:System.ServiceModel.Description.ServiceDebugBehavior> features:
- Because the <xref:System.ServiceModel.Description.ServiceDebugBehavior> type is a <xref:System.ServiceModel.Description.IServiceBehavior?displayProperty=nameWithType> implementation, the [&lt;service&gt;](~/docs/framework/configure-apps/file-schema/wcf/service.md) element that represents the service type has a behavior configuration identifier of `behaviorConfiguration="metadataAndDebug"`.
- Again, because the <xref:System.ServiceModel.Description.ServiceDebugBehavior> type is an <xref:System.ServiceModel.Description.IServiceBehavior?displayProperty=nameWithType> implementation a [&lt;behavior&gt;](~/docs/framework/configure-apps/file-schema/wcf/behavior-of-endpointbehaviors.md) element is added to a [&lt;serviceBehaviors&gt;](~/docs/framework/configure-apps/file-schema/wcf/servicebehaviors.md) section. The `name` attribute of the [&lt;behavior&gt;](~/docs/framework/configure-apps/file-schema/wcf/behavior-of-endpointbehaviors.md) element the value of which is the identifier of the `behaviorConfiguration` attribute of the [&lt;service&gt;](~/docs/framework/configure-apps/file-schema/wcf/service.md) element. In this case, the value is `metadataAndDebug`.
- Add a [&lt;serviceDebug&gt;](~/docs/framework/configure-apps/file-schema/wcf/servicedebug.md) element with the various attributes set to the desired configuration. In this case, the `httpHelpPageEnabled` and `includeExceptionDetailInFaults` attribute values are set to `true`.
[!code-xml[ServiceDebugBehaviorConfig#1](~/samples/snippets/csharp/VS_Snippets_CFX/servicedebugbehaviorconfig/cs/hostapplication.exe.config#1)]
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="HttpHelpPageUrl">
<MemberSignature Language="C#" Value="public Uri HttpHelpPageUrl { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Uri HttpHelpPageUrl" />
<MemberSignature Language="DocId" Value="P:System.ServiceModel.Description.ServiceDebugBehavior.HttpHelpPageUrl" />
<MemberSignature Language="VB.NET" Value="Public Property HttpHelpPageUrl As Uri" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property Uri ^ HttpHelpPageUrl { Uri ^ get(); void set(Uri ^ value); };" />
<MemberSignature Language="F#" Value="member this.HttpHelpPageUrl : Uri with get, set" Usage="System.ServiceModel.Description.ServiceDebugBehavior.HttpHelpPageUrl" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.ServiceModel</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8">
<AttributeName>System.ComponentModel.DefaultValue(null)</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8">
<AttributeName>System.ComponentModel.TypeConverter(typeof(System.UriTypeConverter))</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Uri</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the location at which the HTML help file is published.</summary>
<value>The relative or absolute HTTP-based URL of the custom HTML help file that the user sees when the endpoint is viewed using an HTML browser.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Use the <xref:System.ServiceModel.Description.ServiceDebugBehavior.HttpHelpPageUrl%2A> property to enable the use of a custom HTML help file that is returned from an HTTP/Get request such as that of an HTML browser. The location of the HTML help file is resolved as follows:
- If the value of this property is a relative address, then the location of the HTML help file is the value of the service base address that supports HTTP requests plus this property value.
- If the value of this property is an absolute address and supports HTTP requests, then the location of the HTML help file is the value of this property.
- If the value of this property is absolute but does not support HTTP requests, an exception is thrown.
This property is applied only in the case that the <xref:System.ServiceModel.Description.ServiceDebugBehavior.HttpHelpPageEnabled%2A> property is `true`.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="HttpsHelpPageBinding">
<MemberSignature Language="C#" Value="public System.ServiceModel.Channels.Binding HttpsHelpPageBinding { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.ServiceModel.Channels.Binding HttpsHelpPageBinding" />
<MemberSignature Language="DocId" Value="P:System.ServiceModel.Description.ServiceDebugBehavior.HttpsHelpPageBinding" />
<MemberSignature Language="VB.NET" Value="Public Property HttpsHelpPageBinding As Binding" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::ServiceModel::Channels::Binding ^ HttpsHelpPageBinding { System::ServiceModel::Channels::Binding ^ get(); void set(System::ServiceModel::Channels::Binding ^ value); };" />
<MemberSignature Language="F#" Value="member this.HttpsHelpPageBinding : System.ServiceModel.Channels.Binding with get, set" Usage="System.ServiceModel.Description.ServiceDebugBehavior.HttpsHelpPageBinding" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.ServiceModel</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.ServiceModel.Channels.Binding</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets high-level access to the definition of a binding.</summary>
<value>A channel binding.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="HttpsHelpPageEnabled">
<MemberSignature Language="C#" Value="public bool HttpsHelpPageEnabled { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool HttpsHelpPageEnabled" />
<MemberSignature Language="DocId" Value="P:System.ServiceModel.Description.ServiceDebugBehavior.HttpsHelpPageEnabled" />
<MemberSignature Language="VB.NET" Value="Public Property HttpsHelpPageEnabled As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property bool HttpsHelpPageEnabled { bool get(); void set(bool value); };" />
<MemberSignature Language="F#" Value="member this.HttpsHelpPageEnabled : bool with get, set" Usage="System.ServiceModel.Description.ServiceDebugBehavior.HttpsHelpPageEnabled" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.ServiceModel</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8">
<AttributeName>System.ComponentModel.DefaultValue(true)</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>set: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets a value that specifies whether Windows Communication Foundation (WCF) returns an HTML help file over HTTPS at the address controlled by the <see cref="P:System.ServiceModel.Description.ServiceDebugBehavior.HttpsHelpPageUrl" /> property.</summary>
<value>
<see langword="true" /> if an HTML help file is returned to clients making an HTTPS/GET request such as that of an HTML browser; otherwise, <see langword="false" />. The default is <see langword="true" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Set the <xref:System.ServiceModel.Description.ServiceDebugBehavior.HttpsHelpPageEnabled%2A> property to `false` to disable the publication of an HTML help page visible to HTML browsers.
To ensure the HTML help page is published at the location controlled by the <xref:System.ServiceModel.Description.ServiceDebugBehavior.HttpsHelpPageUrl%2A> property, you must set this property to `true` and then one of the following conditions must also be true:
- The <xref:System.ServiceModel.Description.ServiceDebugBehavior.HttpsHelpPageUrl%2A> property is an absolute address that supports the HTTPS protocol scheme.
- There is a base address for the service that supports the HTTPS protocol scheme.
Although an exception is thrown if an absolute address that does not support the HTTPS protocol scheme is assigned to the <xref:System.ServiceModel.Description.ServiceDebugBehavior.HttpsHelpPageUrl%2A> property, any other scenario in which neither of the preceding criteria is met results in no exception and no HTML help page.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="HttpsHelpPageUrl">
<MemberSignature Language="C#" Value="public Uri HttpsHelpPageUrl { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Uri HttpsHelpPageUrl" />
<MemberSignature Language="DocId" Value="P:System.ServiceModel.Description.ServiceDebugBehavior.HttpsHelpPageUrl" />
<MemberSignature Language="VB.NET" Value="Public Property HttpsHelpPageUrl As Uri" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property Uri ^ HttpsHelpPageUrl { Uri ^ get(); void set(Uri ^ value); };" />
<MemberSignature Language="F#" Value="member this.HttpsHelpPageUrl : Uri with get, set" Usage="System.ServiceModel.Description.ServiceDebugBehavior.HttpsHelpPageUrl" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.ServiceModel</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8">
<AttributeName>System.ComponentModel.DefaultValue(null)</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8">
<AttributeName>System.ComponentModel.TypeConverter(typeof(System.UriTypeConverter))</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Uri</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the location at which an HTML file is published for retrieval using HTTPS.</summary>
<value>The relative or absolute HTTPS-based URL of the custom HTML help file that the user sees when the endpoint is viewed using an HTML browser.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Use the <xref:System.ServiceModel.Description.ServiceDebugBehavior.HttpsHelpPageUrl%2A> property to enable the use of a custom HTML help file that is returned from an HTTPS/Get request such as that of an HTML browser.
The location of the HTML help file is resolved as follows:
- If the value of this property is a relative address, then the location of the HTML help file is the value of the service base address that supports HTTPS requests plus this property value.
- If the value of this property is an absolute address and supports HTTPS requests, then the location of the HTML help file is the value of this property.
- If the value of this property is absolute but does not support HTTPS requests, an exception is thrown.
This property is applied only in the case that the <xref:System.ServiceModel.Description.ServiceDebugBehavior.HttpsHelpPageEnabled%2A> property is `true`.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="IncludeExceptionDetailInFaults">
<MemberSignature Language="C#" Value="public bool IncludeExceptionDetailInFaults { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool IncludeExceptionDetailInFaults" />
<MemberSignature Language="DocId" Value="P:System.ServiceModel.Description.ServiceDebugBehavior.IncludeExceptionDetailInFaults" />
<MemberSignature Language="VB.NET" Value="Public Property IncludeExceptionDetailInFaults As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property bool IncludeExceptionDetailInFaults { bool get(); void set(bool value); };" />
<MemberSignature Language="F#" Value="member this.IncludeExceptionDetailInFaults : bool with get, set" Usage="System.ServiceModel.Description.ServiceDebugBehavior.IncludeExceptionDetailInFaults" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.ServiceModel</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8">
<AttributeName>System.ComponentModel.DefaultValue(false)</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>set: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>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.</summary>
<value>
<see langword="true" /> if Windows Communication Foundation (WCF) returns managed exception information in the SOAP faults for client debugging purposes; otherwise, <see langword="false" />. The default is <see langword="false" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Set the <xref:System.ServiceModel.Description.ServiceDebugBehavior.IncludeExceptionDetailInFaults%2A> property to `true` to instruct WCF to return managed exception information to the client in SOAP faults to ease debugging.
> [!CAUTION]
> Returning managed exception information to clients can be a security risk because exception details expose information about the internal service implementation that could be used by unauthorized clients. In addition, although the <xref:System.ServiceModel.Description.ServiceDebugBehavior> properties can also be set programmatically, it can be easy to forget to disable <xref:System.ServiceModel.Description.ServiceDebugBehavior.IncludeExceptionDetailInFaults%2A> when deploying.
Because of the security issues involved, it is strongly recommended that:
- You use an application configuration file to set the value of the <xref:System.ServiceModel.Description.ServiceDebugBehavior.IncludeExceptionDetailInFaults%2A> property to `true`.
- You only do so only in controlled debugging scenarios.
For more information, see [Specifying and Handling Faults in Contracts and Services](~/docs/framework/wcf/specifying-and-handling-faults-in-contracts-and-services.md).
## Examples
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. This configuration file shows the following basic steps to adding support for the <xref:System.ServiceModel.Description.ServiceDebugBehavior> features:
- Because the <xref:System.ServiceModel.Description.ServiceDebugBehavior> type is an <xref:System.ServiceModel.Description.IServiceBehavior?displayProperty=nameWithType> implementation, the [&lt;service&gt;](~/docs/framework/configure-apps/file-schema/wcf/service.md) element that represents the service type has a behavior configuration identifier of `behaviorConfiguration="metadataAndDebug"`.
- Again, because the <xref:System.ServiceModel.Description.ServiceDebugBehavior> type is an <xref:System.ServiceModel.Description.IServiceBehavior?displayProperty=nameWithType> implementation a [&lt;behavior&gt;](~/docs/framework/configure-apps/file-schema/wcf/behavior-of-endpointbehaviors.md) element is added to a [&lt;serviceBehaviors&gt;](~/docs/framework/configure-apps/file-schema/wcf/servicebehaviors.md) section. Set the `name` attribute of the [&lt;behavior&gt;](~/docs/framework/configure-apps/file-schema/wcf/behavior-of-endpointbehaviors.md) element the value of which is the identifier of the `behaviorConfiguration` attribute of the [&lt;service&gt;](~/docs/framework/configure-apps/file-schema/wcf/service.md) element. In this case, the value is `metadataAndDebug`.
- Add a [&lt;serviceDebug&gt;](~/docs/framework/configure-apps/file-schema/wcf/servicedebug.md) element with the various attributes set to the desired configuration. In this case, the `httpHelpPageEnabled` and `includeExceptionDetailInFaults` attribute values are set to `true`.
[!code-xml[ServiceDebugBehaviorConfig#1](~/samples/snippets/csharp/VS_Snippets_CFX/servicedebugbehaviorconfig/cs/hostapplication.exe.config#1)]
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="System.ServiceModel.Description.IServiceBehavior.AddBindingParameters">
<MemberSignature Language="C#" Value="void IServiceBehavior.AddBindingParameters (System.ServiceModel.Description.ServiceDescription description, System.ServiceModel.ServiceHostBase serviceHostBase, System.Collections.ObjectModel.Collection&lt;System.ServiceModel.Description.ServiceEndpoint&gt; endpoints, System.ServiceModel.Channels.BindingParameterCollection parameters);" />
<MemberSignature Language="ILAsm" Value=".method hidebysig newslot virtual instance void System.ServiceModel.Description.IServiceBehavior.AddBindingParameters(class System.ServiceModel.Description.ServiceDescription description, class System.ServiceModel.ServiceHostBase serviceHostBase, class System.Collections.ObjectModel.Collection`1&lt;class System.ServiceModel.Description.ServiceEndpoint&gt; endpoints, class System.ServiceModel.Channels.BindingParameterCollection parameters) cil managed" />
<MemberSignature Language="DocId" Value="M:System.ServiceModel.Description.ServiceDebugBehavior.System#ServiceModel#Description#IServiceBehavior#AddBindingParameters(System.ServiceModel.Description.ServiceDescription,System.ServiceModel.ServiceHostBase,System.Collections.ObjectModel.Collection{System.ServiceModel.Description.ServiceEndpoint},System.ServiceModel.Channels.BindingParameterCollection)" />
<MemberSignature Language="C++ CLI" Value=" virtual void System.ServiceModel.Description.IServiceBehavior.AddBindingParameters(System::ServiceModel::Description::ServiceDescription ^ description, System::ServiceModel::ServiceHostBase ^ serviceHostBase, System::Collections::ObjectModel::Collection&lt;System::ServiceModel::Description::ServiceEndpoint ^&gt; ^ endpoints, System::ServiceModel::Channels::BindingParameterCollection ^ parameters) = System::ServiceModel::Description::IServiceBehavior::AddBindingParameters;" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.ServiceModel.Description.IServiceBehavior.AddBindingParameters(System.ServiceModel.Description.ServiceDescription,System.ServiceModel.ServiceHostBase,System.Collections.ObjectModel.Collection{System.ServiceModel.Description.ServiceEndpoint},System.ServiceModel.Channels.BindingParameterCollection)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.ServiceModel</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="description" Type="System.ServiceModel.Description.ServiceDescription" />
<Parameter Name="serviceHostBase" Type="System.ServiceModel.ServiceHostBase" />
<Parameter Name="endpoints" Type="System.Collections.ObjectModel.Collection&lt;System.ServiceModel.Description.ServiceEndpoint&gt;" />
<Parameter Name="parameters" Type="System.ServiceModel.Channels.BindingParameterCollection" />
</Parameters>
<Docs>
<param name="description">The service description.</param>
<param name="serviceHostBase">The service host.</param>
<param name="endpoints">The endpoints for the service.</param>
<param name="parameters">The binding parameters that support modifying the bindings.</param>
<summary>Implements the <see cref="M:System.ServiceModel.Description.IServiceBehavior.AddBindingParameters(System.ServiceModel.Description.ServiceDescription,System.ServiceModel.ServiceHostBase,System.Collections.ObjectModel.Collection{System.ServiceModel.Description.ServiceEndpoint},System.ServiceModel.Channels.BindingParameterCollection)" /> method to support the behavior.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Modifies the bindings to support the behavior. For more information, see the <xref:System.ServiceModel.Description.IServiceBehavior.AddBindingParameters%2A?displayProperty=nameWithType> method.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="System.ServiceModel.Description.IServiceBehavior.ApplyDispatchBehavior">
<MemberSignature Language="C#" Value="void IServiceBehavior.ApplyDispatchBehavior (System.ServiceModel.Description.ServiceDescription description, System.ServiceModel.ServiceHostBase serviceHostBase);" />
<MemberSignature Language="ILAsm" Value=".method hidebysig newslot virtual instance void System.ServiceModel.Description.IServiceBehavior.ApplyDispatchBehavior(class System.ServiceModel.Description.ServiceDescription description, class System.ServiceModel.ServiceHostBase serviceHostBase) cil managed" />
<MemberSignature Language="DocId" Value="M:System.ServiceModel.Description.ServiceDebugBehavior.System#ServiceModel#Description#IServiceBehavior#ApplyDispatchBehavior(System.ServiceModel.Description.ServiceDescription,System.ServiceModel.ServiceHostBase)" />
<MemberSignature Language="C++ CLI" Value=" virtual void System.ServiceModel.Description.IServiceBehavior.ApplyDispatchBehavior(System::ServiceModel::Description::ServiceDescription ^ description, System::ServiceModel::ServiceHostBase ^ serviceHostBase) = System::ServiceModel::Description::IServiceBehavior::ApplyDispatchBehavior;" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.ServiceModel.Description.IServiceBehavior.ApplyDispatchBehavior(System.ServiceModel.Description.ServiceDescription,System.ServiceModel.ServiceHostBase)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.ServiceModel</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="description" Type="System.ServiceModel.Description.ServiceDescription" />
<Parameter Name="serviceHostBase" Type="System.ServiceModel.ServiceHostBase" />
</Parameters>
<Docs>
<param name="description">The service description.</param>
<param name="serviceHostBase">The service host.</param>
<summary>Implements the <see cref="M:System.ServiceModel.Description.IServiceBehavior.ApplyDispatchBehavior(System.ServiceModel.Description.ServiceDescription,System.ServiceModel.ServiceHostBase)" /> method to support the behavior.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="System.ServiceModel.Description.IServiceBehavior.Validate">
<MemberSignature Language="C#" Value="void IServiceBehavior.Validate (System.ServiceModel.Description.ServiceDescription description, System.ServiceModel.ServiceHostBase serviceHostBase);" />
<MemberSignature Language="ILAsm" Value=".method hidebysig newslot virtual instance void System.ServiceModel.Description.IServiceBehavior.Validate(class System.ServiceModel.Description.ServiceDescription description, class System.ServiceModel.ServiceHostBase serviceHostBase) cil managed" />
<MemberSignature Language="DocId" Value="M:System.ServiceModel.Description.ServiceDebugBehavior.System#ServiceModel#Description#IServiceBehavior#Validate(System.ServiceModel.Description.ServiceDescription,System.ServiceModel.ServiceHostBase)" />
<MemberSignature Language="C++ CLI" Value=" virtual void System.ServiceModel.Description.IServiceBehavior.Validate(System::ServiceModel::Description::ServiceDescription ^ description, System::ServiceModel::ServiceHostBase ^ serviceHostBase) = System::ServiceModel::Description::IServiceBehavior::Validate;" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.ServiceModel.Description.IServiceBehavior.Validate(System.ServiceModel.Description.ServiceDescription,System.ServiceModel.ServiceHostBase)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.ServiceModel</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="description" Type="System.ServiceModel.Description.ServiceDescription" />
<Parameter Name="serviceHostBase" Type="System.ServiceModel.ServiceHostBase" />
</Parameters>
<Docs>
<param name="description">The service description.</param>
<param name="serviceHostBase">The service host.</param>
<summary>Implements the <see cref="M:System.ServiceModel.Description.IServiceBehavior.Validate(System.ServiceModel.Description.ServiceDescription,System.ServiceModel.ServiceHostBase)" /> method to support the behavior.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
</Members>
</Type>
You can’t perform that action at this time.