Nintex – System.CodeDom.CodeTypeReferenceExpression – Workflows werden abgebrochen
Nintex Workflows werden vom System abgebrochen. In den ULS-Logs findet man folgende und ähnliche Fehlermeldungen.
Type System.CodeDom.CodeBinaryOperatorExpression is not marked as authorized in the application configuration file.
ULS-Log (English-System)
SharePoint Foundation Workflow Infrastructure 72fs Unexpected RunWorkflow: Microsoft.SharePoint.SPException: <Error><CompilerError Line=“-1″ Column=“-1″ Text=“Type System.CodeDom.CodeBinaryOperatorExpression is not marked as authorized in the application configuration file.“ />
Der Typ "System.CodeDom.CodeBinaryOperatorExpression" ist in der Konfigurationsdatei der Anwendung nicht als autorisiert gekennzeichnet.
ULS-Log (Deutsches System)
SharePoint Foundation Workflow Infrastructure 72fs Unexpected RunWorkflow: Microsoft.SharePoint.SPException: <Error><CompilerError Line=“-1″ Column=“-1″ Text=“Der Typ "System.CodeDom.CodeBinaryOperatorExpression" ist in der Konfigurationsdatei der Anwendung nicht als autorisiert gekennzeichnet.“ />
Type System.CodeDom.CodeTypeReferenceExpression is not marked as authorized in the application configuration file.
ULS-Log (English-System)
SharePoint Foundation Legacy Workflow Infrastructure 98d8 Unexpected Microsoft.SharePoint.SPException: <Error><CompilerError Line=“-1″ Column=“-1″ Text=“Type System.CodeDom.CodeTypeReferenceExpression is not marked as authorized in the application configuration file.“ />
Der Typ "System.CodeDom.CodeTypeReferenceExpression" ist in der Konfigurationsdatei der Anwendung nicht als autorisiert gekennzeichnet.
ULS-Log (Deutsches System)
OWSTIMER.EXE (0x2654) 0x2278 SharePoint Foundation Legacy Workflow Infrastructure 98d8 Unexpected Microsoft.SharePoint.SPException: <Error><CompilerError Line=“-1″ Column=“-1″ Text=“Der Typ "System.CodeDom.CodeTypeReferenceExpression" ist in der Konfigurationsdatei der Anwendung nicht als autorisiert gekennzeichnet.“ />
Details
SharePoint Umgebung
- SharePoint 2013 SP1 (On-Premises, 3 Tier Cluster)
- MS SQL-Server 2008 R2 Failover-Cluster
- Nintex Workflow 2013 & Nintex Forms 2013
ULS Log
In den ULS Logs findet man folgende und ähnliche Einträge
Type System.CodeDom.CodeBinaryOperatorExpression is not marked as authorized in the application configuration file.
ULS-Log (English-System)
SharePoint Foundation Workflow Infrastructure 72fs Unexpected RunWorkflow: Microsoft.SharePoint.SPException: <Error><CompilerError Line=“-1″ Column=“-1″ Text=“Type System.CodeDom.CodeBinaryOperatorExpression is not marked as authorized in the application configuration file.“ />
. . .
Activity . . . validation failed: Property "Condition" has invalid value. Condition expression is invalid. The condition expression can not be null.
Der Typ "System.CodeDom.CodeBinaryOperatorExpression" ist in der Konfigurationsdatei der Anwendung nicht als autorisiert gekennzeichnet.
ULS-Log (Deutsches System)
SharePoint Foundation Workflow Infrastructure 72fs Unexpected RunWorkflow: Microsoft.SharePoint.SPException: <Error><CompilerError Line=“-1″ Column=“-1″ Text=“Der Typ "System.CodeDom.CodeBinaryOperatorExpression" ist in der Konfigurationsdatei der Anwendung nicht als autorisiert gekennzeichnet.“ />
Type System.CodeDom.CodeTypeReferenceExpression is not marked as authorized in the application configuration file.
ULS-Log (English-System)
SharePoint Foundation Legacy Workflow Infrastructure 98d8 Unexpected Microsoft.SharePoint.SPException: <Error><CompilerError Line=“-1″ Column=“-1″ Text=“Type System.CodeDom.CodeTypeReferenceExpression is not marked as authorized in the application configuration file.“ />
. . .
Activity . . . validation failed: Property "Condition" has invalid value. Condition expression is invalid. The condition expression can not be null.
Der Typ "System.CodeDom.CodeTypeReferenceExpression" ist in der Konfigurationsdatei der Anwendung nicht als autorisiert gekennzeichnet.
ULS-Log (Deutsches System)
OWSTIMER.EXE (0x2654) 0x2278 SharePoint Foundation Legacy Workflow Infrastructure 98d8 Unexpected Microsoft.SharePoint.SPException: <Error><CompilerError Line=“-1″ Column=“-1″ Text=“Der Typ "System.CodeDom.CodeTypeReferenceExpression" ist in der Konfigurationsdatei der Anwendung nicht als autorisiert gekennzeichnet.“ /><CompilerError Line=“-1″ Column=“-1″ Text=“Der Typ "System.CodeDom.CodeTypeReferenceExpression" ist in der Konfigurationsdatei der Anwendung nicht als autorisiert gekennzeichnet.“ />
. . .
<CompilerError Line=“-1″ Column=“-1″ Text=“Der Typ "System.CodeDom.CodeTypeReferenceExpression" ist in der Konfigurationsdatei der Anwendung nicht als autorisiert gekennzeichnet.“ /><CompilerError Line=“0″ Column=“0″ Text=“Fehler beim Validieren der Aktivität ‚SMloop272c141e96864c3d9d46621ea0e60cb1′: Die Eigenschaft "Condition" hat einen ungültigen Wert. Der Bedingungsausdruck ist ungültig. Das Zielobjekt für die Methode "Compare" darf nicht Null sein.“ /><CompilerError Line=“0″ Column=“0″ Text=“Fehler beim Validieren der Aktivität ’state2Activity1‘: Die Eigenschaft "Condition" hat einen ungültigen Wert. Der Bedingungsausdruck ist ungültig. Das Zielobjekt für die Methode "Compare" darf nicht Null sein.“ />
. . .
<CompilerError Line=“0″ Column=“0″ Text=“Fehler beim Validieren der Aktivität ‚SwitchBranch7f0af9d51d38456db64fac647e2d7942‘: Die Eigenschaft "Condition" hat einen ungültigen Wert. Der Bedingungsausdruck ist ungültig. Das Zielobjekt für die Methode "Compare" darf nicht Null sein.“ /><CompilerError Line=“0″ Column=“0″ Text=“Fehler beim Validieren der Aktivität ‚brnch3cf932551f0241a78cea6ed3626d49ca‘: Die Eigenschaft "Condition" hat einen ungültigen Wert. Der Bedingungsausdruck ist ungültig. Das Zielobjekt für die Methode "Compare" darf nicht Null sein.“ /></Error> bei Microsoft.SharePoint.Workflow.SPNoCodeXomlCompiler.LoadXomlAssembly(SPWorkflowAssociation association, SPWeb web) bei Microsoft.SharePoint.Workflow.SPWinOeHostServices.LoadDeclarativeAssembly(SPWorkflowAssociation association, Boolean fallback) bei Microsoft.SharePoint.Workflow.SPWinOeHostServices.CreateInstance(SPWorkflow workflow) bei Microsoft.SharePoint.Workflow.SPWinOeEngine.RunWorkflow(SPWorkflowHostService host, SPWorkflow workflow, Collection`1 e 2ffba89e-c13e-f0a2-b102-3a742216afbe
Meldung von der Webseite: Der Typ"System.CodeDom.CodeTypeReferenceExpression"ist in der Konfigurationsdatei der Anwendung nicht als autorisiert gekennzeichnet
Meldung von der Webseite
soap:ServerDie Anforderung konnte vom Server nicht verarbeitet werden. —> Fehler bei der Veröffentlichung des Workflows: <Error><CompilerError Line=“-1″ Column=“-1″ Text=“Der Typ"System.CodeDom.CodeTypeReferenceExpression"ist in der Konfigurationsdatei der Anwendung nicht als autorisiert gekennzeichnet.“ />
Beschreibung
Es ist wahrscheinlich, dass der Fehler aufgetreten ist, nachdem Sicherheitsupdates für .NET mit z.B. KB-Nummern KB4457919 (2018-09 Sicherheits- und Qualitätsrollup für .NET Framework), KB4457915 (2018-09 Sicherheitsupdate für .NET Framework) o.Ä. vom 2018-09 installiert wurden. Diese schließen die Sicherheitslöcher aber bewirken damit leider auch, dass die Workflow-Engine danach nicht mehr funktioniert.
An Anfang galt es als Lösung die web.config zu editieren, später gab es ein Skript dazu, letztendlich hat Microsoft ein 2018-11 CU (Cumulative Update) rausgebracht (welches normalerweise per Windows-Update) eingespielt wird (hier KB4461511).
Dieses November-CU fügt folgende Zeilen in web.config Datei jeder Web-App
<authorizedTypes>
<targetFx version="v4.0">
. . .
<authorizedType Assembly="System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" Namespace="System.CodeDom" TypeName="CodeBinaryOperatorExpression" Authorized="True" />
<authorizedType Assembly="System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" Namespace="System.CodeDom" TypeName="CodePrimitiveExpression" Authorized="True" />
<authorizedType Assembly="System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" Namespace="System.CodeDom" TypeName="CodeMethodInvokeExpression" Authorized="True" />
<authorizedType Assembly="System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" Namespace="System.CodeDom" TypeName="CodeMethodReferenceExpression" Authorized="True" />
<authorizedType Assembly="System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" Namespace="System.CodeDom" TypeName="CodeFieldReferenceExpression" Authorized="True" />
<authorizedType Assembly="System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" Namespace="System.CodeDom" TypeName="CodeThisReferenceExpression" Authorized="True" />
<authorizedType Assembly="System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" Namespace="System.CodeDom" TypeName="CodePropertyReferenceExpression" Authorized="True" />
</targetFx>
</authorizedTypes>
Das Problem dabei ist, dass nach dem Update für Nintex eine zusätzliche Zeile fehlt (s. Note 2)²
Fix
Entweder Deinstallation von .NET Sicherheitspatche von September (nicht empfohlen)
oder s. unten.
Schritt #1 – 2018-11 CU installieren
Installation von einem dieser drei KBs (passend zum eigenen SP)
entweder manuell installieren
oder ganz normal per Windows-Update installieren.
Durch das Update wurden die web.config Dateien um folgende (grüne) Zeilen ergänzt.
Schritt #2 – web.config kontrollieren/editieren
- Sicherstellen, dass die hier grün markierten Zeilen in allen Portalen bzw. für jede WebApplikation auf jedem Server in der Farm in den web.config Dateien nach dem Installieren von November-CU existieren.
Und
- Folgende hier gelb markierte Zeile zusätzlich eintragen, damit auch Nintex Workflows wieder funktionieren.
<authorizedTypes>
<targetFx version="v4.0">
. . .
<authorizedType Assembly="System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" Namespace="System.CodeDom" TypeName="CodeBinaryOperatorExpression" Authorized="True" />
<authorizedType Assembly="System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" Namespace="System.CodeDom" TypeName="CodePrimitiveExpression" Authorized="True" />
<authorizedType Assembly="System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" Namespace="System.CodeDom" TypeName="CodeMethodInvokeExpression" Authorized="True" />
<authorizedType Assembly="System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" Namespace="System.CodeDom" TypeName="CodeMethodReferenceExpression" Authorized="True" />
<authorizedType Assembly="System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" Namespace="System.CodeDom" TypeName="CodeFieldReferenceExpression" Authorized="True" />
<authorizedType Assembly="System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" Namespace="System.CodeDom" TypeName="CodeThisReferenceExpression" Authorized="True" />
<authorizedType Assembly="System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" Namespace="System.CodeDom" TypeName="CodePropertyReferenceExpression" Authorized="True" />
<authorizedType Assembly="System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" NameSpace="System.CodeDom" TypeName="CodeTypeReferenceExpression" Authorized="True" />
</targetFx>
</authorizedTypes>
iisreset
durchführen.
Links
- community.nintex.com: .Net Update
- blogs.msdn.microsoft.com: After installing .NET security patches to address CVE-2018-8421, SharePoint workflows stop working (KB 4457916/4457035 and others)
- support.microsoft.com: SharePoint workflows stop working after you install .NET security updates for CVE-2018-8421