ValidateAndParsePayload
Task to validate an incoming AS2 message, extracts the EDI payload, and generates an MDN receipt.
Task version: 1.2.0
Required Frends version: 5.7+
Required .NET version: 8.0
Compatible Agents: Crossplatform
Source code: https://github.com/FrendsPlatform/Frends.As2/tree/main/Frends.As2.ValidateAndParsePayload
Task Parameters
Headers : Dictionary<String, String>
HTTP headers from the AS2 request containing AS2-From, AS2-To, Message-ID and other AS2 metadata.
Default: -
Example: { "AS2-From": "TestSender", "AS2-To": "TestReceiver", "Message-ID": "12345@example.com", "Subject": "Test AS2 Message", "MIME-Version": "1.0", "Content-Type": "application/pkcs7-mime; smime-type=enveloped-data; name="smime.p7m"" }
Body : Byte[]
Raw body content as byte array containing the AS2 message payload (encrypted/signed data).
Default: -
Example: Encoding.UTF8.GetBytes("This is a test AS2 message payload")
RequireSigned : Boolean
Forces signature validation when enabled.
Default: False
Example: true
PartnerCertificatePath : String
Path to partner's public certificate (.cer) file.
Default: -
Example: C:\Certs\partner.cer
RequireEncrypted : Boolean
Forces decryption when enabled.
Default: False
Example: true
OwnCertificatePath : String
Path to your own certificate file in .pfx format.
Default: -
Example: C:\Certs\mycompany.pfx
🗝OwnCertificatePassword : String
Password for your private key certificate.
Default: -
Example: mySecurePassword123
ThrowErrorOnFailure : Boolean
Whether to throw an error on failure.
Default: True
Example: false
ErrorMessageOnFailure : String
Overrides the error message on failure.
Default: -
Example: Custom error message
Task Result
Success : Boolean
Indicates if the task completed successfully.
Example: true
Error : Error
Error that occurred during task execution.
Example: object { string Message, object { Exception Exception } AdditionalInfo }
Error.Message : String
Summary of the error.
Example: Unable to join strings.
Error.AdditionalInfo : Exception
Additional information about the error.
Example: object { Exception Exception }
Payload : String
Decrypted/decompressed business data (EDI/XML/JSON).
Example: Test message
As2From : String
AS2 sender identifier.
Example: PartnerAS2
As2To : String
AS2 receiver identifier.
Example: MyCompanyAS2
MessageId : String
ID of the received message.
Example: "123456789@example.com"
MdnReceipt : MdnData
MDN receipt generated by the AS2Receiver. To be used later in CreateMdnResponse.
Example: object { "Headers": "...", "Message": "...", "Content": "..." }
MdnReceipt.Headers : String
MDN headers returned by the AS2Receiver.
Example: "Content-Type: multipart/signed; protocol=..."
MdnReceipt.Message : String
Human-readable MDN message part.
Example: "The message has been received and processed successfully."
MdnReceipt.Content : String
Raw MDN content (MIME format).
Example: "Content-Type: multipart/signed\r\n\r\n..."
MdnReceipt.MicValue : String
Message integrity check (MIC) value from the MDN.
Example: "abc123xyz==, sha-256"
Task Changelog
Changelog for Task Frends.As2.ValidateAndParsePayload.
[1.2.0] - 2026-10-09
Fixed
Own certificate is now loaded with automatic certificate store type detection, fixing Digital ID/cert store errors.
[1.1.0] - 2026-07-18
Fixed
Updated copyright information in the package metadata.
Added missing example documentation to the MDN content field.
[1.0.0] - 2025-09-11
Changed
Initial implementation
Last updated
Was this helpful?

