Поделиться через


Manager.Error

Manager.Error

The Error property holds a value indicating the error state associated with the current Microsoft .NET Passport Ticket. The Error property indicates whether there have been any errors set in the .NET Passport Ticket or query string by the .NET Passport domain authority upon direct user-network communication.

Syntax

Property Manager.Error As Long

Property value

Holds a Long value indicating the current error state.

Example

The following Microsoft Visual Basic Scripting Edition (VBScript) code snippet displays the value of the Error property with an explanation. An error can be simulated for purposes of this example by adding an f= parameter to the page's query string.

...
'Create a Passport object
Dim oMgr
Set oMgr = Server.CreateObject("Passport.Manager")

If oMgr.Error >= 0 Then
 Response.Write ("Error Number and meaning:")
 pmsURL = oMgr.GetDomainAttribute("PassportInformationCenter")
 Select Case oMgr.Error
 Case 0
  Response.Write ("<br>No error")
 Case 1
  Response.Write ("<br>A network error has prevented your .NET Passport sign-in. Please try again.")
  '.
  '.
  '.
 Case 10
  Response.Write ("<br>This is a Kids Passport. Your site does not support Kids Passport.")
 Case 11
  Response.Write ("<br>User clicked Cancel.")
 Case 12
  Response.Write ("<br>The site is not SSL.")
 Case Else
  Response.Write ("<br>Oops! Unrecognized error message.")
 End Select
End If
...

Remarks

The Error property is read-only. The .NET Passport network error codes are integer values set by other servers in the .NET Passport network (for example, an Update or Login server). The integer value of the Error property represents specific error conditions set in the .NET Passport Ticket or on the query string. An Error property equal to zero indicates there are no errors. 

Possible error codes and their meanings are listed in the following table.

Name VT_14
value
Description
BAD_REQUEST 1 Domain database received a partial request, or the Site ID did not match.
OFFLINE 2 Domain database is offline and cannot service requests.
TIMEOUT 3 Request to domain database timed out.
LOCKED 4 User's account is locked, and/or user is not signed in.
NO_PROFILE 5 Not used.
DISASTER 6 Network server is not able to check the user database. If this error is received, your site should consider switching to stand-alone mode. The Login server has determined that some (although not all) of the network servers responsible for performing the steps of the authentication checks are currently down, and the Login server timed out trying to reach them. If F=6, the user will never be authenticated and no valid t and p will be on the query string.
INVALID_KEY 7 Ticket or Profile cookie was encrypted using an invalid key and cannot be decrypted. To correct this error, reinstall the key correctly.
SVC_NOT_CONFIGURED 8 Error in parsing or processing the participating site's XML site configuration data on the network side. To correct this error, pass a valid SVC parameter to the Login server.
(no internal resource name) 9 Uncategorized or unhandled exception.
KPPNONKIDSITE 10 Site specified a value for KPP other than KPP=0 in a call to the Login server but was not configured to use Microsoft Kids Passport. Sites must contact their .NET Passport sales representative to make arrangements to use the Kids Passport service.
USER_CANCELLED 11 The presence of an f= parameter on the ru query string indicates an error that must be handled by the participating site. Sites must handle all such f= errors. The general guidelines that apply are:
  • The ru must not redirect back to .NET Passport for another authentication. Redirecting back to the Login server will cause an infinite loop.
  • The ru may inspect the value of f= to identify which error occurred. If this value is known, the participating site may choose to display special messaging for the error. This messaging should be specific to the task the user was trying to accomplish.
  • If the participating site does not know the value of f, the site should display a generic error message indicating that an error occurred during .NET Passport sign-in.

This error must be caught on the participating sites ru. Failure to do so will put the user in an infinite loop.

NOT_OVER_SSL 12 When using SecLvl 10 or 100, the ru must point to a site using Secure Sockets Layer (SSL).

See Also

Passport Manager Object