Monday, October 24, 2016

Where attachments are being stored in sharepoint

Like the documents in a document library, attachments are stored in Blob form in the content database

You can use Sharepoint Designer to access your Sharepoint Site, there are the Document Librarys and the documents you upload.

Thursday, October 20, 2016

The local SharePoint server is not available. Check that the server is running and connected to the SharePoint farm.

db_owner permissions to the account 

For this Open the DataBase,
 expand Security -> Logins -> right click on the account and go to properties. 
 properties window, click on User Mappings from the left side. 
Then you can select the database and select the permission as db_owner as shown in the fig below and click on OK.

To interact with SharePoint projects in Visual Studio, your system user account must have administrator privileges.

Client Object Model vs Server Object Model?

Server Object Model?
SharePoint server where the Server Object Model binaries

Example

inside Web Parts / Workflows.

Client Object Model?

client machines where the entire SharePoint binaries are not available.

Example
Windows Forms application in a client machine.

Delete item using CLient Object Model


"Client" in the namespace.  For example, in the server object model you have:
Microsoft.SharePoint.SPSite
Microsoft.SharePoint.SPWeb
Microsoft.SharePoint.SPList

In the client object model you have:
Microsoft.SharePoint.Client.Site
Microsoft.SharePoint.Client.Web
Microsoft.SharePoint.Client.List


NameSpace:


Microsoft.SharePoint.Client.dll
Microsoft.SharePoint.Client.Runtime.dll


Example Code:

ClientContext context = new ClientContext("http://peakfinders.com");

Web web = context.Web;

List list = web.Lists.GetByTitle("yourlistname");
ListItemCollection listItems = list.GetItems(new CamlQuery() { ViewXml = "<View/>" });
context.Load(listItems);
context.ExecuteQuery();

listItems[listItems.Count - 1].DeleteObject();
context.ExecuteQuery();