Freigeben über


<webServices> Element 

Controls the settings of Web services deployed using ASP.NET and of Web service clients running on the .NET Framework.

<webServices> 
   <protocols> 
      <add name="protocol name"/>
      <remove name="protocol name"/>
      <clear/>
   </protocols>
   <serviceDescriptionFormatExtensionTypes> 
      <add type="type"/>
      <remove type="type"/>
      <clear/>
   </serviceDescriptionFormatExtensionTypes>
   <soapExtensionTypes>
      <add type="type" priority="number" group="0|1"/>/>
      <remove type="type"/>
      <clear/>
   </soapExtensionTypes>
   <soapExtensionReflectorTypes>
      <add type="type" priority="number" group="0|1"/>/>
      <remove type="type"/>
      <clear/>
   </soapExtensionReflectorTypes>
   <soapExtensionImporterTypes>
      <add type="type" priority="number" group="0|1"/>/>
      <remove type="type"/>
      <clear/>
   </soapExtensionImporterTypes>
   <wsdlHelpGenerator href="help generator file"/>
   <diagnostics suppressReturningExceptions="true|false" />
</webServices>

Attributes and Elements

The following sections describe attributes, child elements, and parent elements.

Attributes

None.

Child Elements

Child Element Description

diagnostics

Specifies whether to return exceptions to the client for debugging purposes.

protocols

Specifies the protocols that an ASP.NET Web service can use to receive request data sent from a client and return response data. A protocol can be used to associate request data with a method and its parameters and to associate response data with the method and its return value.

serviceDescriptionFormatExtensionTypes

Specifies the service description format extension to run within the scope of the configuration file.

soapExtensionTypes

Specifies the SOAP extensions used to inspect or modify the SOAP message during processing on the Web service or client. SOAP extensions augment the functionality of Web services.

soapExtensionReflectorTypes

Specifies SOAP extension reflector classes, which extend the service description (WSDL document) generation process. For use with service description format extensions (SDFEs).

soapExtensionImporterTypes

Specifies SOAP extension importer classes, which extend the client proxy generation process. For use with service description format extensions (SDFEs).

wsdlHelpGenerator

Specifies the Web service Help page (an .aspx file) that is displayed to a browser when the browser navigates directly to an ASMX Web services page.

Parent Elements

Element Description

configuration

The 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 section.

Example

The following example specifies XML Web service configuration settings.

<configuration>
   <system.web>
      <webServices>
         <diagnostics suppressReturningExceptions="false"/>
         <protocols>
            <add name="HttpGet"/>
            <add name="HttpPost"/>
            <add name="Documentation"/>
         </protocols>
         <serviceDescriptionFormatExtensionTypes>
         </serviceDescriptionFormatExtensionTypes>
         <soapExtensionTypes>
         </soapExtensionTypes>
         <soapExtensionReflectorTypes>
         </soapExtensionReflectorTypes>
         <soapExtensionImporterTypes>
         </soapExtensionImporterTypes>
         <wsdlHelpGenerator href="DefaultSdlHelpGenerator.aspx"/>
      </webServices>
   </system.web>
</configuration>

See Also

Reference

Web Services Settings Schema

Other Resources

ASP.NET Configuration Settings
XML Web Services Created Using ASP.NET and XML Web Service Clients
ASP.NET Configuration