AuthorizationAttribute.ErrorMessage Property

WCF RIA Services

[WCF RIA Services Version 1 Service Pack 2 is compatible with either .NET framework 4 or .NET Framework 4.5, and with either Silverlight 4 or Silverlight 5.]

Gets or sets the literal error message or resource key intended to be returned in an ErrorMessage.

Namespace:  System.ComponentModel.DataAnnotations
Assembly:  System.ServiceModel.DomainServices.Server (in System.ServiceModel.DomainServices.Server.dll)

public string ErrorMessage { get; set; }

Property Value

Type: System.String
A literal string or a resource key.

This property is meant to be set in the attribute declaration, and it serves as either a literal string or as a resource key. If ResourceType is non-null, this value is interpreted as the name of a property declared in ResourceType that will return the actual error message at run time. This is the mechanism that allows localization of error messages. If ResourceType is null, this value is assumed to be a literal non-localized error message.