<allow> Element

Specifies which clients are explicitly allowed access to a Web service.

<microsoft.web.services3> Element
  <messaging> Element
    <transports> Element
      <add> Element for <transports>
        <hosts> Element

<allow value="list of host names separated by spaces." />

Attributes and Elements

Attributes

Attribute Description

value

A list of clients separated by a space that are explicitly allowed access to a Web service. Each client is specified using its host name, IP address, IP address mask, and/or the keyword all, which means that all clients are allowed access to the Web service.

Child Elements

None.

Parent Elements

Element Description

<hosts> Element

Specifies which clients are allowed or denied access to a Web service.

Remarks

Before adding the <allow> element to a configuration file, you must add the microsoft.web.services3 configuration section handler to the configuration file. For details about adding the microsoft.web.services3 configuration section handler, see <section> Element.

WSE uses the following rules to determine whether a client is allowed or denied access. If the value of the default attribute of the <hosts> element is set to allow, then all clients are allowed access unless there is a listing in the <deny> element that is not overridden by a listing in the <allow> element. If the value of the default attribute of the <hosts> element is set to deny, then all clients are denied unless there is a listing in the <allow> element that is not overridden by a listing in the <deny> element. In either case, if the result is that the client should be denied access, then the incoming connection is immediately closed and no data is processed from it.

Example

The following code example specifies that only hosts with IP addresses starting with 192.168.1 and 10.10.100, but not including 10.10.100.100, are allowed access to a Web service.

<configuration>
  <microsoft.web.services33>
    <messaging>
      <transports>
        <add scheme="soap.tcp">
          <hosts default="deny">
            <allow value="192.168.1.0/24 10.10.100.0/24" />
            <deny value="10.10.100.100" />
          </hosts>
        </add>
      </transports>
    </messaging>
  </microsoft.web.services33>
</configuration>

See Also

Reference

<transports> Element
<add> Element for <transports>
<hosts> Element