Sys.Services RoleService path Property
Gets or sets the role service path.
Note
To get or set property values for client API properties, you must call property accessor methods that are named with the get_ and set_ prefixes. For example, to get or set a value for a property such as cancel, you call the get_cancel or set_cancel methods.
var profPath = Sys.Services.RoleService.get_path();
Sys.Services.RoleService.set_path(value);
Parameters
Parameter |
Description |
---|---|
value |
A string that contains the role service path. |
Remarks
By default, the path property is set to an empty string. If you do not set the path property, the internal default ASP.NET path is used, which points to the built-in roles application service.
Note
The built-in role application service cannot be moved to a different location in the ASP.NET Web site. However, you can point to a custom Web service that exposes the same methods and properties as the default role service.
You usually set the path property in declarative markup. This value can be an absolute path, a relative path, or a fully qualified domain name and a path. The following example shows how to set the path property declaratively.
<asp:ScriptManager>
<RoleService
Path = "~/Myapp/MyRoleService.asmx"/>
</asp:ScriptManager>
Example
The following example shows how to use the path property. This code is part of a complete example found in the RoleService class overview.
// This function gets the roles of the
// currently authenticated user.
function ReadUserRoles()
{
// Clear the feedback output.
DisplayInformation("");
// You must load the user's roles
// first before you can use them.
roleProxy.load();
// Read the user's roles.
roles = roleProxy.get_roles();
}