Hi,
I am trying to run a simple code like finding all the users in the SharePoint site.
But I am seeing this error constantly no matter what I do!!
The Web application at [URL] could not be found. Verify that you have typed the URL correctly. If the URL should be serving existing content, the system administrator may need to add a new request URL mapping to the intended application.
I’ve changed project properties ‘Any cpu’ to x64Â and tried but failed.
Thanks
I’ve checked all the suggestions you people gave me with no luck.
Here is a simple code that I am trying to do:
class Program
{
static void Main(string[] args)
{Â Â Â Â Â Â
//site url          Â
string siteurl = https://xxxxx;
using (SPSite site = new SPSite(siteurl))
{Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â
//all site users in the sharepoint site  Â
foreach (var users in site.RootWeb.SiteUsers)
{
Console.WriteLine(users);
}
}Â Â Â Â Â Â
Console.ReadKey();
}
}
FileNotFoundException:
The Web application at https://xxxxx could not be found. Verify that you have typed the URL correctly. If the URL should be serving existing content, the system administrator may need to add a new request URL mapping to the intended application.
Thanks
- The code is executed on a different machine – The SharePoint object model (except the Client API) requires to be run on the SharePoint server itself. It is not possible to run the application on a server which is not within the same SharePoint farm the code is trying to access.
- Insufficient Rights on the site collection – The code is executed in context of an account which does not have read permission on the site collection
- Incorrect Url being used – Verify that the site works correct in a browser and double check that the server is correct registered in the AAM settings
- Incorrect bitness – The SharePoint object model needs to be executed with the same bitness as the operating system. That means you cannot use the SharePoint object model in a 32-bit application if the Operating System and SharePoint are installed as 64-bit version. Ensure to compile the project using the correct bitness (64-bit on a 64-bit machine vs. 32-bit on a 32-bit machine)
- Incorrect .NET framework version – Ensure that the project is configured to use .NET 3.5. .NET 4.0 cannot be used with the current versions of SharePoint
Thanks guys..
I doubt on this line..
Incorrect .NET framework version –Â Ensure that the project is configured to use .NET 3.5. .NET 4.0 cannot be used with the current versions of SharePoint
I am working on .net Framework 4.5 and SharePoint 2013.
Does that make any difference?
Take a look at this and if this doesn’t help, please show the code you are using.. http://blogs.technet.com/b/stefan_gossner/archive/2011/09/19/common-issue-new-spsite-returns-quot-the-web-application-at-http-server-port-could-not-be-found-quot.aspx
Â
Hi,
Please view the below link
http://asharepointsolutions.blogspot.in/2013/07/microsoft-sharepoint-is-not-supported.htmlÂ
If not done, then I need to view your code block.