How to properly call an external WCF Service from SharePoint 2010?
Ended up keeping the SPSecurity.RunWithElevatedPrivileges
section. Microsoft's SPChannelFactoryOperations
at some point hit a NullReferenceException, most likely due to Claims required to be setup within the service even when not using it (SPServiceAuthenticationMode
only has SPServiceAuthenticationMode.Claims
as a member. The fact that CreateChannelActingAsLoggedOnUser()
immediately throws an ArgumentException is a signal that the SPChannelFactoryOperations
aren't meant to be used by non-Microsoft code.