Hi,
I have a web method in a Web Service which gets data from a Sharepoint List (for example Contacts) and return it by using a DataSet. When I test my method by hitting F5 everything goes well and it returns the data (the list=my contacts).
My problem is when I call my method from a class library (Smart Tag) it generates following error:
Microsoft.SharePoint.SPException: Cannot connect to the configuration database. For tips on troubleshooting this error, Search for article 823287 in the microsoft knowledge Base at.....
...
I did what the article says but same error.
this is my code.
Guid MySiteGuid = new Guid("8FADE524-C5AF-4AC5-A5B4-181A4E8077D2");
SPSite IgnitoSite = new SPSite(MySiteGuid);
SPWeb IgnitoWebSite = IgnitoSite.OpenWeb();
SPListItemCollection IgnitoContactsItems = IgnitoWebSite.Lists["KouroshContacts"].Items;
DataTable DT = new DataTable();
DT = IgnitoContactsItems.GetDataTable();
MyDataSet.Tables.Add(DT.Copy());
return MyDataSet;
I have a web method in a Web Service which gets data from a Sharepoint List (for example Contacts) and return it by using a DataSet. When I test my method by hitting F5 everything goes well and it returns the data (the list=my contacts).
My problem is when I call my method from a class library (Smart Tag) it generates following error:
Microsoft.SharePoint.SPException: Cannot connect to the configuration database. For tips on troubleshooting this error, Search for article 823287 in the microsoft knowledge Base at.....
...
I did what the article says but same error.
this is my code.
Guid MySiteGuid = new Guid("8FADE524-C5AF-4AC5-A5B4-181A4E8077D2");
SPSite IgnitoSite = new SPSite(MySiteGuid);
SPWeb IgnitoWebSite = IgnitoSite.OpenWeb();
SPListItemCollection IgnitoContactsItems = IgnitoWebSite.Lists["KouroshContacts"].Items;
DataTable DT = new DataTable();
DT = IgnitoContactsItems.GetDataTable();
MyDataSet.Tables.Add(DT.Copy());
return MyDataSet;