Deploy Solution to Site configured with Claims-based Authentication

This is a simple and quick post to provide a solution for developers working against sites configured with claims-based authentication and receiving an access denied error while trying to deploy solutions via Visual Studio. The exact error is:

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


The problem here is that Visual Studio is trying to access the site, specified in the project’s Site URL property, using the currently logged on windows account. As the site has been configured for claims-based authentication only, this process causes the access denied error to be thrown.

A quick fix for the development environment is to explicitly add your user account to the Web Application. Doing this will allow the Visual Studio process to recycle the application pool and deploy the solution package.

To do this, bring up the Central Administration site and navigate to the Manage Web Applications page (/_admin/WebApplicationList.aspx). 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.

16 comments

  1. Harcid says:

    Thank you very much! That works. 🙂

  2. Fredrik says:

    Nice. Finnally a simple solution that works!!

  3. MAC says:

    Rather imperative post.. very useful… Thanks

  4. Dan says:

    Thank you very much, very helpful post!

  5. ali kemal says:

    it works, thanks

  6. Ishfaque Ahmed says:

    Dear All,

    I am too encountering same issue and for resolution followed the steps as mentioned above but this has not worked.
    Can any one please help me. I have a state machine workflow which when i deploy gets error mentioned above.

    • Stu says:

      Can you check if the user account the deployment is running under has site collection administrator privileges and try again? I suspect it may be a permission issue.

  7. Jez says:

    Very useful bit of information.

    Thank you.

    Went on a microsoft sharepoint course recently. They never bothered to tell us any deployment/administration stuff.

  8. dbpraveen says:

    Thank you so much, It help me lot.

  9. moslem says:

    thank you very much,your text is very usefull.

  10. Nguyen says:

    Thanks you ver much…it’s well done

  11. sidhu says:

    great post thanks

  12. Daniel says:

    It works like charm! Thanks a lot!

  13. abhishek says:

    Thanks it helped 🙂

  14. Alvino says:

    Works fine to me, thanks!

Leave a Reply

Your email address will not be published. Required fields are marked *

Solve the maths problem shown below before posting: *

Follow

Get every new post delivered to your Inbox

Join other followers: