Recently I had to check the current user’s permissions to access some predefined links in SharePoint 2010 generally using classic authentication. Usually, DoesUserHavePermission() has the answer. But for links pointing into an application with claims based authentication it would always return false. Solved it by prefixing the user’s LoginName with an identity token – for Windows authentication in this case. Calling SPWeb.EnsureUser() and using the resulting SPUser’s LoginName should also do the trick.

On a more general note: to use RunWithElevatedPrivileges() on sites running in a different application pool, the application pool’s accounts need to match. Of course this defeats one of the main purposes for using multiple application pools in the first place.