webServices Element (ASP.NET Settings Schema)
Controls the behavior of ASP.NET Web services and their clients. By default, the webServices element and its descendants are applied to any Web service or proxy class to which the configuration applies.
Note
For complete documentation for this element, see Web Services Settings Schema.
<webServices>
<conformanceWarnings>...</conformanceWarnings>
<protocols>...</protocols>
<soapEnvelopeProcessing.../>
<serviceDescriptionFormatExtensionTypes>...
</serviceDescriptionFormatExtensionTypes>
<soapExtensionImporterTypes>...</soapExtensionImporterTypes>
<soapExtensionReflectorTypes>...</soapExtensionReflectorTypes>
<soapExtensionTypes>...</soapExtensionTypes>
<soapServerProtocolFactoryType.../>
<soapTransportImporterTypes>...</soapTransportImporterTypes>
<wsdlHelpGenerator.../>
</webServices>
Attributes and Elements
The following sections describe attributes, child elements, and parent elements.
Attributes
None.
Child Elements
Element | Description |
---|---|
conformanceWarnings |
Optional element. Defines a collection of WS-I profiles that will be used to validate the Web services. Note Currently, the only WS-I profile supported in the .NET Framework is Basic Profile Version 1.1 (BasicProfile 1_1). |
protocols |
Optional element. Specifies the transmission protocols that ASP.NET can use to decrypt data sent from a client browser in the HTTP request. The data sent in an HTTP request to an XML Web service can contain method calls and parameters. |
serviceDescriptionFormatExtensionTypes |
Optional element. Specifies the service description format extension to run within the scope of the configuration file. |
soapExtensionImporterTypes |
Optional element. Specifies the SOAP extensions to run when a service description for an XML Web service within the scope of the configuration file is accessed to create a proxy class. |
soapExtensionReflectorTypes |
Optional element. Specifies the SOAP extensions to run when a service description is generated for all XML Web services within the scope of the configuration file. |
soapExtensionTypes |
Optional element. Specifies the SOAP extensions to run with all XML Web services within the scope of the configuration file. |
soapServerProtocolFactoryType |
Optional element. Sets a System.Web.Services.Configuration.TypeElement object that corresponds to the protocol used to call the Web service. |
soapTransportImporterTypes |
Optional element. Sets a System.Web.Services.Configuration.TypeElementCollection object that represents the System.Web.Services.Configuration.SoapExtensionTypeElement, |
wsdlHelpGenerator |
Optional element. The XML Web service Help page (an .aspx file) that is displayed to a browser when the browser navigates directly to an .asmx page. |
Parent Elements
Element | Description |
---|---|
configuration |
The required root element in every configuration file used by the common language runtime and .NET Framework applications. |
system.web |
Specifies the root element for the ASP.NET configuration settings in a configuration file. Contains configuration elements that configure ASP.NET Web applications and control how the applications behave. |
Remarks
This element is fully documented in Web Services Settings Schema. For more information, please see that section.
Default Configuration
The following default webServices element is configured in the machine configuration file in the .NET Framework version 1.1.
<webServices>
<protocols>
<add name="HttpSoap1.2"/>
<add name="HttpSoap"/>
<add name="HttpPostLocalhost"/>
<add name="Documentation"/>
</protocols>
<soapExtensionTypes>
</soapExtensionTypes>
<soapExtensionReflectorTypes>
</soapExtensionReflectorTypes>
<soapExtensionImporterTypes>
</soapExtensionImporterTypes>
<wsdlHelpGenerator href="DefaultWsdlHelpGenerator.aspx"/>
<serviceDescriptionFormatExtensionTypes>
</serviceDescriptionFormatExtensionTypes>
</webServices>
The following default webServices element is configured in the machine configuration file in the .NET Framework version 1.0.
<webServices>
<protocols>
<add name="HttpSoap"/>
<add name="HttpPost"/>
<add name="HttpGet"/>
<add name="Documentation"/>
</protocols>
<soapExtensionTypes>
</soapExtensionTypes>
<soapExtensionReflectorTypes>
</soapExtensionReflectorTypes>
<soapExtensionImporterTypes>
</soapExtensionImporterTypes>
<wsdlHelpGenerator href="DefaultWsdlHelpGenerator.aspx" />
<serviceDescriptionFormatExtensionTypes>
</serviceDescriptionFormatExtensionTypes>
</webServices>
The following default webServices element is not explicitly configured in the machine configuration file or in the root Web.config file, but is the default configuration returned by an application in the .NET Framework version 2.0.
<webServices>
<conformanceWarnings>
<add name = "None" />
</conformanceWarnings>
<protocols>
<add name = "Unknown" />
</protocols>
<soapEnvelopeProcessing readTimeout = "" />
<serviceDescriptionFormatExtensionTypes>
<add type = "" />
</serviceDescriptionFormatExtensionTypes>
<soapExtensionImporterTypes>
<add type = "" />
</soapExtensionImporterTypes>
<soapExtensionReflectorTypes>
<add type = "" />
</soapExtensionReflectorTypes>
<soapExtensionTypes>
<add group = "Low"
priority = "0"
type = "" />
</soapExtensionTypes>
<soapServerProtocolFactoryType type = "" />
<soapTransportImporterTypes>
<add type = "" />
</soapTransportImporterTypes>
<wsdlHelpGenerator href = "DefaultWsdlHelpGenerator.aspx" />
</webServices>
<webServices>
<conformanceWarnings>
<clear />
<add name="BasicProfile1_1" />
</conformanceWarnings>
<protocols>
<clear />
<add name="HttpSoap12" />
<add name="HttpSoap" />
<add name="HttpPostLocalhost" />
<add name="Documentation" />
</protocols>
<serviceDescriptionFormatExtensionTypes>
<clear />
</serviceDescriptionFormatExtensionTypes>
<soapEnvelopeProcessing readTimeout="2147483647" />
<soapExtensionImporterTypes>
<clear />
</soapExtensionImporterTypes>
<soapExtensionReflectorTypes>
<clear />
</soapExtensionReflectorTypes>
<soapExtensionTypes>
<clear />
</soapExtensionTypes>
<soapTransportImporterTypes>
<clear />
</soapTransportImporterTypes>
<wsdlHelpGenerator href="DefaultWsdlHelpGenerator.aspx" />
<soapServerProtocolFactory type="System.Web.Services.Protocols.SoapServerProtocolFactory, System.Web.Services,
Version=2.0.0.0, Culture=neutral PublicKeyToken=b03f5f7f11d50a3a" />
</webServices>
Example
The following example turns off Basic Profile 1.1 conformance warnings for an entire ASP.NET Web site.
<configuration>
<system.web>
<webServices>
<conformanceWarnings>
<remove name='BasicProfile1_1'/>
</conformanceWarnings>
</webServices>
</system.web>
</configuration>
Element Information
Configuration Section Handler |
|
Configuration Member |
|
Configurable Locations |
Machine.config Root-level Web.config Application level Web.config Virtual or physical directory level Web.config |
Requirements |
IIS 5.0, IIS 5.1, or IIS 6.0 .NET Framework 1.0, 1.1, or 2.0 Visual Studio 2003, or Visual Studio 2005 |
See Also
Tasks
How to: Configure Specific Directories Using Location Settings
How to: Lock ASP.NET Configuration Settings
Reference
<webServices> Element
Web Services Settings Schema
system.web Element (ASP.NET Settings Schema)
configuration Element (General Settings Schema)
System.Configuration
System.Web.Configuration
Concepts
ASP.NET Configuration File Hierarchy and Inheritance
Securing ASP.NET Configuration
ASP.NET Configuration Scenarios
Other Resources
General Configuration Settings (ASP.NET)
ASP.NET Configuration Settings
Configuring ASP.NET Applications
ASP.NET Configuration Files
ASP.NET Configuration API