Question

I'm new to Sharepoint. I'm trying to create a simple webpart using Visual Studio 2010 but when I try to validate my Sharepoint Server (both VS 2010 and Sharepoint are present in two different system - the environment is FARM level deployment) it says:

Cannot connect to the SharePoint site: http://wpnne76648:2010. 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.

If I ignore this and click finish and then try to deploy the application it says:

Error occurred in deployment step 'Recycle IIS Application Pool': The local SharePoint server is not available. Check that the server is running and connected to the SharePoint farm.

Note: I can open my web application in the browser.

Était-ce utile?

La solution

It sounds like bad DNS resolution from Visual Studio, or bad user credentials.

So you have a web application at http://wpnne76648:2010, and wpnne76648 is the local name of your server? Do you have alternate access mappings in place for the FQDN also? If you open a browser on this server and point it to http://wpnne76648:2010 does the web application open?

There could be a number of things in the way. If this is a development environment, you can add a hosts file that points wpnne76648 to 127.0.0.1 (localhost), which will force it to resolve locally as opposed to going out to DNS and resolving to the IP for the machine. I wouldn't do this for production, but it's a quick way to prove if your issues are DNS related in a development or lab environment.

The second piece is that as you quick deploy or deploy solutions from Visual Studio to the SharePoint server, Visual Studio needs the ability to access everything on the system and call for IISReset. Make sure the user account you're logged in while you're trying to do all of this is local admin. As a better practice to get into, do any solution development logged in as the setup/install account for the farm, as this account is local admin on all SharePoint boxes, unlike the farm account which should not be local admin on any of the boxes.

It's "possible" it's blowing up on the connection because it knows it doesn't have sufficient rights to do what it will ultimately need to (hence the IIS error).

This can also occur when you don't run VS as an admin.

Autres conseils

Please make sure your application is running on 'Any CPU'. Having it set to x86 will prevent VS from connecting properly.

You can check this by opening the project menu and selecting ' Properties' and then navigate to the 'Build' tab. 'Platform target:' is where you will see the option, and set it to Any CPU.

Sharepoint should run on same machine as vs for this type of deploy.

Your should be a local and farm admin.

User the local host URL.

Disable the loop back check : http://iedaddy.com/2009/04/sharepointdisable-loopback-check/

Licencié sous: CC-BY-SA avec attribution
Non affilié à sharepoint.stackexchange
scroll top