I wrote a small C# .Net 4.5.2 application to rename some doc libraries. It fails at the very beginning:
using(SPSite sitecoll=new SPSite("http://192.168.0.14:8069"))
with the message
Web application at http://localhost cannot be found
- The same app in the dev server runs fine, but there sharepoint is mapped to http://localhost.
- The same commands issued via powershell run fine.
- Sharepoint is totally accessible both locally and remotely via VPN, and I'm running the application as a sharepoint/site administrator.
- I also tried using the machine name http://sharepoint:8069 and http://localhost:8069
I get slightly different errors running from the dev machine, remotely via VPN, in this case the URL is reported correctly:
The web application at http://192.168.0.14:8069 cannot be found
UPDATE I even tried a non-existing name, http://foo:8069, and I get the same reply! Any advice? Thank you