Cannot connect to the configuration database..

M

Medes

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;
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top