SPFarm.Local is return null
I have googled.
- x64 and x86 problem - No
- Access issue - No
Additional 1. Database server is up 2. Sites are opening 3. CA is opening
The account is 'System Account' under which the code is running. Always worked before. Now suddenly it started returning null.
Any ideas?
Thanks in advance.
I tried by changing from x64 or x86 to Any CPU in my VS2012 project but it didn't help. Finally i opened VS in administrator mode and it worked fine.
A simple server/machine restart solved the problem. Some of my friends faced similar issue and restarting solved the issue. :)
If you are migrating from SharePoint 2010 to SharePoint 2013 this can happen if you use Microsoft.SharePoint assemblies from 2010 version in SharePoint 2013. Simple convert your project to use 4.5 framework and you are good to go.
Quote from here: