WLLogOnException.ErrorMessage Property

Gets a description of the condition that caused the error including a suggestion of how to fix the condition that caused the error.

Namespace: Microsoft.WindowsLive.Id.Client
Assembly: Microsoft.WindowsLive.Id.Client (in microsoft.windowslive.id.client.dll)
Syntax

VisualBasicDeclaration
Public ReadOnly Property ErrorMessage As String
CSharp
public string ErrorMessage { get; }
ManagedCPlusPlus
public:
property String^ ErrorMessage {
    String^ get ();
}
JSharp
/** @property */
public String get_ErrorMessage ()
JScript
public function get ErrorMessage () : String

Property Value

A string containing a description of the condition that caused the error including a suggestion of how to fix the condition that caused the error. Possible values include:

ErrorType value

ErrorString value

1

Unexpected error. Please contact support.

2

Server error. Please try again later.

3

Cryptographic error. Please check your system date/time and security certificates.

4

File access error. Please try again from a user account that has sufficient file access rights.

5

Network error. Please check the network connection and try again.

6

API error. Please consult the SDK documentation for appropriate usage.

7

Installation error. Please exit, uninstall, and then reinstall the SDK and try again.

8

XML parsing error. Please reinstall MSXML and try again.

9

Authentication required. Please sign-in again.

10

Invalid service name specified. Please check the name of the Windows Live ID site or service and try again.

11

Invalid service ticket. Please obtain a new service ticket and try again.

12

Invalid user input. Please correct the input and try again.

13

Invalid credentials. For more information, see Windows Live Account Services.

14

System error. Please try again.

15

Update required. Please update to the most recent version of the SDK.

Remarks

There is a one-to-one relationship between the value returned by ErrorType and the string returned by ErrorMessage.


Example

The following example shows the use of the ErrorString property to display a message to the end user describing the condition that caused the error including a suggestion of how to fix the condition that caused the error:

catch (WLLogOnException wlex)
{
    //Check to see if FlowUrl is defined.
    if (wlex.FlowUrl != null)
    {
        //If FlowUrl is defined, direct user to the web page to correct the error.
        MessageBox.Show(wlex.ErrorString + "Please go to " + wlex.FlowUrl.AbsoluteUri + "to correct the condition that caused the error");
    }
    else
    {
        //If FlowUrl is not defined, simply display the ErrorString.
        MessageBox.Show(wlex.ErrorString);
    }
}
Thread Safety

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

Development Platforms

Windows Vista, Windows XP Professional with Service Pack 2 (SP2)

Target Platforms

Windows Vista, Windows XP Professional with SP2, Windows XP Home Edition with SP2
See Also

Page view tracker