A Developer's Diary

Showing posts with label SharePoint. Show all posts
Showing posts with label SharePoint. Show all posts

Dec 22, 2012

Sharepoint 2010 - Access denied Exception

The below code retrieves sharepoint SPList item when executed through a .net console application. The same piece of code when run through ASP.NET application throws Access is denied exception.

SPWeb web = GetWeb(SiteURL);
return web.Lists[ListName];
The exception message through the visual studio watch window
{"Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))"} System.Exception {System.UnauthorizedAccessException}
To fix this problem, you need to run the above snippet with elevated privileges using SPSecurity.RunWithElevatedPrivileges
SPList list = null;
SPSecurity.RunWithElevatedPrivileges(delegate()
{
    SPWeb web = GetWeb(SiteURL);
    list = web.Lists[ListName];
});

return list;

Read more ...

Mar 23, 2012

Configuring CMIS Consumer in Sharepoint 2010 server

In our previous post, we have configured SharePoint 2010 Server with CMIS Connector Services Producer. This post talks about adding and configuring CMIS Connector Services Consumer Web Part to a Web Page. We will also be testing the CMIS Consumer service by listing down all the documents uploaded to a particular sharepoint document repository.

Read more ...

Configuring CMIS in Sharepoint 2010 server

Content Management Interoperability Services a.k.a CMIS is a standard defined for Enterprise Content Management (ECM) systems such as SharePoint server, Documentum, Alfresco and others. The standard defines a domain model plus Web Services and Restful AtomPub bindings that can be used by other applications.

Installing the SharePoint CMIS Connector
1. Install Microsoft SharePoint Server 2010

2. Complete the SharePoint 2010 Products configuration wizard
3. Download Microsoft SharePoint 2010 Administration Toolkit from here and save the file to hard disk
SharePoint 2010 Administration Toolkit installs two components:
CMIS Producer Services
This allows CMIS client applications to interact with the SharePoint document libraries by using interfaces defined in the CMIS standard

CMIS Consumer Services Web Part
The Consumer Web part can be added to any SharePoint page and allows users to connect with any CMIS compliant repository
4. Double click SharePoint2010AdministrationToolkit.exe file to start the installation.
5. Accept the license agreement and click next. Make sure CMIS connectors are selected for the install. Click Next
6. Use the default installation directory. Click Next and Finish. CMIS Connector is successfully installed


Read more ...