Saturday 15 February 2014

Error occurred in deployment step 'Uninstall app for SharePoint': The local SharePoint server is not available.

Hmmm, was excited enough to deploy my first SharePoint hosted app but this error ruined the joys,

Error occurred in deployment step 'Uninstall app for SharePoint': The local SharePoint server is not available. Check that the server is running and connected to the SharePoint farm.

Now what ? error doesn't help much at all, so lets look at logs, the way I debug any issue regarding SharePoint is,

 - Check event logs in Event Viewer.

 - If don't find anything in Event Viewer then ULS Viewer, check this post if you don't know how to debug       using ULS Viewer.


Other than that you can also use SVC_Trace exe or fiddler for debugging web services or client side code, anyway coming back to topic, in this case I find the real error in event viewer,

SQL database login for 'TestServer01_Config' on instance 'SQLTEST01' failed. Additional error information from SQL Server is included below.
Login failed for user 'DEV\mr'.

So when we deploy a solution to SharePoint site using Visual Studio, it uses the account we are running Visual Studio as to deploy the solution, which in return makes changes to SharePoint config database, so if account doesn't have access to SP config, it will fail to deploy solution. As you would had figured out the solution, just give development account permission to SharePoint config database.

Edit

I have given my development account SP_DATA_ACCESS permissions on all relevant databases as shown in picture below,



Edit-2

Unfortunately above steps didn't solved the problem and lead to another error,
SQL Database 'WSS_Content_Dev' on SQL Server instance 'TESTSERVER01' not found. Additional error information from SQL Server is included below.
Cannot open database "WSS_Content_Dev" requested by the login. The login failed.
Login failed for user 'DEV\mr'.

Giving development user "dev\mr" in this case "SP_Data_Access" permissions on WSS_Content_Dev solved the problem :-).

This solved the problem of deploying my first app to SharePoint server.



Note:
I am giving development account permissions to SharePoint configuration database because it's a test environment, however if on production environment, your SharePoint administrator account should be deploying the solution and should have right permissions already.

No comments:

Post a Comment