Click to Rate and Give Feedback
MSDN
MSDN Library
Live Services SDK
Windows Live ID SDK
 ErrorMessage Property

  Switch on low bandwidth view
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)
Visual Basic (Declaration)
<span class="input">Public</span> <span class="input">ReadOnly</span> <span class="input">Property</span> <span class="identifier">ErrorMessage</span> <span class="input">As</span> String
C#
<span class="input">public</span> string <span class="identifier">ErrorMessage</span> { <span class="input">get</span>; }
C++
<span class="input">public</span>:
<span class="input">property</span> String^ <span class="identifier">ErrorMessage</span> {
    String^ <span class="input">get</span> ();
}
J#
/** @property */
<span class="input">public</span> String <span class="identifier">get_ErrorMessage</span> ()
JScript
<span class="input">public</span> <span class="input">function get</span> <span class="identifier">ErrorMessage</span> () : 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.

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


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);
    }
}
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

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
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker