Forbidden() public static method

Creates a fault exception with the HTTP status code 403.
public static Forbidden ( string source, ushort code, string description ) : HttpResponseException
source string The source of the fault.
code ushort The code of the fault.
description string A human-readable description of what went wrong.
return HttpResponseException
 /// <summary>
 /// Returns exception when a duplicate category is found during category
 /// creation.
 /// </summary>
 /// <param name="details">Fault inner message.</param>
 /// <returns>Exception wrapping the fault.</returns>
 public static HttpResponseException DuplicateCategoryException(string details)
 {
     return(ServiceFault.Forbidden(
                Source,
                DuplicateCategory,
                "Category of the same name exists.",
                details));
 }
 /// <summary>
 /// Returns exception when the current operation will overdraw user balance.
 /// </summary>
 /// <returns>Exception wrapping the fault.</returns>
 public static HttpResponseException UserBalanceTooLow()
 {
     return(ServiceFault.Forbidden(
                Source,
                UserBalanceTooLowForOperation,
                "User's balance is too low for this operation.",
                null));
 }
 /// <summary>
 /// Returns exception when the current authenticated user fetched from Azure Mobile Service is null.
 /// </summary>
 /// <returns>Exception wrapping the fault.</returns>
 public static HttpResponseException UserNullException()
 {
     return(ServiceFault.Forbidden(
                Source,
                UserNullError,
                "This can only be performed by signed in clients.",
                null));
 }
 /// <summary>
 /// Returns exception when the current user isn't allowed to perform this operation.
 /// </summary>
 /// <returns>Exception wrapping the fault.</returns>
 public static HttpResponseException NotAllowed()
 {
     return(ServiceFault.Forbidden(
                Source,
                IncorrectUser,
                "The logged in user does not have access to perform this operation.",
                null));
 }