Getting Error occurred in deployment step 'Recycle IIS Application Pool': A task was canceled when deploying custom action to Sharepoint

Kawtar 1 Reputation point
2022-05-24T11:06:18.687+00:00

We're currently trying to deploy a nintex custom action to Sharepoint 2019 using Visual Studio 2015 and .NET Framework 4.6
The issue is that it won't deploy, even though we succeeded in deploying the solution once
We've encountered the following errors in our attempts to fix it

Error occurred in deployment step 'Recycle IIS Application Pool': A task was canceled.

Error occurred in deployment step ‘Recycle IIS Application Pool’: The local SharePoint server is not available. Check that the server is running and connected to the SharePoint farm

We tried these solutions:

  • VS opened as Administrator
  • IISreset executed before every deploy
  • Used account has full control and is the primary site collection administrator
  • We tried restarting the server

Any suggestions on how to fix it?
Thanks.

Microsoft 365 and Office SharePoint Server For business
Microsoft 365 and Office SharePoint Development
Microsoft 365 and Office SharePoint For business Windows
Microsoft 365 and Office SharePoint Server Development
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Tong Zhang_MSFT 9,251 Reputation points
    2022-05-25T01:59:37.68+00:00

    Hi @Kawtar ,

    Per my research, here are some solutions to the errors, please follow the steps in the following article to do troubleshoot:

    1. https://www.c-sharpcorner.com/UploadFile/sagarp/sharepoint-error-occurred-in-deployment-step-recycle-iis-a/
    2. https://spgeeks.devoworx.com/error-occurred-in-deployment-step-recycle-iis-application-pool-the-local-sharepoint-server-is-not-available-check-that-the-server-is-running-and-connected-to-the-sharepoint-farm/

    Similar issues:
    https://social.msdn.microsoft.com/Forums/vstudio/en-US/5385a0dc-71a2-4e8f-bc69-b15689aff77d/error-occurred-in-deployment-step-recycle-iis-application-pool-a-task-was-cancelled?forum=sharepointdevelopment

    Hope it can help you .Thanks for your understanding and support.

    Note: Microsoft is providing this information as a convenience to you. The sites are not controlled by Microsoft. Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. Please make sure that you completely understand the risk before retrieving any suggestions from the above link.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.



  2. Kawtar 1 Reputation point
    2022-05-31T07:38:38.837+00:00

    We finally fixed the problem by clearing visual studio's cache.

    0 comments No comments

  3. Tong Zhang_MSFT 9,251 Reputation points
    2022-05-31T07:55:29.42+00:00

    Hi @Kawtar ,

    I'm glad to hear you solve the problem ,if you have any issue about SharePoint, you are welcome to raise a ticket in this forum.

    By the way, since the Microsoft Q&A community has a policy that "The question author cannot accept their own answer. They can only accept answers by others." and according to the scenario introduced here: Answering your own questions on Microsoft Q&A, I would make a brief summary of this thread:

    [Getting Error occurred in deployment step 'Recycle IIS Application Pool': A task was canceled when deploying custom action to Sharepoint]

    Issue Symptom:
    We're currently trying to deploy a nintex custom action to Sharepoint 2019 using Visual Studio 2015 and .NET Framework 4.6
    The issue is that it won't deploy, even though we succeeded in deploying the solution once
    We've encountered the following errors in our attempts to fix it

    Error occurred in deployment step 'Recycle IIS Application Pool': A task was canceled.
    Error occurred in deployment step ‘Recycle IIS Application Pool’: The local SharePoint server is not available. Check that the server is running and connected to the SharePoint farm

    We tried these solutions:

    • VS opened as Administrator
    • IISreset executed before every deploy
    • Used account has full control and is the primary site collection administrator
    • We tried restarting the server

    Solutions:
    The problem was fixed by clearing visual studio's cache.

    You could click the "Accept Answer" button for this summary to close this thread, and this can make it easier for other community member's to see the useful information when reading this thread. Thanks for your understanding!


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.