locked
Error occurred in deployment step ‘Recycle IIS Application Pool’ RRS feed

  • Question

  • Currently i’m working on a development machine for SharePoint 2010. Even the development machine is setup with multiple accounts as security describes. Therefore sometimes you run into strange (security) error messages. The following error message occured when i tried to deploy a SharePoint project from Visual Studio 2010.

    Error occurred in deployment step ‘Recycle IIS Application Pool’: <nativehr>0×80070005</nativehr><nativestack></nativestack>Access denied

    It seems that the account under which your Visual Studio 2010 is running needs to have sufficient rights on the web application to which you are deploying your solution. In my case this was easily fixed by putting my domain account in the site collection administrators list for that specific web application.

    Wednesday, September 14, 2011 6:19 AM

Answers

  • Hi vishal,

    The root cause of the issue is
    1. You don't have IIS restart privilege on windows OS
    2. Even if you have it, you have not added your login account in to SharePoint sitecollection administrator.
    To solve the issue
    To see whether you have privilege or not, you can open a command prompt and type "IISReset". 
    If you able to restart, then it will restart successfully otherwise it will deny it.  The reason is, Though you are in administrators group, windows 2008 will not run on the administrator privilege. Every time when you do an operation like IIS restart or Installation, it will prompt for UAC (User Account Control). You should accept the dialog box and elevate the privilege to run the operation. 

    Or you can right click the application whatever you want to run and click the menu option "Run as Administrator" which will solve the issue.
    If you want to avoid UAC and directly run through you admin account then, go to Control panel -> Manage account -> Hide UAC


    Second if you have all the privilege and still you are getting error in VS2010 as "'Recycle IIS Application Pool':0x80070005Access denied, then you have to add your account in to site collection admin.
    1) You can do this by going to sharepoint administration page.
    2) Navigate to the site collection administration option
    3) Add your name into site collection administrator as a second owner. SharePoint will allow a second owner for site colleciton

    For more informaion, please refer to:
    http://blogs.msdn.com/b/suresh/archive/2011/01/01/recycle-iis-application-pool-0x80070005-access-denied-deploying-sharepoint-solution-iis-restart-issue.aspx

    Thanks,
    Simon

    • Marked as answer by Shimin Huang Sunday, September 25, 2011 6:51 AM
    Wednesday, September 21, 2011 2:28 AM

All replies

  • Hi,

    sound little wierd.

    try running your VS in administrator [run as administrator]

    Restart IIS and give a try.


    "The Only Way To Get Smarter Is By Playing A Smarter Opponent"
    Wednesday, September 14, 2011 7:35 AM
  • Dear Ravi S Kulkarni,

    I have already done this activity but no help.

     

     Thanks

    Wednesday, September 14, 2011 10:08 AM
  • Hi,

    U don't have right permissions.You need to login as administrator then deploy.

     

    Thursday, September 15, 2011 6:47 AM
  • Dear Ravi599,

     I have already done this activity.

           I have administrator permission as well login as administrator and run as administrator, then deploy it. but no help

    Thursday, September 15, 2011 7:23 AM
  • Hi,

    It seems that the account under which your Visual Studio 2010 is running needs to have sufficient rights on the web application to which you are deploying your solution. In this case this was easily fixed by putting your domain account details in the site collection administrators list for that specific web application.

    And remember to us VS as Run as Administrator.Before all this do an IISRESET.

     


    Praveen Mandalapu
    Thursday, September 15, 2011 8:43 AM
  • Hi Praveen ,

       I have install my visual studio 2010 in administrator a\c and open it run as administrator.

    Run This command IISRESET as well but no help

     

    Thursday, September 15, 2011 9:07 AM
  • Hi,

    As i said previously, please try by putting your domain account details in the site collection administrators list in sharepoint for that specific web application.

    Let me know.


    Praveen Mandalapu
    Thursday, September 15, 2011 10:11 AM
  • Run VS as administrator and then Retract the solution and then try to deploy it.

    Sometimes due to process running in the application pool the VS fails in recycling the app Pool. 

     

    Else try to run VS from the App Pool account and then deploy

    Thursday, September 15, 2011 10:15 AM
  • HI,

    Yes I done this but still same Error.

     

    Thursday, September 15, 2011 10:50 AM
  • Hi Anshul.,

     

       I have already done it , but still not working!

     

    Thursday, September 15, 2011 10:51 AM
  • HI,

    Yes I done this but still same Error.

    Thursday, September 15, 2011 10:56 AM
  • Hi Vishal,

    From the above replies, I think the most possbile reason is that you did not assign the current user sysadmin role in Server Roles of SQL Server.

    Please assign the user sysadmin role in SQL Server, just as the picture show below:

    Thanks,
    Simon

    Tuesday, September 20, 2011 8:42 AM
  • Hi Shimin Huang,

                               I have done this step, but did not help.

     

      Thankx

    Tuesday, September 20, 2011 12:57 PM
  • Hi vishal,

    The root cause of the issue is
    1. You don't have IIS restart privilege on windows OS
    2. Even if you have it, you have not added your login account in to SharePoint sitecollection administrator.
    To solve the issue
    To see whether you have privilege or not, you can open a command prompt and type "IISReset". 
    If you able to restart, then it will restart successfully otherwise it will deny it.  The reason is, Though you are in administrators group, windows 2008 will not run on the administrator privilege. Every time when you do an operation like IIS restart or Installation, it will prompt for UAC (User Account Control). You should accept the dialog box and elevate the privilege to run the operation. 

    Or you can right click the application whatever you want to run and click the menu option "Run as Administrator" which will solve the issue.
    If you want to avoid UAC and directly run through you admin account then, go to Control panel -> Manage account -> Hide UAC


    Second if you have all the privilege and still you are getting error in VS2010 as "'Recycle IIS Application Pool':0x80070005Access denied, then you have to add your account in to site collection admin.
    1) You can do this by going to sharepoint administration page.
    2) Navigate to the site collection administration option
    3) Add your name into site collection administrator as a second owner. SharePoint will allow a second owner for site colleciton

    For more informaion, please refer to:
    http://blogs.msdn.com/b/suresh/archive/2011/01/01/recycle-iis-application-pool-0x80070005-access-denied-deploying-sharepoint-solution-iis-restart-issue.aspx

    Thanks,
    Simon

    • Marked as answer by Shimin Huang Sunday, September 25, 2011 6:51 AM
    Wednesday, September 21, 2011 2:28 AM
  • Hi All,

    We have more than 3 developers working on a single solution file and hence we cannot add them all in the site collection administrator menu.

    When I deploy with administrator credentials in Visual Studio, I am able to successfully deploy to the particular SharePoint Application, but when i login with any of these users, I am not able to as it gives me the below error:

    Error occurred in deployment step 'Recycle IIS Application Pool': <nativehr>0x80070005</nativehr><nativestack></nativestack>Access denied

    We have given administrative rights for these users login to the Active Directory.

    Let us know your valuable feedback regarding the above, so that we could try out those solutions.

    Thanks,

    Alex


    • Edited by Alex Varghese Wednesday, January 22, 2014 10:23 AM
    • Proposed as answer by Alex Varghese Tuesday, November 11, 2014 4:17 AM
    • Unproposed as answer by Alex Varghese Tuesday, November 11, 2014 4:17 AM
    Wednesday, January 22, 2014 8:50 AM
  • I tried all the possible solutions with Active Directory, IIS Authentication and finally was able to fix the issue just by doing the below. Hope this will help you in similar kind of issue.

    1. Do a IIS reset, and check if IIS is resetting. Else disable UAC from control panel and IIS reset will work.
    2. Go to Central Administration site and navigate to the Manage Web Applications page.Click on the web application that hosts the site you are trying to deploy to and then click the User Policy ribbon item. Finally, simply add your windows account to the list of users with the Full Control permission.

    It worked for me!!

    • Proposed as answer by Alex Varghese Tuesday, November 11, 2014 4:17 AM
    Tuesday, November 11, 2014 4:17 AM