Tuesday 30 August 2011

The Web application at 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 was getting this error all the time when I was creating a Windows Form to do some kind of Sharepoint 2010 House keeping.

I found out that everything was caused because I was developing in 32bit instead of 64bit, so to sort it just go to:

1- Visual Studio
2- Right Click into your project and select Properties
3- Select Build
4- On Build go to "platform target" and select Any CPU
5- Compile!

Ah! Don't forget to target your platform to 3.5 otherwise you will not be able to point Microsoft.Sharepoint.dll

Tuesday 16 August 2011

Cannot connect to the Sharepoint Site: http://xxx. Make sure that the Site URL is valid, that the Sharepoint site is running on the local computer, and that the current user has the necessary permissions to access the site.

When you are creating a new project in Visuaal Studio 2010 for Sharepoint 2010 you could get this error:

Cannot connect to the Sharepoint Site: http://xxxx. Make sure that the Site URL is valid, that the Sharepoint site is running on the local computer, and that the current user has the necessary permissions to access the site.

Aditional information:

"Cannont connect to the Sharepoint site: http://xxxx  Make sure that the Site URL is valid, that 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. "

This is the Screen Shot:

To sort this out we will need to  to have the permissions on the content database linked to the deploying web application.

The databases involved are:
1-SharePoint_Config

2-SharePoint_AdminContent_guid

Do the following:
1- Open SQL Server Management Studio.
2- Go to the Server->Security->Logins and select the one you are using for development.

3- Go to Server Roles and be sure youy select "public" and "sysadmin".

4- Close SQL Server Management Studio.