5

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.

Ron.B.I
  • 2,726
  • 1
  • 20
  • 27
Rizwan
  • 63
  • 2
  • 5
  • 10
  • Connect to the SQL Server configured for your SharePoint environment and check that you have read & write permissions on the Configuration and Content Databases. – Rodrigo Molinas Feb 05 '14 at 03:16

1 Answers1

2

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.

GoldBishop
  • 2,820
  • 4
  • 47
  • 82
  • Chekcking SQL permissions worked for me! Thanks... Guys.. If you do a Service pack update, you might face this error when creating a project that connects to the SharePoint site. – Muhammedh Aug 24 '14 at 06:07
  • 1
    @Muhammedh also remember that by default (SQL 2012+) the `BUILTIN\Administrators` group no longer has auto `sysadmin` rights on new install. So if you are relying on that local security group for rights, it would be best to create a AD Group to manage SQL Instances and leave, or disable, `BUILTIN\Administrators` group as public only. – GoldBishop Oct 07 '14 at 13:56