Access Denied with RunWithElevatedPrivileges

A strange situation happened to me few days ago, when checking a portion of SharePoint 2013 server-side code on a custom form. Basically, it uses RunWithElevatedPrivileges to check that the current user has access to a certain site and certain libraries, before uploading the file to a content organizer enabled library.

The Symptoms

The code that runs with elevated privileges on a POST event triggered "Access Denied" errors when trying to access SPWeb and SPList objects. The objects were declared under the elevated privilege code block but the ULS logs still show the "access denied" errors.

The Cause

According to MSDN blog the code running with elevated permissions has to validate the form digest before entering the elevated permissions code block. If not, it might give "Access Denied" errors.

The Solution

Just add SPUtility.ValidateFormDigest(); before the elevated permissions block and the "Access Denied" errors dissappear.

Business Value of Social Computing (II)

Note: This is a second post in the series. You can check the first post to refresh the concepts.

In the first post I have defined what social is and what components it has. In this post I will explain why social is used in the companies. As always, a certain technology is not used because it’s brightest and shiniest thing out there (a strategy which works well with techno-addicts). It is used in companies because it helps to achieve a desired goal that has nothing to do with the technology.

So, the first component of "why social" is to find what we want to achieve with social. The answer to this question has to be technology-free and has to map with the business objectives of the company.

Social | Wood Human figures

But what happens when you have no clue about what social can be used in your company? Well, then you check what the majority of the companies is using it for and then extrapolate for your own needs. So, let’s see how social pioneers (the early adopters) use social.

In a 2013 social business study by Sloan Management and Deloitte, there are four main business objectives in the companies that are achieved with deploying and using social computing:

#1 To better understand the market

The most frequent use of social is to gain better insight into the market shifts. How can social help us there? Well, the answer is that social fosters quicker information exchange that gets timely answers to the market analysts. There is no quicker way, except for watercooler chat.

#2 To identify internal talent

The second most frequent use of social in the enterprise is to identify the subject matter experts around a certain topic. As social technologies allow for quick and easy content creation, tagging and gamification features in social can increase the visibility of the people who post valuable content. In a certain way, the social uncovers the "informal organization chart" of the company, centered on the knowledge and not the hierarchy.

#3 To improve visibility into operations

Social is also used to add greater transparency and visibility into the daily grinding and routine in the company. It is more direct and personal than a weekly statistics review sent to all the company by email. The social platform is also a great outlet to publish metrics that add insight into the company operations.

#4 To improve strategy development

Collaborative strategy development is enabled with social. Strategy can be discussed in more open, honest and productive way using social than organizing formal meetings. Sometimes, the valuable insight into the strategy is provided by the subject matter expert that is unlikely to be present in a more formal discussion.

And you? What do you use social for? I’d like to hear from your experiences.

Post photo: by jdhancock