Friday, June 01, 2012

Error while deploying package using Visual Studio 2010 to SharePoint 2010

Cannot access the local farm. Verify that the local farm is properly configured, currently available, and that you have the appropriate permissions to access the database before trying again.


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.


The error pops up when userid doesn't have access to configuration and content DB.

There are 2 ways to resolving this issue.

Preferable Method(1st method): 
Use Power shell command to provide user id access to SharePoint DB's.

  • "Add-SPShellAdmin -UserName domain\username" This will add permissions to the config database in SharePoint 2010
  • "Get-SPContentDatabase -WebApplication " This will return information on the content database for the desired web application
  • "Add-SPShellAdmin -UserName domain\username -database " This will add permissions to the content database for the desired web application

2nd method:
Add the userid as DBOwner to Configuration and Content DB. Though this is not best practice but will at least get you going.



sivanesanb said...

Great. works Perfectly.

sivanesanb said...

Works perfectly.

sivanesanb said...

Thanks. Works fine.

Gray Failures: What is it and how to detect one?

If you are reading this article , i guess you are curious to know about gray failures and different methods to detect gray failures.  Hopefu...