12

I am using SharePoint 2013 farm if I try to publish Workflow for Document library getting below error.

(-1, -1) Type System.CodeDom.CodeBinaryOperatorExpression is not marked as authorized in the application configuration file.) (0, 0) Activity 'ID5' validation failed: Property "Condition" has invalid value. Condition expression is invalid. The condition expression cannot be null.)

if I check for errors before publishing, there were no errors. enter image description here

1
  • We have tried this but this not working. We are still getting the same error. What else can be missing? We have checked on the server, there is no update installed (KB4457916/KB4457035). Still we are facing this issue.
    – Jignesh
    Commented Oct 23, 2019 at 10:01

3 Answers 3

11

I've had this too, it started yesterday I think. This Microsoft link fixed it for me.

The ​problem was caused by a .Net update. If only these things were tested before they were released!

Below is my workflow error message - all workflows had stopped working in the Sharepoint Farm.

I was told that the MS fix in the above link, running IISRESET and also a WakeUp script fixed it.

my workflow error message

2
  • Yeah, I went through the link you suggested. could you please tell me where you inserted the code or how you fixed it. I am confused with the steps they mentioned in the article.
    – Chetan
    Commented Sep 25, 2018 at 14:44
  • 2
    Tally and Chetan, the code referenced in the MS link above needs to be added to web.config file on the server. In our case, we had to update only the web front end servers, but depending on how your farm is configured then it may differ for you. Commented Oct 1, 2018 at 23:01
9
+100

As a solution for this problem, follow the instructions in this Microsoft support article by adding the code referenced to the web.config file on your SP server. In my organization's case, this was applied only to web front end servers, but check with your IT team to verify that against the topology of your farm.

0
2

Microsoft released a .NET update which causes lots of problems with SharePoint workflows.

The article also contains a PowerShell-Script which fixes the problems caused by the patch: Add-CodeDomAuthorizedType.ps1

Simply download the script on one SharePoint-Server and execute it in SharePoint PowerShell. The changes are automatically propagated within the entire farm (if you have mulitple servers).

Important: This script causes an IIS-Reset on every server. So SharePoint will not be available for some minutes.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.