Friday, December 3, 2010

SPWebApplication.Lookup() throws "This operation can be performed only on a computer that is joined to a server farm..."

In my case, issue was that project's target platform was x86. Changed it to 'Any CPU' and it worked.