Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

BDC API throwing timeout errors

  Asked By: Melanie    Date: Oct 19    Category: Sharepoint    Views: 1446

We are using BDC API in one of our webparts. I am using this code to get data from BDC entities:

private DataTable getBroadCategories()
NamedLobSystemInstanceDictionary sysInstances = ApplicationRegistry.GetLobSystemInstances();

instance = sysInstances["THERPInstance"];

DataTable dt = new DataTable();
Entity broadCategories = instance.GetEntities()["GetBroadCategories"];
FilterCollection filterCol = broadCategories.GetFinderFilters();

IEntityInstanceEnumerator bCatEnum = broadCategories.FindFiltered(filterCol, instance);

if (bCatEnum.MoveNext())
dt = (bCatEnum.Current as DbEntityInstance).EntityAsDataTable;

while (bCatEnum.MoveNext())
DataRow dr = (bCatEnum.Current as DbEntityInstance).EntityAsFormattedDataRow(dt);
if (instance.CurrentConnection != null)
return dt;

And this is giving me Time out errors every now and then. This is the error in Log file

07/06/2009 09:46:26.92 w3wp.exe (0x0D04) 0x0DA4 SharePoint Portal Server Business Data 0 Critical Could not open connection using 'data source=ERPWF;initial catalog=THERP;integrated security=False;load balance timeout=0;max pool size=100;min pool size=0;password=****;pooling=True;user id=sa;persist security info=false' in App Domain '/LM/W3SVC/1163100524/Root-1-128913470697500000'. The full exception text is: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.

I have tried all possibilities of ADF Connection options (PassThrough,RdbCredentials,RevertToSelf)...

The same BDC Entity when included in a page using OOB Business Data List Webpart is working fine . Some times i will get data but most of the time i am getting timeout errors as mentioned above.



1 Answer Found

Answer #1    Answered By: Bhairavi Damle     Answered On: Oct 19

The issue is resolved after chaging some settings in the network. The MOSS server  was on a different domain  then the LOB System. Joining them in same doamin solved the problem it seems.

Didn't find what you were looking for? Find more on BDC API throwing timeout errors Or get search suggestion and latest updates.