WebScriptEnablingElement Class
Enables the WebScriptEnablingBehavior for an endpoint through configuration.
Assembly: System.ServiceModel.Web (in System.ServiceModel.Web.dll)
The WebScriptEnablingElement is a BehaviorExtensionElement subtype that can be used to include the WebScriptEnablingBehavior on an endpoint through configuration. There are no configurable properties on this element.
The WebScriptEnablingBehavior, in turn, allows an endpoint to be accessed by ASP.NET AJAX Web pages when it is configured with the WebHttpBinding.
For more information about how to enable a WCF service to respond to ASP.NET AJAX clients, see Creating WCF Services for ASP.NET AJAX.
The following is an example of using this configuration element to configure a WCF endpoint to be accessed by ASP.NET AJAX Web page.
<system.serviceModel>
<services>
<service name="Microsoft.Ajax.Samples.CalculatorService">
<endpoint address=""
behaviorConfiguration="AspNetAjaxBehavior"
binding="webHttpBinding"
contract="Microsoft.Ajax.Samples.ICalculator" />
</service>
</services>
<behaviors>
<endpointBehaviors>
<behavior name="AspNetAjaxBehavior">
<enableWebScript />
</behavior>
</endpointBehaviors>
</behaviors>
</system.serviceModel>
System.Configuration.ConfigurationElement
System.ServiceModel.Configuration.ServiceModelExtensionElement
System.ServiceModel.Configuration.BehaviorExtensionElement
System.ServiceModel.Configuration.WebScriptEnablingElement
Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.