Вызов SignedXml.ComputeSignature() выдает ошибку следующее исключение:
Код: Выделить всё
Unhandled exception. System.Xml.XPath.XPathException: Namespace prefix 'ext' is not defined.
at MS.Internal.Xml.XPath.CompiledXpathExpr.UndefinedXsltContext.LookupNamespace(String prefix)
at MS.Internal.Xml.XPath.BaseAxisQuery.SetXsltContext(XsltContext context)
at MS.Internal.Xml.XPath.CompiledXpathExpr.SetContext(IXmlNamespaceResolver nsResolver)
at System.Security.Cryptography.Xml.XmlDsigXPathTransform.GetOutput()
at System.Security.Cryptography.Xml.TransformChain.TransformToOctetStream(Object inputObject, XmlResolver resolver, String baseUri)
at System.Security.Cryptography.Xml.Reference.CalculateHashValue(XmlDocument document, CanonicalXmlNodeList refList)
at System.Security.Cryptography.Xml.Reference.UpdateHashValue(XmlDocument document, CanonicalXmlNodeList refList)
at System.Security.Cryptography.Xml.SignedXml.BuildDigestedReferences()
at System.Security.Cryptography.Xml.SignedXml.ComputeSignature()
Код: Выделить всё
urn:oasis:names:specification:ubl:dsig:enveloped:xades
urn:oasis:names:specification:ubl:signature:1
urn:oasis:names:specification:ubl:signature:Invoice
not(//ancestor-or-self::ext:UBLExtensions)
not(//ancestor-or-self::cac:Signature)
not(//ancestor-or-self::cac:AdditionalDocumentReference[cbc:ID='QR'])
f+0WCqnPkInI+eL9G3LAry12fTPf+toC9UX07F4fI+s=
Подробнее здесь: https://stackoverflow.com/questions/788 ... transforms