This documentation is archived and is not being maintained.

Sys.Services AuthenticationService defaultFailedCallback Property

Visual Studio 2008

Gets or sets the name of the default failure callback function.


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 failedCallback =
  Sys.Services.AuthenticationService.get_ defaultFailedCallback();




A string that contains the name of the default failure callback function.

The function that you assign to the defaultFailedCallback property is used as the default callback function if errors occur. You can override this default callback function by passing the name of a different function to the logout or to the login methods.

When implementing this callback function, you must use the following signature:

function AuthenticationFailure(error, userContext, methodName)

The parameters passed to the callback function have the following meaning:

  • error. Contains the error information.

  • userContext. User context information that you pass to the logout or to the login methods.

  • methodName. The name of the calling method.

The callback function is called asynchronously if the authentication service failed.

The following example shows how to use the defaultFailedCallback property. This code is part of a complete example found in the Sys.Services.AuthenticationService Class class overview.