Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio 2012: can't connect to sharepoint site

I'm trying to create a simple webpart using Visual Studio 2012 but when I try to validate my Sharepoint Server it says:

Cannot connect to the SharePoint site: "url" that the Site URL is valid, that the SharePoint site is running on the local computer, and that the current user as the necessary permissions to access the site.

i have SharePoint 2013 installed on my local machine and I can browse the site.

I tried this solution (resolving-vs-2010-solution-deployment-issues-for-sharepoint-2010-projects) and added my user as in mentioned DBs. For confirmation i ran executed the query :

Add-SPShellAdmin -UserName domain\username 

and the result was :

"Cannot add dcci\User2 to the SharePoint_Shell_Access role of the database SharePoint_Config. A possible cause of this error is that the account name was already added to the database as a login using a different user name than the account name."

Secondly, I have configured the Alternate access mapping for my site, it is running on port 91 for one zone and on default 80 other. I have tried both the URLs to validate the result. below is the detail from event viewer.

RegOpenKeyExW(-2147483646,SYSTEM\CurrentControlSet\Services\VSS\Diag,...) 0x80070005, Access is denied. Operation: Initializing Writer Context: Writer Class Id: {0ff1ce15-0201-0000-0000-000000000000} Writer Name: OSearch15 VSS Writer Writer Instance Name: OSearch15 Replication Service Writer Instance ID: {e8767b85-1452-4bd1-8091-6fe8ed6fd8ce}

Any help would be really appreciated.

like image 983
Rizwan Avatar asked Nov 03 '22 18:11

Rizwan


1 Answers

Verify that your Login is in the db_owner group on the SQL Instance.

  1. Follow this guide step by step and verify each step is true: Account Permissions and Security Settings in SharePoint 2013. This one is more detailed and maybe a little overboard for what you need, but it is the long path for access rights. Refer to #2 for a simpler path.

  2. Another good simple guide: Prepare your SharePoint 2013 farm for App development and debugging. This Guide fixed most of my local development needs.

like image 81
GoldBishop Avatar answered Dec 24 '22 12:12

GoldBishop