I have a strange, sporadic issue.
I have stored procedure that returns back 5 small tables (e.g. IDs and Text Descriptions for Status drop down lists and such). The code calls this and places the returning dataset into ASP.Net cache. Separate methods are called to retrieve individual tables from the dataset to databind to controls throughout my web app.
Only in my QA server does one table disappear. The table will be there for one testing scenario; however, the next time the same scenario is ran, the one table is null. The table that goes MIA is always the same (Table #4 of 5 to be precise).
If the ASP.Net WP needs memory, can it remove an individual table from a cached dataset while keeping the data set's indexes in place?
Below is the caching code:
public static DataSet GetDropDownLists()
{
DataSet ds = (DataSet)HttpContext.Current.Cache["DropDownListData"];
if (null == ds)
{
// - Database Connection Information Here
ds = db.ExecuteDataSet(CommandType.StoredProcedure, "Sel_DropDownListData");
HttpContext.Current.Cache.Add("DropDownListData", ds, null, DateTime.Now.AddMinutes(20), TimeSpan.Zero, CacheItemPriority.Normal, null);
}
return ds;
}
Here's an example of the method that returns the null table:
public static DataTable GetStatusList()
{
return GetDropDownLists().Tables[3];
}
Again, this only happens on my QA Server and not when my local code is wired up to the QA database or anything on a separate server for my own development testing.
Thanks