SharePoint Designer 2013: Unexpected Error on server associating the workflow
This post is a contribution from Raghavendra Nanjaiah, an engineer with the SharePoint Developer Support team
What is the issue?
When you try to publish the SharePoint 2010 reusable or list workflow on SharePoint 2013 platform using SharePoint designer 2013 you will get following exception in UI
If you carefully observe the ULS logs
08/22/2014 16:17:53.40 w3wp.exe (0x2610) 0x05D4 SharePoint Foundation Legacy Workflow Infrastructure xmfh Medium Workflow Compile Failed: Could not find a part of the path 'C:\Users\devapppool\AppData\Local\Temp\cjjkiult.tmp'. b118b19c-3fad-30ad-ac8b-ed8c02395742
Why we face this issue?
During the workflow publishing phase, SharePoint will create couple of temporary files under the temp folder (of the app pool service account). As part of clean-up process w3wp process will delete this files later.
Sometimes, instead of deleting content inside temp folder w3wp process deletes the temp folder. Because of which workflow publishing fails with “Could not find a part of the path”
How to work around this issue?
Create a text file and provide read only access to file. This will stop process from deleting temp folder.
1. Navigate to C:\Users\<service-acct>\AppData\Local\Temp on both the server (WFE1 and WFE2)
2. Create a text file inside the temp folder and in the properties check read-only option.
3. Reset iis /noforce
4. Publish the workflow.
Comments
- Anonymous
January 01, 2003
I've found that just resetting IIS cures this and many related workflow publishing issues. Recycling the app pool doesn't appear to have any effect in this case, - Anonymous
September 11, 2014
granted, this is a work around... but I'd much rather see a hotfix take care of the problem once and for all... seems like the visibility of a blog post would provide the required necessity to justify the hotfix development. - Anonymous
October 17, 2014
Thanks a lot, this solved my problem as well. A note to others, if the Temp directory isn't there just create it and put the read only file inside. - Anonymous
November 04, 2014
It really saved my time - Anonymous
December 16, 2014
The comment has been removed - Anonymous
January 08, 2015
thanks...it worked - Anonymous
January 24, 2015
Worked like a charm..... Thanks Raghavendra Nanjaiah - Anonymous
February 02, 2015
I absolutely love your blog and find nearly all of your post’s to be precisely what I’m looking for.
http://www.hungrymind.in">Free Online Training, http://www.hungrymind.in">Online Training Courses, http://www.hungrymind.in">Free Online Training Videos - Anonymous
February 02, 2015
Great article ...Thanks for your great information, the contents are quiet interesting. I will be waiting for your next post.
http://staygreenacademy.com">SharePoint Online Training in Hyderabad - Anonymous
February 03, 2015
Thanks a lot, this solved my problem as well. - Anonymous
February 17, 2015
Magic! Thanks - Anonymous
March 11, 2015
IISRESET is not needed above... - Anonymous
March 23, 2015
Thanks Rag! This works and like JB said, iisreset is not needed. - Anonymous
May 22, 2015
Thanks for the workaround. Fixed it for me as well with no IISRESET. I'm guessing this isn't a problem on pure SP2013? - Anonymous
June 17, 2015
It's work Perfactly - Anonymous
June 25, 2015
Thank you everyone! Happy learning.
Raghav
http://blogs.msdn.com/b/codesharepoint/ - Anonymous
July 10, 2015
Thank you so much for this! Other solutions seem to always require an IISReset, which even though is a brief outage, can not be done on a whim. So just creating the Temp folder worked like a charm without any downtime! - Anonymous
July 23, 2015
Thanks a bunch for this - I didn't have to do the IIS reset to get this to work - Anonymous
July 23, 2015
Great - Anonymous
July 30, 2015
worked perfect for me in SP 2013 on prem environment! thanks so much! - Anonymous
August 10, 2015
The comment has been removed - Anonymous
October 16, 2015
This issue is a huge PIA on complex workflows. I have a SP 2013 environment stand alone - 1 server. I am curious to know if users experiencing this problem are working with https sites?
Zero - Anonymous
December 20, 2015
Great! Thanks a lot. - Anonymous
February 08, 2016
I logged on as the app pool identity to each wfe since this account never logged in to the servers before and never had a windows user profile folder created.
Thus the users' folder would be there temporarily and removed as the app pool identity handled certain tasks from the worker process. But once you log in as the app pool account (I granted temporarily Local Administrator rights to it so it could RDP in), sign out, that folder will always be available, and you won't have to worry about the temp folder suddenly disappearing on you. - Anonymous
March 13, 2016
IISReset recreates the lost TEMP folder for you. For that purpoose, it is necessary, as author explains. You can also manually create the folder.
This issue is a bug of .NET Framework 4.x interop workflow and is fixed on .NET 4.6. - Anonymous
December 11, 2016
Hi,i did this steps but unfortunately this cause an impact for the SharePoint server which is "Server Error in '/' Application"anyone can help me.thank you in advance.