Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

cannot connect to the database configuration database...

Status
Not open for further replies.

bereza

Technical User
Jun 14, 2006
105
EU
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;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top