<add> Element for <httpHandlers> (WSE for Microsoft .NET)

Specifies that the WSE router or security token service run for a Web application.

<add verb="*" 
     path="secureConversation.ashx" 
     type="="Microsoft.Web.Services2.Security.SecurityContextTokenService, Microsoft.Web.Services2, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"" />

Attributes and Elements

Attributes

Attribute Description

Verb

Required attribute. The verb list can be either a comma-separated list of HTTP verbs (for example, "GET, PUT, POST") or a start-script mapping (for example, the wildcard character * [an asterisk]).

Path

Required attribute. The path attribute can contain either a single URL path or a simple wildcard string. When you are Setting the path attribute to "*.asmx" specifies that any request that is received for an XML Web service created using ASP.NET is sent to the security token service or WSE router first.

Type

Required attribute. The type for the security token service or the WSE router. The name and strong-named assembly it is contained in must appear on one line.

Child Elements

None

Parent Elements

Element Description

<httpHandlers>

Maps incoming requests to the appropriate IHttpHandler or IHttpHandlerFactory class, according to the URL and the HTTP verb specified in the request.

Remarks

To issue SecurityContextToken security tokens, you must add this entry to the Web.config file on the computer that is issuing the security tokens. For more information about configuring a security token service, see How to: Configure a Security Context Token Service.

To use the routing features of WSE, you must add this entry to the Web.config of the computer acting as a SOAP message router. For details, about using the WSE router, see Routing SOAP Messages with WSE.

Example

The following code example specifies that SOAP requests made to this virtual directory for the secureConversation.ashx file are sent to the SecurityContextTokenService security token service. The type attribute of the <add> element for <httpHandlers> must be on one line.

<configuration>
   <system.web>
       <httpHandlers>
            <add verb="*" 
                     path="secureConversation.ashx" 
                     type="Microsoft.Web.Services2.Security.SecurityContextTokenService, Microsoft.Web.Services2, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
       </httpHandlers>
   </system.web>
</configuration>

The following code example specifies that all requests sent to a Web application for XML Web services created using ASP.NET be sent to the WSE router. The type attribute of the <add> element for <httpHandlers> must be on one line.

<configuration>
   <system.web>
       <httpHandlers>
            <add verb="*" 
                     path="*.ashx" 
                     type="Microsoft.Web.Services2.Routing.RoutingHandler, Microsoft.Web.Services2, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
       </httpHandlers>
   </system.web>
</configuration>

See Also

Tasks

How to: Configure a Security Context Token Service

Reference

SecurityContextToken
SecurityContextTokenService

Other Resources

Routing SOAP Messages with WSE