RequestChecker.ReportViolation Method (String, String, HttpStatusCode)
Reports a violation by throwing a System.ServiceModel.Web.WebFaultException.
Namespace: Microsoft.WindowsServerSolutions.WebApi.Framework
Assembly: Wssg.WebApi.Framework (in Wssg.WebApi.Framework.dll)
Syntax
public static void ReportViolation(
string paramName,
string errorMsg,
HttpStatusCode statusCode
)
public:
static void ReportViolation(
String^ paramName,
String^ errorMsg,
HttpStatusCode statusCode
)
Public Shared Sub ReportViolation (
paramName As String,
errorMsg As String,
statusCode As HttpStatusCode
)
Parameters
paramName
Type: System.StringThe name of the parameter to check.
errorMsg
Type: System.StringThe error message to add to the web fault exception.
statusCode
Type: System.Net.HttpStatusCodeThe HTTP status code to return.
See Also
RequestChecker Class
Microsoft.WindowsServerSolutions.WebApi.Framework Namespace
Return to top