Doing the impossible: Maurice Prather clarifies AppDomain Usage

Maurice Prather’s original post on AppDomains to get around some issues with impersonation and the object model was great.  It was an approach that works to allow most applications to do what they need within the SharePoint world — even if SharePoint doesn’t allow the user to directly perform the action.  His update fills in some small holes in the original article — including one or two that I must admit I fell into. Maurice was kind enough to help track down the issue (the second call to impersonate that I wasn’t doing but he was)  and get things straightened out.  My problem was the one exposed by Mike Donovan on IRuntimefilter getting roles for a user.He worked around it with a web service call, but that’s not an option in my environment since performance will definitely be an issue.

I can also say that a SharePoint architect that I placed with another client has used the AppDomain technique to get by a wide variety of issues.  So in short, if you need to do impersonation, this is the way to do it…

Help Your SharePoint User