AS2 Message Decryption Failed

I’ve been trying to code out a function to send an AS2 message in C#. I’ve gotten it to send correctly to many other AS2 servers as well as java AS2 servers, but I get a decryption failed method whenever I try to send it to webMethods. They receive plain text and can verify signatures on signed messages, they just can’t decrypt my message. Me and the client have checked and re-checked our keys and they are correct. I’m not sure if I’m missing something webMethods requires.

protected void SendAS2(string DestinationURL, string To, string Body)
{
X509Certificate2 SignCert = new X509Certificate2(signCertPath, password);
X509Certificate2 EncryptCert = new X509Certificate2(“encryptCertPath”);

    StringBuilder Message = new StringBuilder();
    Message.AppendLine("Content-Type: text/plain");
    Message.AppendLine();
    Message.AppendLine(Body);
   
    SignedCms Cms = new SignedCms(new ContentInfo(Encoding.ASCII.GetBytes(Message.ToString())));
    CmsSigner Signer = new CmsSigner(SubjectIdentifierType.IssuerAndSerialNumber, SignCert);
    Cms.ComputeSignature(Signer);
    byte[] SignedBytes = Cms.Encode();
   
    byte[] SignedMessageBytes = getMultiPartBodyBytes(SignedBytes, Body);

    EnvelopedCms ECms = new EnvelopedCms(new ContentInfo(SignedMessageBytes));
    CmsRecipient Recipient = new CmsRecipient(SubjectIdentifierType.IssuerAndSerialNumber, EncryptCert);
    ECms.Encrypt(Recipient);
    byte[] SignedandEncryptedBytes = ECms.Encode();
   
    HttpWebRequest WReq = (HttpWebRequest)WebRequest.Create(DestinationURL);
    //Turn off expect 100 continue header
    WReq.ServicePoint.Expect100Continue = false;
    WReq.ContentType = "application/pkcs7-mime; smime-type=enveloped-data; name=smime.p7m";
    WReq.ContentLength = SignedandEncryptedBytes.Length;
    WReq.Method = "POST";
    WReq.Headers.Add("Message-ID", "<" + DateTime.Today.ToString("ddMMyyyy") + "-" + new Random().Next().ToString() + "@5468764321T_SomeCompany>");
    //WReq.Headers.Add("From", "mycompany");
    WReq.Headers.Add("Mime-Version", "1.0");
    WReq.Headers.Add("Content-Transfer-Encoding", "binary");
    WReq.Headers.Add("Content-Disposition", "attachment; filename=\"smime.p7m\"");
    WReq.Headers.Add("Disposition-Notification-To", "someone@somehwere.com");
    WReq.Headers.Add("Disposition-Notification-Options", "signed-receipt-protocol=optional, pkcs7-signature; signed-receipt-micalg=optional, sha1");
    WReq.Headers.Add("AS2-Version", "1.1"); //1.0 or 1.1?
    WReq.Headers.Add("AS2-To", To);
    //WReq.Headers.Add("AS2-From", "mycompanyAS2");
    WReq.Headers.Add("AS2-From", "\"3PLSystems\"");
    WReq.Headers.Add("Subject", "AS2 EDI message");
    WReq.Headers.Add("Recipient-Address", DestinationURL);
   
    System.IO.Stream OStr = WReq.GetRequestStream();
    OStr.Write(SignedandEncryptedBytes, 0, SignedandEncryptedBytes.Length);
    OStr.Close();

    //Get's synchronous MDN, will need to decrypt and unsign?
    WebResponse WResp = WReq.GetResponse();
    StreamReader SR = new StreamReader(WResp.GetResponseStream());
    String RespData = SR.ReadToEnd();
    SR.Close();

    this.litStatus.Text = "Done";
    this.litResponse.Text = RespData;
}

protected byte[] getMultiPartBodyBytes(byte[] SignedBytes, string Body)
{
    StringBuilder Message = new StringBuilder();

    Message.AppendLine("Content-Type: multipart/signed;");
    Message.AppendLine("protocol=\"application/pkcs7-signature\";");
    Message.AppendLine("micalg=sha1; boundary=boundary42");
    Message.AppendLine();
    Message.AppendLine("--boundary42");
   
    Message.AppendLine("Content-Type: text/plain");
    Message.AppendLine();
    Message.AppendLine(Body);
    Message.AppendLine();

    Message.AppendLine("--boundary42");
    Message.AppendLine("Content-Type: application/pkcs7-signature; name=smime.p7s");
    Message.AppendLine("Content-Transfer-Encoding: base64");
    Message.AppendLine("Content-Disposition: attachment; filename=smime.p7s");
    Message.AppendLine();
    Message.AppendLine(Convert.ToBase64String(SignedBytes));
    Message.AppendLine();
    Message.AppendLine("--boundary42--");
   
    return Encoding.ASCII.GetBytes(Message.ToString());
}