This documentation is archived and is not being maintained.

ApplicationServicesHostFactory Class

Provides a factory class that creates instances of the authentication service, role service, and profile service in managed hosting environments.

Namespace:  System.Web.ApplicationServices
Assembly:  System.Web.Extensions (in System.Web.Extensions.dll)

[AspNetHostingPermissionAttribute(SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
[AspNetHostingPermissionAttribute(SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
public class ApplicationServicesHostFactory : ServiceHostFactory

This factory class provides a way to create instances of the AuthenticationService, ProfileService, and RoleService classes.

To use this factory class, create a WCF Service (.svc) file and specify ApplicationServicesHostFactory in the ServiceHosting attribute of the @ ServiceHost directive.

The following example shows how to specify ApplicationServicesHostFactory in the @ ServiceHost directive of a .svc file to configure the authentication service.

<%@ ServiceHost 

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

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.

.NET Framework

Supported in: 3.5