2
votes

I've been searching on Google for a resolution to this problem, but cannot find one that matches yet.

I'm trying to deploy a simple "Hello World" web part to SharePoint using Visual Studios 2010.

I'm getting an error when I hit F5: "Error occurred in deployment step 'Retract Solution': Cannot connect to the SharePoint site: http://example.com/. 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."

Ok, I have done a lot of searching and I'll tell you what I've tried so far. I have full admin rights on the farm, full rights to both databases. I made sure the webpart URL property matches the site property listed in Central Admin as well.

If anyone has any advice or insight it would be greatly appreciated. Thank you in advance.

P.S. (Edit) Also, the farm I'm deploying to and visual studio are on the same machine? would that cause it?

5
Hi Marcush,see this link hope this is helpful for you: social.msdn.microsoft.com/Forums/pl/sharepoint2010general/…Rony SP

5 Answers

2
votes

Check the properties of your project in Visual Studio. Click on project node in solution explorer and press F4, then check there 'Site URL' property. It should contains one of the following

  1. http://[your machine name][:port]/[site collection or web relative URL]
  2. http://localhost[:port]/[site collection or web relative URL]
  3. http://[your machine IP address][:port]/[site collection or web relative URL]

Note that Visual Studio must be installed on that machine which is your Web Front End or Application server.

If you got some errors with solution retracting try first deactivate and delete it via Central Admin. Then try to make some deploy-retract checking cycle in Visual Studio. If you still would get errors please post here the log from Visual Studio Output window (Ctrl+W, O).

1
votes

I was able to go ahead and deploy the web part using STSADM commands from tutorials that you guys referenced in this topic, thanks so much for that.

It seems the problem I'm having involves multi-server install, and I don't think there is a quick work around yet.

Thank you all for the responses!

0
votes

Please do the following

  1. Can you first verify the Site Collection you are trying to deploy is working or not
  2. Open the properties of the SharePoint Project >Properties(F4)> Build Tab and see that the platform has been set to Active(Any CPU).
  3. Delete the Solution from Central Administration and then try to deploy the solution once again.

If you still have the same problem then attach the log file from the SharePoint logs.

Thanks, -Santosh

0
votes

Follow below mentioned steps to debug this issue :
1) Browse the URL in IE on your server where you have hosted the http://mysite.com site.
2) If you are able to browse then try deploying this web part on another site by giving new site URL in project properties in Visual studio.
3) To deploy a solution onto a site you must have visual studio on the same computer where you hosting the site.
4) Try deploying WSP through stsadm, Click here to see the details. To create WSP in Visual studio right click on project -> click on 'Package' -> once its complete right click on project -> click on 'Open in windows explorer' -> open 'bin' directory -> open 'Debug' directory -> you shall see a file named as your project name & extension would be .wsp
5) If anything above doesn't help put down your deploying steps.

0
votes

Have you mention the Site URL property in Visual Studio Sharepoint project?. you can open using (ctrl+shift+p) for Window of Properties then Check project Properties and make sure Site URL is the Web application where you want solution to be deployed.

might be helpful this link: http://www.dev4side.com/community/blog/2010/2/28/error-occurred-in-deployment-step-%27recycle-iis-application-pool%27.aspx