I have a question regarding SharePoint 2019 on-premises workflow. I have implemented a workflow custom action to update a group owner using CSOM (code activity with a workflow custom action) everything worked fine, but when I trigger my SPD13 workflow I receive an error "System.IO.FileNotFoundException: could not load Microsoft.SharePoint.Client, version...." and this error is coming from my code activity solution where I am referencing it to Microsoft.SharePoint.Client.dll and Runtime.dll. any idea how to solve this? thanks!
2 Answers
You copy the following DLLs to the root of your workflow folder:
- Microsoft.SharePoint.Client.dll
- Microsoft.SharePoint.Client.Runtime.dll
- Microsoft.SharePoint.Client.WorkflowServices.dll
-
after adding the dlls under different locations, the error changed to 401 unauthorized.– MYHCommented Nov 21, 2022 at 8:32
-
System.Exception: The remote server returned an error: (401) Unauthorized. ---> System.Net.WebException: The remote server returned an error: (401) Unauthorized.at System.Net.HttpWebRequest.GetResponse()at Microsoft.SharePoint.Client.SPWebRequestExecutor.Execute()at Microsoft.SharePoint.Client.ClientContext. GetFormDigestInfoPrivate()at Microsoft.SharePoint.Client.ClientContext.EnsureFormDigest()at Microsoft.SharePoint.Client.ClientContext.ExecuteQuery()at CustomActivitiesLibrary.GroupOwnerCodeActivity.Execute(CodeActivityContext context)---
– MYHCommented Nov 21, 2022 at 8:38
Copying the dlls under the workflow manager files solved my issue. c:\program files\ workflow manager\1.0\workflow\artificats and WFWebRoot.