Archive for January, 2011

SharePoint Quota and Storage Usage

Have You ever wondered how to check quota miniumum and warning level values or current storage usage?

It’s very simple and it can be done with few lines of code.

Below You can find a sample how to get mentioned values in mega bytes unit:

(continue reading…)


SPGroup.ContainsCurrentUser is always false

SPGroup object has a grat property named ContainsCurrentUser. As the name says it tells us if the current user is a member of a group from which property is called. For example, if we want to check if a current user is a member of a “SharePoint Owners” Group we can easily do it like this:

(continue reading…)


Handle “Access Denied” like SharePoint does

If You want in Your application to handle access denied exceptions in the same way as SharePoint, then just use the SPUtility.HandleAccessDenied method.

In most common scenarios it will return a 401 exception and ask user to authenticate.

(continue reading…)


Copyright © 1996-2010 Tomasz Rabiński | zavaz Blog. All rights reserved.
Jarrah theme by Templates Next | Powered by WordPress