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

clip_image002

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 (26)

  1. PANoone says:

    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,

  2. 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.

  3. Daniel says:

    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.

  4. sasikanth says:

    It really saved my time

  5. srikanth says:

    thank god.it is working fine now.

  6. Hitesh Rawat says:

    Worked like a charm..... Thanks Raghavendra Nanjaiah

  7. Free Online Training Videos, Courses and Tutorials says:

    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

  8. SharePoint Online Training in Hyderabad says:

    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

  9. Hossein says:

    Thanks a lot, this solved my problem as well.

  10. Felipe Lodi says:

    Magic! Thanks

  11. JB says:

    IISRESET is not needed above...

  12. Lex Lee says:

    Thanks Rag! This works and like JB said, iisreset is not needed.

  13. Jonathan says:

    Thanks for the workaround. Fixed it for me as well with no IISRESET. I'm guessing this isn't a problem on pure SP2013?

  14. Dipen shah says:

    It's work Perfactly

  15. tyrone says:

    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!

  16. Another JB says:

    Thanks a bunch for this - I didn't have to do the IIS reset to get this to work

  17. worked perfect for me in SP 2013 on prem environment! thanks so much!

  18. HK says:

    I am very new to sharepoint designer, I am not sure execute the work around. anyone can help?

  19. ZeroAdmin says:

    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

  20. Hamid Reza Nasiri says:

    Great! Thanks a lot.

  21. Fabian says:

    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.

  22. Kengo Mori says:

    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.

  23. Abanoub says:

    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.

Skip to main content