Question

We have more than 3 developers working on a single solution file. Because of this, 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. When I login with any of these users, I am not able to. 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.

What can we do to resolve this issue?

Was it helpful?

Solution

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
  2. Check if IIS is resetting.
  3. If it is not, then disable UAC from control panel and IIS reset will work.
  4. Go to Central Administration site
  5. Navigate to the Manage Web Applications page
  6. Click on the web application that hosts the site you are trying to deploy to
  7. Click the User Policy ribbon item.
  8. Add your windows account to the list of users with the Full Control permission.

It worked for me!

OTHER TIPS

Make sure you're a site collection admin

The following worked for me:

  • Open the Sharepoint SQL Server database in Management Studio. The default name of it is SHAREPOINTWEB.
  • Under the Security folder, right click Logins and add the user who needs to deploy solutions. Grant them db_owner schema.

OFFTOPIC:

Even though the problem is solved for the original poster, I came here because I had the same issue, and these solutions (and more found in the internet) didn't help me. This being said...

On-topic:

I'll add the solution that worked for me (in order to avoid duplicates), because it may help someone else:

Deploy the solution to fully created site collection

In Visual Studio 2010-2012:

  1. Right click the Solution you want to deploy (in the Solution explorer)
  2. Go to Properties
  3. Go to the "Site URL" attribute. If the Site's URL you want to deploy it is incomplete (i.e: the port you are working on is missing), change it.

Example

This happened to me, since it was targeting http://webservice/ instead of http://webservice:123/

Source

adding user as a db_owner of the content database solved my problem

In my case, I closed and opened visual studio and it works for me

Run the Visual Studio as administrator and problem will be solved if any with Visual Studio permission.

I came across this when I opened my SharePoint project in Visual Studio and then started my local SharePoint and SQL services (don't leave them running all the time to conserve resources).

The error went away once I closed and restarted Visual Studio once I verified SharePoint was running correctly in the background.

I came across similar situation a year ago and fixed it but then I forgot how i did that. Last night once again it came up. I was trying to deploy a sharepoint solution and this error came up.

if you can then try to restart the server. Sometimes it takes care of most of the problems.

if not then make sure to add your machine's administrator account to sharepoint administration as full control. Why? because when you are deploying via Visual Studio you have to run Visual Studio as Administrator. So you need to ensure that sharepoint is also allowing this login to make changes.

Even I was facing the issue now and then, but it once worked by changing the namespace and then I proceeded, but actually the issue was with the application pool account being locked due to password expiry and while resetting the IIS the app pool got disabled.

So the issue was the App pool account getting locked.

Regards Arvind

I'm posting this answer because even as of SharePoint 2016 (Singer-Server Farm - aka Development Farm) and deploying with Visual Studio 2017, I was still getting this problem. Trying each of these answers was not giving me success.

In my case, re-running the SharePoint 2016 Products Configuration Wizard with your default settings, always solved this problem for me.

One more potential fix for this, as the steps in this thread didn't work for me:

I had to assign myself as the site collection administrator

  1. Central Administration
  2. Application management
  3. Change site collection administrators
  4. Primary Site Collection Administrator => Your account

On the IIS console, checked settings under Authentication. Enable windows and anonymous authentication.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top