Inheritance: CommunicationException
コード例 #1
0
 private static Exception WrapExceptionIfRequired(Exception e, EndpointAddress targetAddress, EndpointAddress issuerAddress)
 {
     if (IssuanceTokenProviderBase <T> .ShouldWrapException(e))
     {
         Uri uri;
         Uri uri2;
         if (targetAddress != null)
         {
             uri = targetAddress.Uri;
         }
         else
         {
             uri = null;
         }
         if (issuerAddress != null)
         {
             uri2 = issuerAddress.Uri;
         }
         else
         {
             uri2 = uri;
         }
         if (uri != null)
         {
             e = new SecurityNegotiationException(System.ServiceModel.SR.GetString("SoapSecurityNegotiationFailedForIssuerAndTarget", new object[] { uri2, uri }), e);
             return(e);
         }
         e = new SecurityNegotiationException(System.ServiceModel.SR.GetString("SoapSecurityNegotiationFailed"), e);
     }
     return(e);
 }
コード例 #2
0
        private static Exception WrapExceptionIfRequired(Exception e, EndpointAddress targetAddress, EndpointAddress issuerAddress)
        {
            if (ShouldWrapException(e))
            {
                Uri targetUri;
                if (targetAddress != null)
                {
                    targetUri = targetAddress.Uri;
                }
                else
                {
                    targetUri = null;
                }

                Uri issuerUri;
                if (issuerAddress != null)
                {
                    issuerUri = issuerAddress.Uri;
                }
                else
                {
                    issuerUri = targetUri;
                }

                // => issuerUri != null
                if (targetUri != null)
                {
                    e = new SecurityNegotiationException(SR.Format(SR.SoapSecurityNegotiationFailedForIssuerAndTarget, issuerUri, targetUri), e);
                }
                else
                {
                    e = new SecurityNegotiationException(SR.SoapSecurityNegotiationFailed, e);
                }
            }
            return(e);
        }
コード例 #3
0
 /// <summary>
 /// Handles a security negotiation exception during publishing
 /// </summary>
 /// <param name="SecurityNegotiationException"></param>
 private void FinishWithSecurityNegotiationException(SecurityNegotiationException sne)
 {
     boolError = true;
     string statusMessage = "A Security Negotiation error occurred while trying to publish the survey.";
     AddStatusMessage(statusMessage);
     txtStatusSummary.Text = statusMessage;
     txtStatus.AppendText(sne.ToString());
     btnShowLog.Enabled = true;
     btnDetails.Visible = true;
     this.progressBar.Visible = false;
     this.Cursor = Cursors.Default;
     panel2.Visible = false;
     lblSuccessNotice.Text = "A Security Negotiation error occurred while trying to publish the survey.";
     lblSuccessNotice.BackColor = Color.FromArgb(243, 217, 217);
     panel3.Visible = true;
     lblSuccessNotice2.Visible = false;
 }