Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I am a new administrator to a SharePoint farm and I want to start developing *web-part*s for our sites.

In our company we have installed SharePoint 2010 on Windows Server 2008 R2.

And we have installed Microsoft visual studio 2010 on that server.

We also have Microsoft SQL server management studio installed in the same server. In my computer (Windows 7 professional), I have used remote desktop connection to access that server.

From SharePoint central administration, I have created new application, new site collection and new site.

I started VS with admin rights.

From File => New => Project =>Visual basic => SharePoint =>2010 => Empty SharePoint project => ok

Then I got a dialog box asking me to enter the local site that I want to use for debugging. I entered "http://sharepoint:21029/team1/"

I chose deploy as a farm solution checkbox.

Click Validate.

The problem is:

When I click Validate, I get the following error:

Cannot connect to the SharePoint site: "http://sharepoint:21029/team1/" 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.


I made a lot of searches on the internet and finally I found this link:

http://www.sharemuch.com/2010/03/19/resolving-vs-2010-solution-deployment-issues-for-sharepoint-2010-projects/

When I tried to solve my problem as described in the previous link, I could not find the following databases:

SharePoint_Config

SharePoint_AdminContent_[guid]

SharePoint Site Content DB

Why I could not find the databases in the SQL Management Studio? And why I get the error?

I want to start developing web-parts in visual studio... Any help please!!

Thank you

share|improve this question
add comment

2 Answers

The databases will exist, you're just looking in the wrong place, or they might be named something different or something unique to your environment. The Site Content DB is normally WSS_Content_[GUID]. The fact that you were able to create the site in Central Admin confirms this.

Make sure you can visit the site in the browser, and that you have access to it. Then, also make sure you are using Visual Studio as the same user that has access to the site.

If /team1/ is a subsite, try telling visual studio to go to the root (or top-level site) instead.

share|improve this answer
    
Yes I can visit the site in the browser ,I am using the same user in VS and the same error happen when I use the root site collection instead of team1. What can I do !! –  D_user Jan 26 '13 at 12:16
    
Try opening the Visual Studio with Run as Administrator! About the databases, can you look if an instance named SharePoint is installed on your database server! When you install SharePoint Foundation with single server, it installs a new instance named SQL-SERVER-NAME\SharePoint... –  Arsalan Adam Khatri Jan 26 '13 at 12:21
    
yes I started VS with admin rights. In our environment we have SharePoint server not foundation version. When I run Microsoft server Management studio, a dialog box appears as the following: Server type: Database engine, Server name: SHAREPOINT\SQLEXPRESS and Authentication: windows authentication. –  D_user Jan 26 '13 at 12:35
    
Actually, I only have System databases (master, model, msdb, tempdb). no more ! –  D_user Jan 26 '13 at 12:36
    
In Central Admin, go to Applicaton Management -> Manage Content Databases, this will tell you where (what server + what instance) they are. –  James Love Jan 26 '13 at 12:37
add comment
up vote 0 down vote accepted

I got the solution finally :)

I found this critical in Event Viewer:

SQL database log in for 'SharePoint_Config' on instance 'sharepoint' failed.

I did the following steps and it solves my issue and I can now connect visual studio to my SharePoint site successfully ^_^


Grant correct permissions to the database access account

To resolve this issue, assign the database access account and then verify that the account has correct permission in SQL Server.

To assign the database access account:

  1. On the Central Administration Web page, on the Quick Launch, click Security, and in the General Security section click Configure service accounts.

  2. In the Credential Management section, in the upper drop-down list click the correct Web application pool for your Web application.

  3. In the Select an account for this component drop-down list, click the domain account with which you want to associate this Web application pool, or click Register new managed account to associate a new domain account with this application pool.

  4. Click OK to save changes.


Thank you all

share|improve this answer
    
technet.microsoft.com/en-us/library/ee513059(v=office.14).aspx –  D_user Jan 28 '13 at 11:56
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.