Dopo un aggiornamento di Windows può capitare di incorrere in questo errore durante il salvataggio di un workflow fatto con lo SharePoint Designer:
Errore di SharePointDesigner
Errore di SharePointDesigner
Errors were found when compiling the workflow. The workflow files were saved but cannot bu run.
L'aggiornamento in questione è September 2018 .NET Framework security updates e la descrizione del problema è questa SharePoint workflows stop working after you install .NET security updates for CVE-2018-8421.

Un altro errore riconducibile allo stesso problema è:
Errore di SharePointDesigner
Errore di SharePointDesigner
(-1, -1) Type System.CodeDom.CodeBinaryOperatorExpression is not marked as authorized in the application configuration file.)
In pratica i workflow di SharePoint per funzionare richiedono che tutte le dipendenze siano registrate come autorizzate nel we.config. Con l'aggiornamento vengono usati dei nuovi tipi che prima non erano richiesti e quindi non esplicitamente autorizzati.

Per risolvere il problema, in SharePoint 2010, è sufficiente aggiungere, nel web.config del sito, queste linee per autorizzare esplicitamente i tipi mancanti:

XML

<configuration>
  ...
  <System.Workflow.ComponentModel.WorkflowCompiler>
    <authorizedTypes>
      ...
      <authorizedType Assembly="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" NameSpace="System.CodeDom" TypeName="CodeBinaryOperatorExpression" Authorized="True" />
      <authorizedType Assembly="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" NameSpace="System.CodeDom" TypeName="CodePrimitiveExpression" Authorized="True" />
      <authorizedType Assembly="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" NameSpace="System.CodeDom" TypeName="CodeMethodInvokeExpression" Authorized="True" />
      <authorizedType Assembly="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" NameSpace="System.CodeDom" TypeName="CodeMethodReferenceExpression" Authorized="True" />
      <authorizedType Assembly="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" NameSpace="System.CodeDom" TypeName="CodeFieldReferenceExpression" Authorized="True" />
      <authorizedType Assembly="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" NameSpace="System.CodeDom" TypeName="CodeThisReferenceExpression" Authorized="True" />
      <authorizedType Assembly="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" NameSpace="System.CodeDom" TypeName="CodePropertyReferenceExpression" Authorized="True" />
      ...
La modifica va fatta su tutte le web application in tutti i server della farm

Fatto questo è necessario cancellare tutti i file temporanei presenti in
C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files
altrimenti, quasi sicuramente avrai un errore come questo:
Vanno eliminati i file temporanei
Vanno eliminati i file temporanei
Se non riesci a cancellare alcuni file perché risultano bloccati, esegui un iisreset e riprova.
Se il problema persiste prova a chiudere il browser ed eseguire un iisreset su tutti i server della farm.
Tags:
Errori120 Server33 SharePoint497 SharePoint 2010224 SharePoint Designer20 Windows72 Workflow14
Potrebbe interessarti anche: