SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am getting the following error, when trying to deploy the visual studio generated Blank SharePoint Project.

Error 1 Error occurred in deployment step 'Retract Solution': Cannot connect to the SharePoint site: http://srv-sharepoint:35018/. Make sure that this is a valid URL and the SharePoint site is running on the local computer. If you moved this project to a new computer or if the URL of the SharePoint site has changed since you created the project, update the Site URL property of the project.

I set up a new application so have these 3 now: (Name, URL, Port)

SharePoint - 80 http://srv-sharepoint/ 80

SharePoint Central Administration v4 http://srv-sharepoint:32152/ 32152

SharePoint - Test http://srv-sharepoint:35018/ 35018

Its all on the server. And my project URL is http://srv-sharepoint:35018/

When I changed it to the admin port, it "ran" but just loaded up the admin panel.

What Am I doing wrong?

share|improve this question
If this is your first time to 'deploy' to a new site, you may get this because Visual Studio has different 'recipes' for what happens when you choose to deploy. On a brand spanking new site, there is no pre-existing solution to retract, so, a retraction step will fail (but perhaps the remaining steps of the deployment will succeed?). Then, on the second attempt to deploy, the retraction will succeed b/c there is now something there to retract. – bkwdesign Dec 11 '12 at 15:52
Of course, the specific language in your error does not support my previous comment so much. – bkwdesign Dec 11 '12 at 15:53
After you created your web app, did you proceed to create an actual sharepoint site at that location? (will post script in a new answer) – bkwdesign Dec 11 '12 at 15:56
up vote 1 down vote accepted

Maybe you need to create an actual site in your new web application:

stsadm -o createsite -url http://srv-sharepoint:35018/ -owneremail -ownerlogin CONTOSO\myname -siteTemplate "STS#1" -description "This custom site is a Visual Studio test bed. It may get blasted away and recreated without notice." -title "My Development"
share|improve this answer
Yea, I created a template of a site, via the sharepoint interface (recently). But have hit an error, where I cant open the sharepoint generated one, due to permissions.. Despite Im accessing it from the server. So this could be the answer for my question, but haven't been able to confirm. +1. I'll get back to you – Doomsknight Dec 11 '12 at 16:29

Are you having Administrator privileges on your system? If not...

  1. Add yourself as the administrator
  2. Add yourself to SharePoint Farm Admin Group
  3. Make sure that you have DB Owner access to SharePoint Content DB
share|improve this answer

Maybe it is an Alternate Access Mappings problem. Can you browse your site using http://srv-sharepoint:35018/ or http://localhost:35018/ ? Try replacing srv-sharepoint with localhost and see if it works.

share|improve this answer
THanks, but it does not work. The only site I can browse, with srv-sharepoint or localhost is the administration v4. – Doomsknight Dec 11 '12 at 12:26
Can you browse your site using this URL: srv-sharepoint:35018? and if you change the project URL in visual studio to localhost:35018 you get the same error? – user3470 Dec 11 '12 at 12:32
I cannot browse that no. And yes, Its still the same error :( – Doomsknight Dec 11 '12 at 12:47

Your Answer


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.