MOSS (SharePoint 2007) SPSecurity.RunWithElevatedPrivileges Object Reference Not Set to an Instance of an Object.
There are a few post out there regarding permissions on the database, and permissions on a local account group; however I just barely found, and wanted to pass on -
If you’re using Visual Studio and you’re running in Debug mode, and you’re either getting the Object Reference on SPSecurity.RunWithElevatedPrivileges or you’re getting a File Not Found error (“Web application at … could not be found”) on new SPSite(webURL), then you might want to check your configuration options. Are you running in x86 mode and your site is build on 64 bit?
What I did was I changed my build configuration from x86 to “Any CPU” and that made both exceptions go away.
~Sue
