Digital Signature of RPS Batch (NFS-e) error: Badly formed reference element

3

We have a system that sends lots of RPS to prefectures of several cities of Brazil. The system was sending the batches of RPS without any problems, but last Friday (11/03/2016) it stopped working and returned the message: Malformed reference element . We have identified that this error occurs at the time of signing the XML file ( signedXml.ComputeSignature () ).

To resolve this problem, we uninstalled all the Windows updates from the previous day (10/03/2016) regarding: Security Update for Microsoft Windows - KB3140735, KB3140410; KB3139940; KB3139929; KB3139914; KB3139852; KB3139398; KB3138962; KB3138910; KB3135988; KB3135983 and Update for Microsoft Windows - KB3138612; KB3121255; KB3118401; KB2952664. (Note: We have not identified which of these updates has generated this problem.)

I hope this tip helps anyone with this problem.

Settings I am using: OS: Windows 7 32-bit Development Platform: VB.Net - Visual Studio 2010 (Framework 3.5)

If anyone knows how to solve this problem, without needing to uninstall the windows updates, I appreciate it.

Thank you. Alexandre Melo

    
asked by anonymous 16.03.2016 / 16:05

2 answers

2

Fixed problem.

After updating the framework, a vulnerability correction was made to the signatures.

Along with this fix, some rules for forming the Id of an XML that will be signed.

1st. Id must start with letters, can not start with numbers;
2nd. The / character is no longer accepted in the contents of Id . I guess other special characters are also not accepted, such as :;^~, etc

    
01.04.2016 / 14:58
0

Microsoft support for this topic is located at the following address: link

Even after installing the new key in the machine registry, the solution only appeared with the uninstallation of KB3140745, in my case.

In the MS documentation, you have the updates for each system version and framework

    
22.03.2016 / 12:39