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 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.

share|improve this question
    
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 '12 at 17:03
add comment

3 Answers

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.

share|improve this answer
add comment

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.

share|improve this answer
    
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 '11 at 12:35
    
Visual Studio is installed on the SharePoint server, correct? –  webdes03 May 17 '11 at 13:21
    
That is correct. Also see the edits to OP. –  Luc May 17 '11 at 14:55
add comment

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

share|improve this answer
    
No, that wasn't it. –  Luc May 17 '11 at 10:37
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.