Enables access to the ASP.NET role provider as a WCF Web service.
Assembly: System.Web.Extensions (in System.Web.Extensions.dll)
[AspNetCompatibilityRequirementsAttribute(RequirementsMode = AspNetCompatibilityRequirementsMode::Required)] [ServiceContractAttribute(Namespace = "http://asp.net/ApplicationServices/v200")] [ServiceBehaviorAttribute(Namespace = "http://asp.net/ApplicationServices/v200", InstanceContextMode = InstanceContextMode::Single, ConcurrencyMode = ConcurrencyMode::Multiple)] public ref class RoleService
Determines whether the specified object is equal to the current object.(Inherited from Object.)
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)
Serves as the default hash function. (Inherited from Object.)
Returns all the roles for the logged-in user.
Determines whether the logged-in user belongs to the specified role.
Returns a string that represents the current object.(Inherited from Object.)
Occurs when ainstance determines which role provider to use for checking the user's roles.
The user must be authenticated to read the user's roles. The role service works with any kind of ASP.NET authentication. For information about how to log users in through a WCF service, see Windows Communication Foundation Authentication Service Overview.
The GetRolesForCurrentUser method and the IsCurrentUserInRole method. The GetRolesForCurrentUser method returns all the roles for the logged-in user. The IsCurrentUserInRole method determines whether the user is in a specified role.class exposes two methods that should be accessed only through a WCF service: the
For an example of how to use the WCF role service from a console application, see Walkthrough: Using ASP.NET Application Services.
Available since 3.5
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.