I have this simple code in C# using sharepoint:
SPSecurity.RunWithElevatedPrivileges(delegate()
{
SPSite site = new SPSite("http://localhost:333");
});
When i execute it on a Windows Server 2008 with Sharepoint 2010 i get this error:
Retrieving the COM class factory for component with CLSID {BDEADF26-C265-11D0-BCED-00A0C90AB50F} failed due to the following error: 80040154.
When i execute it on Windows Server 2003 with Sharepoint 2007 it works well.
Is there a problem in Windows or Sharepoint?
How can i get rid of this error?
Thanks alot.