Showing posts with label Access Denied. Show all posts
Showing posts with label Access Denied. Show all posts

Friday, June 7, 2013

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.

Error:
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. (see the image below)



Cause:
Your login user has no 'db_owner' access for SharePoint Databases.
1. SharePoint_Config
2. SharePoint_AdminContent_[XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX]
3.Your web application DB in which you want to deploy WSP (Example. WSS_Content_XXXX)

Solution:
Now connect your SQL Server with admin user.
Then select your user which has error in deployment.
Then assign all above DBs to db_owner rights. (see the image below)





Now try to deploy your WSP.

You can successfully deploy WSP.

Happy SharePointing...!!!

Tuesday, May 1, 2012

Access denied. You do not have permission to perform this action or access this resource.

Error:
Access denied. You do not have permission to perform this action or access this resource.

Stack Trace:
at Microsoft.SharePoint.Client.ClientRequest.ProcessResponseStream(Stream responseStream)
at Microsoft.SharePoint.Client.ClientRequest.ProcessResponse()
at Microsoft.SharePoint.Client.ClientRequest.ExecuteQueryToServer(ChunkStringBuilder sb)
at Microsoft.SharePoint.Client.ClientRequest.ExecuteQuery()
at Microsoft.SharePoint.Client.ClientRuntimeContext.ExecuteQuery()
at Microsoft.SharePoint.Client.ClientContext.ExecuteQuery()
at ConsoleApplication2.Program.getSubWebs(Web orootweb, String path)

Error Code:
clientContext.Load(oWebsite, website => website.Webs, website => website.Title);
clientContext.ExecuteQuery();
 
Error Cause:
There lots of SubSites and some Webs has not permission so when we call  "website => website.Webs" above error file.
 
Error Resolution:
There is one out of the box method for fetch Current User's site (WebCollection result = oWebsite.GetSubwebsForCurrentUser(new SubwebQuery());).
 
Working Code:
WebCollection result = oWebsite.GetSubwebsForCurrentUser(new SubwebQuery());
clientContext.Load(result, n => n.Include(o => o.Title));
clientContext.ExecuteQuery();
 

Happy SharePointing...!!!