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

Asked

Viewed 3,900 times

4

We have a system that sends lots of RPS to prefectures of various cities in Brazil. The system was sending lots of RPS smoothly but last Friday (11/03/2016) stopped working and presented the message: Poorly formed reference element. We identify that this error occurs at the time of signing the XML file (signedXml.Computesignature()).

To resolve this issue, we uninstall all windows updates of the previous day (10/03/2016) concerning: Security Update for Microsoft Windows - KB3140735, KB3140410; KB3139940; KB3139929; KB3139914; KB3139852; KB313939398; KB3138962; KB3138910; KB3135988; KB3135983 and Update for Microsoft Windows - KB3138612; KB3121255; KB3118401; KB2952664. (Note: We did not identify which of these updates caused this problem)

Atualizações do Windows desinstaladas

I hope this tip helps anyone with this problem.

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

If anyone knows how to solve this problem without needing to uninstall windows updates, I thank you.

Hug. Alexandre Melo

  • In the case of Windows 10, I "solved" the problem by removing the update: KB-3140768.But that’s not a solution! Like Alexandre, I would also like a solution. I could not implement the solution described in this topic: Possible solution Hug

  • in windows server 2008 install the MS certificate that resolves, in 2012 I am still testing a practical solution. Certificate: http://go.microsoft.com/fwlink/? Linkid=747875&clcid=0x409 Flayner

2 answers

3

Fixed issue.

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

Along with this fix, some rules to form the id of an XML that will be signed.

1st. The Id need to start with letters, can’t start with numbers;
2nd. The character of / is no longer accepted in the content of Id. I imagine that other special characters are also not accepted, as :;^~, etc.

  • 1

    You are the same who created the question?

0

Microsoft’s support for this theme is at the following address: https://support.microsoft.com/en-us/kb/3148821

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, there are updates for each version of system and framework

Browser other questions tagged

You are not signed in. Login or sign up in order to post.