Recently I had a customer ask me about an issue they had with an InfoPath 2010 form template. Below is the scenario, the issue and the final solution.
They had originally created a form template with some custom code and then published it to SharePoint as a content type. To enable users to open a form with custom code the form template needs to be signed with a certificate; which they did.
Jump forward one year…
The certificate expired, so they modified the form template to remove the custom code and instead used a web service that provided the same functionality. They also changed the form options so that it would not be signed. The updated form template was then published back out to the SharePoint content type.
When a person who had used the form template in the past tried to open the new version of the template they received the error message “Form cannot be opened because either the signature is corrupt, or the certificate used to sign the form has expired or been revoked. To fix this problem, contact your form designer.”
A person that never opened the form template previously was able to open the template without any error.
InfoPath was trying to open up the template using a pervious version of the form template which had been cached on the user’s computer. Running the command “infopath /cache clearall” at a command prompt removed all cached form templates from the computer.
Once the cache was cleared all of the users were able to use the new form template without issue.
Note: You may need to switch to the directory where Office was installed in order for the command to run.