Cannot connect to the Sharepoint Site from Visual Studio 2010

28,292

Solution 1

Ref: 2
This issue can be fixed by doing the following :-

  1. Added myself as the administrator

  2. Added myself to SharePoint Farm Admin Group

  3. Provided DB Owner access to SharePoint Content DB

Solution 2

I've tried the below steps and it solved my issue. using Sharepoint Power Shell to grant my user the privileges to Content Databases.

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

UPDATE

I've also found that SQL Server Agent(SHAREPOINT) Service was disables, enabling it solved my issue one more time.

Solution 3

Have you tried to create a new site collection and connecting to that one? Take into account that merely creating the web application isnt enough, the site collection needs to be there as well.

Share:
28,292
Amin Sayed
Author by

Amin Sayed

Updated on August 10, 2022

Comments

  • Amin Sayed
    Amin Sayed over 1 year

    I'm new to Sharepoint. I'm trying to create a simple webpart using Visual Studio 2010 but when I try to validate my Sharepoint Server (both VS 2010 and Sharepoint are present in the same system) it says:

    Cannot connect to the SharePoint site: http://wpnne76648:2010. Make sure 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.

    If I ignore this and click finish and then try to deploy the application it says:

    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.

    Note: I can open my web application in the browser.