8
votes

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.

6
check thisNiranjan Singh
Thanks Niranjan.. Will look at this..Amin Sayed

6 Answers

7
votes

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

3
votes

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.

1
votes

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.

0
votes
$db = Get-SPContentDatabase -WebApplication http://mycompany.corp/
Add-SPShellAdmin -UserName domainName\username -database $db.Id
0
votes

OK, if you have a local SharePoint Farm, you may have to create an AAM pointing to the default URL.

For example, I created a Web App: http://portaldev10.jedi.local but VS defaulted to http://DEV2010 and nothing I could do could get it to resolve the DNS URL... so I created an Internal AAM and VS works.

Crazy... I know

0
votes

Probably this step will help you.

I tried all the possible solutions with Active Directory, IIS Authentication and finally was able to fix the issue just by doing the below. Hope this will help you in similar kind of issue.

1.Do a IIS reset

2.Check if IIS is resetting.

3.If it is not, then disable UAC from control panel and IIS reset will work.

4.Go to Central Administration site

5.Navigate to the Manage Web Applications page

6.Click on the web application that hosts the site you are trying to deploy

7.Click the User Policy ribbon item.

8.Add your windows account to the list of users with the Full Control permission.

Good Luck