CSLA 2.1 bug?

CSLA 2.1 bug?

Old forum URL: forums.lhotka.net/forums/t/1233.aspx


sune42 posted on Sunday, September 17, 2006

Hi

When I try to fetch a database record from a existing DataBase Server, but where the actual Database does not exist, I get of course an exception in my busienss object  fetch method , like

private void DataPortal_Fetch(Criteria criteria)
{
  using (SqlConnection cn = new SqlConnection(Database.MetaKeywordConnection))
  {
  cn.Open();
ExecuteFetch(cn, criteria);
}
//using
}

but it seems that the Framework get stuck here , because my application hangs and does not continiue or let me handle the exception locally.

I am not using any remoting or remote data, instead using local database connectionstring.

when I do trace through the CSLA framework code, i end up here:

 

DataPortal.cs

private static object Fetch(Type objectType, object criteria)

and the program execution hangs in this this line

throw new DataPortalException("DataPortal.Fetch " + Resources.Failed, ex.InnerException, result.ReturnObject);

I can't single step and follow this exception any further.

The parameters to the Throw are:

ex.InnerException says ""DataPortal_Fetch method call failed" and "result.ReturnObject" has count=0 (its empty)

The CSLA and Visual Studio 2005 hangs from here and I can't break the execution using the VS2005 debugger. Instead I have to "close" the application using taskmanager.

 

PS, now I am of to restore the missing database.....

sune42 replied on Sunday, September 17, 2006

Ps, some additional information.

Everything works fine above when I restored the missing database.

I am not accessing the SQL Server locally, instead I am ccessing  a remote SQL server that I am accessing using secure SSH port forwarding/tunneling.  But I doubt that should be the case because the exeception handling should not be affected by this.

/andy

tetranz replied on Sunday, September 17, 2006

I think you're running into this:

http://forums.lhotka.net/forums/thread/3051.aspx

The solution I discovered in that thread seems to work:

http://forums.lhotka.net/forums/permalink/3051/3051/ShowThread.aspx#3051

sune42 replied on Sunday, September 17, 2006

aha, thanks.

I am sure that is what I am running into.

 

Copyright (c) Marimer LLC