2

I have a demo SharePoint server with multiple web applications created. Each of them has a host header that is entered into company's DNS. All the web applications are on port 80.

I changed SiteURL property in Visual Studio, but when trying to deploy Visual Studio shows this error:

Error occurred in deployment step 'Recycle IIS Application Pool': Cannot connect to the SharePoint site: http://appname.company.local/. 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.

Visual Studio is installed on the demo server.

UPDATE After tinkering a bit around central admin and AAM and deploying through PSH, I accidentally deployed through VS again, and this time it worked. I have no idea what happened.

1
  • Can't find the answer, numerous blogs suggest different fixes, but basically no-on answers the question as to why the URL from the previous dev environment "is holding on" in the step that connects to Recycle the Application Pool (mine points to previous developers URL, not mine). I have looked at CSProj and made appriopriate mods there ... but where are the deployment steps kept (what is hanging onto the old server name??)
    – user8766
    Jun 8, 2012 at 17:03

3 Answers 3

4

The deployment step in Visual Studio is designed to deploy to the local server for testing. It is not designed to do the deployment to a production server. You should take the .wsp file and install it on the server using PowerShell cmdlet Add-SPSolution.

Having, ahem, re-read the question, I see that you are running VS on the production server. I wouldn't recommend this, even if it is a demo machine.

2

Do you have an alternate access mapping on the web application in SharePoint? If you're simply relying on a host entry to resolve the domain to the IP Visual Studio is probably not seeing that. Make sure you have an AAM in place for the IP and the domain.

And to echo what SPDoctor said, definitely don't be running Visual Studio on a production system. The Visual Studio deployment is designed for development testing. To deploy your feature to production, send over the WSP file and execute the appropriate PowerShell for deployment.

You also need to be doing this as a user that's got administrative access to the box (or at least permissions to reset IIS). I suppose it's possible that it's confused and it just doesn't have the ability to reset IIS if you're not logged in as the farm admin, or a system admin.

3
  • I have an "Internal URL" set to "myapp.company.local", "Zone" to "Default" and "Public URL for Zone" to "myapp.company.local". My domain is indeed resolved by DNS entry. But, I can't seem to find anything in AAM, where I can tell SharePoint/VS that this is a local IP.
    – Luc
    May 17, 2011 at 12:35
  • Visual Studio is installed on the SharePoint server, correct?
    – webdes03
    May 17, 2011 at 13:21
  • That is correct. Also see the edits to OP.
    – Luc
    May 17, 2011 at 14:55
1

It could be the (in)famous loopback adapter issue. Disable it on your demo machine, reboot and try again. (That is if you're developing on the same machine that is hosting your web apps)

Read more here: http://support.microsoft.com/kb/896861

1
  • No, that wasn't it.
    – Luc
    May 17, 2011 at 10:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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