Cannot connect to the targeted site.

by | Aug 15, 2013 | SharePoint | 0 comments

Cannot connect to the targeted site.

This error can occur if the specified site is not hosted on the local system. SharePoint solutions work only with locally-installed versions of SharePoint Foundation or SharePoint Server. Remote development is supported only for apps for SharePoint 2013.

This error can occur if the specified site is not hosted on the local system.

If you run your developer environment on virtual machine you probably get this error. When you create SharePoint project you have provide SharePoint site for debugging and when you press validate in Visual Studio you will get an error:
[adblockingdetector id=”5770e6ed85560″]
Cannot connect to the targeted site. This error can occur if the specified site is not hosted on the local system.
SharePoint solutions work only with locally-installed versions of SharePoint Foundation or SharePoint Server.
Remote development is supported only for apps for SharePoint 2013.

The problem also was occurring also in previous SharePoint version. To solve the problem you have to add you server IP address to host file (in windows folder C:Windows\system32\drivers\etc) . For example if you run your site mysite.com at IP address 192.168.1.1 You have to put in host file following line:

192.168.1.1  mysite.com

and save the file. After that you will be able to validate the site without any problem.

Written by Tomasz Szulczewski

Hi, my name is Tomasz Szulczewski, and I have been in love with information technology for over 25 years, but I still have an IT passion and feel like a geek. I am a person who is problem solver who thinks that not all people must be experts in IT.

Related Posts

What is SharePoint in Office 365?

What is SharePoint in Office 365?

What is SharePoint in Office 365, and why is SharePoint for small business the critical product? So you bought a Microsoft 365 license, and your tenant is online. You open a browser, and you have no idea what to do next? Don't worry; I will try to give you a few...

read more
Hubfly

Hubfly

A few days ago I have a chance to play with SharePoint online solution called Hubfly and I was really impressed with his capabilities. And here is my review. So let’s start from the begging. I wrote a few times on this blog that the main problem with SharePoint is...

read more

0 Comments

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.