Question

I started VS with admin rights, I'm currently in trouble setting up a SharePoint 2010 project.

Today, I installed VS2010 on our new SP 2010 server.

But now I'm failing to create a SharePoint project in Visual Studio. The SharePoint Customization Wizard tells me the following:

Cannot connect to the SharePoint site: http://myserver/blah. 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.

As I'm quite sure that SharePoint is running on the locae system and I'm having no problems browsing SharePoint with my account, I'm wondering what is preventing me to create the project.

Somewhere else I've read that the user, which is running VS2010, needs db_owner rights to the config and admin tables of SP2010, which I've done, unfortunately this didn't affect anything.

Has anybody encountered this problem before?

Was it helpful?

Solution

  • Check what user vssphost14.exe (or vssphost15.exe) is running as (Generally the same user you are using to run VS)
  • Launch SQL Management Studio and connect to your SharePoint SQl Instance
  • Ensure the above user has DB_Owner rights on each of the following databases:
    • SharePoint_Config
    • SharePoint_AdminContent
    • Content DB for the Site collection you are deploying to
  • You may need to restart VS

The above databases may have different names (GUIDs), but the config, admin, and content DBs are the ones you want

OTHER TIPS

Have you checked the project build properties to ensure that it's targeting "All CPUs" as opposed to x86?

I recall this throwing me off in the past.

Adding DBO permissions to the sharepoint databases has resolved the issue

Add the account under which Visual Studio process is running to following DBs as dbowner -

  1. SharePoint content DB
  2. SharePoint central admin content DB
  3. SharePoint configuration DB

After that you will be able to both deploy and debug from Visual Studio.

Reference - http://tech-turf.blogspot.in/2015/12/sharepoint-2013-problem-in-debugging.html

Since you can actually see the site in IE on the box, it means that you aren't fighting the dreaded "loop-back" error. Is the ID you are logging into the box as listed as a Farm Admin in Central Administration?

If that still isn't it, what you can do now is fire up Fiddler, then fire up VS and go through the steps in VS to push content out. After that fails, look in Fiddler for any requests that returned anything other than 200, 302 and 404 and look in the details of sessions. This will tell you exactly what VS was attempting to do and how and why it failed. From there, you should be able to see the real issue.

My solution - Grant the 'sysadmin' server role to the development user account in SQL Server

I had this problem and solved typing explicitly the port to be used:

  1. before: http://localhost/
  2. after: http://localhost:3226/

(You have to check the port you're using)

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top