示例#1
0
 static void HandleErrorResponseException()
 {
     try
     {
         Console.WriteLine("\r\nSending a compare request with an" +
                           " invalid attribute name..");
         // the request will generate an ErrorResponseException
         // because the attribute name is not valid according
         // to the dsmlv2 schema (eg.: $ is not allowed in attribute names)
         dsmlConnection.SendRequest(
             new CompareRequest
             (
                 "CN=myUser,DC=fabrikam,DC=com",
                 "$description",
                 "attrVal"
             )
             );
     }
     catch (ErrorResponseException e)
     {
         DsmlErrorResponse errResponse = e.Response;
         Console.WriteLine(e.GetType().Name + ": Message:" + e.Message);
         Console.WriteLine(errResponse.GetType().Name +
                           ":\r\nType:" + errResponse.Type +
                           "\r\nMessage:" + errResponse.Message);
     }
 }
	public ErrorResponseException(DsmlErrorResponse response, string message, System.Exception inner) {}
	public ErrorResponseException(DsmlErrorResponse response, string message) {}
	public ErrorResponseException(DsmlErrorResponse response) {}
 public ErrorResponseException(DsmlErrorResponse response, string message, System.Exception inner)
 {
 }
 public ErrorResponseException(DsmlErrorResponse response, string message)
 {
 }
 public ErrorResponseException(DsmlErrorResponse response)
 {
 }