S
Stefan Kals
Hi out there!
Sorry for my not-perfect english as i'm no native speaker.
I am expirienced in writing .NET programs and web applications for about two
years frequently
searching and finding bugs in my applications but now i am a little bit at a
loss.
I have a quite simple web application using DataAdapters and DataSets to
aquire data from a
SQL server. Therefor i have written a DataHandler class implementing a bunch
of such methods:
public void LoadProjectList(DataSetProjectList ds)
{
ds.Clear();
dbDataAdapterProjectList.Fill(ds);
}
The DataHandler class has a SqlConnection as member variable which gets
initialized on constructing and is
then used by such Load- and Save-methods. I now create an instance of this
DataHandler for each new session in
Global.asax.cs and save it into the Session where it then gets used by
several Web forms and stuff.
During development on my dev-machine using a SQL Server 2000 everything was
fine but now, on the production
machine using a MSDE (can't think, that that might give a problem) i
expirience the following problem:
When i first reset the application (e.g. by overwriting web.config),
everything goes fine. I am able to browse
through the whole site using all data functionality including loading and
saving data. Even if i close the session
and open a new one 15 minutes later everthing is fine.
But if i am evil and wait for more than 30 minutes or something (i guess,
then the application goes sleeping) i
receive the following exception on any page using data:
Exception Details: System.IO.FileLoadException: ?
[FileLoadException: ?]
System.EnterpriseServices.ContextUtil.get_IsInTransaction() +0
System.Data.SqlClient.Transaction.GetTransaction(Guid& transactionGuid)
+12
System.Data.SqlClient.SqlInternalConnection.EnlistDistributedTransaction()
+62
System.Data.SqlClient.SqlInternalConnection..ctor(SqlConnection
connection, SqlConnectionString connectionOptions) +103
System.Data.SqlClient.SqlConnection.Open() +384
System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection,
ConnectionState& originalState) +44
System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32
startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
CommandBehavior behavior) +304
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord,
Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior
behavior) +77
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet) +38
Kumpfmueller.Data.DataHandler.LoadCategoryDetails(DataSetCategory ds) in
c:\inetpub\wwwroot\kumpfmueller\data\datahandler.cs:732
Kumpfmueller.Default.Page_Load(Object sender, EventArgs e) in
C:\Inetpub\wwwroot\Kumpfmueller\Default.aspx.cs:83
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +720
In my connection string i have disabled connection pooling using
"Pooling=false" because prior to this problem
i got another exception using the same user behavior like this:
FileLoadException: ?]
System.EnterpriseServices.Platform.Initialize() +0
System.EnterpriseServices.ResourcePool..ctor(TransactionEndDelegate cb)
+11
System.Data.SqlClient.ConnectionPool..ctor(DefaultPoolControl ctrl) +797
System.Data.SqlClient.PoolManager.FindOrCreatePool(DefaultPoolControl
ctrl) +170
System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnec
tionString options, Boolean& isInTransaction) +358
System.Data.SqlClient.SqlConnection.Open() +384
System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection,
ConnectionState& originalState) +44
System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32
startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
CommandBehavior behavior) +304
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord,
Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior
behavior) +77
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet) +38
Kumpfmueller.Data.DataHandler.LoadCategoryDetails(DataSetCategory ds) in
C:\Inetpub\wwwroot\Kumpfmueller\Data\DataHandler.cs:694
Kumpfmueller.Default.Page_Load(Object sender, EventArgs e) in
C:\Inetpub\wwwroot\Kumpfmueller\Default.aspx.cs:81
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +753
.... which got me think it has to do with connection pooling and i should try
to live without it.
But it didn't got me a running app.. ;-)
Could anybody point me to the solution of this odd thingy?
Thanks a lot!
Greets, Stefan
Sorry for my not-perfect english as i'm no native speaker.
I am expirienced in writing .NET programs and web applications for about two
years frequently
searching and finding bugs in my applications but now i am a little bit at a
loss.
I have a quite simple web application using DataAdapters and DataSets to
aquire data from a
SQL server. Therefor i have written a DataHandler class implementing a bunch
of such methods:
public void LoadProjectList(DataSetProjectList ds)
{
ds.Clear();
dbDataAdapterProjectList.Fill(ds);
}
The DataHandler class has a SqlConnection as member variable which gets
initialized on constructing and is
then used by such Load- and Save-methods. I now create an instance of this
DataHandler for each new session in
Global.asax.cs and save it into the Session where it then gets used by
several Web forms and stuff.
During development on my dev-machine using a SQL Server 2000 everything was
fine but now, on the production
machine using a MSDE (can't think, that that might give a problem) i
expirience the following problem:
When i first reset the application (e.g. by overwriting web.config),
everything goes fine. I am able to browse
through the whole site using all data functionality including loading and
saving data. Even if i close the session
and open a new one 15 minutes later everthing is fine.
But if i am evil and wait for more than 30 minutes or something (i guess,
then the application goes sleeping) i
receive the following exception on any page using data:
Exception Details: System.IO.FileLoadException: ?
[FileLoadException: ?]
System.EnterpriseServices.ContextUtil.get_IsInTransaction() +0
System.Data.SqlClient.Transaction.GetTransaction(Guid& transactionGuid)
+12
System.Data.SqlClient.SqlInternalConnection.EnlistDistributedTransaction()
+62
System.Data.SqlClient.SqlInternalConnection..ctor(SqlConnection
connection, SqlConnectionString connectionOptions) +103
System.Data.SqlClient.SqlConnection.Open() +384
System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection,
ConnectionState& originalState) +44
System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32
startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
CommandBehavior behavior) +304
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord,
Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior
behavior) +77
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet) +38
Kumpfmueller.Data.DataHandler.LoadCategoryDetails(DataSetCategory ds) in
c:\inetpub\wwwroot\kumpfmueller\data\datahandler.cs:732
Kumpfmueller.Default.Page_Load(Object sender, EventArgs e) in
C:\Inetpub\wwwroot\Kumpfmueller\Default.aspx.cs:83
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +720
In my connection string i have disabled connection pooling using
"Pooling=false" because prior to this problem
i got another exception using the same user behavior like this:
FileLoadException: ?]
System.EnterpriseServices.Platform.Initialize() +0
System.EnterpriseServices.ResourcePool..ctor(TransactionEndDelegate cb)
+11
System.Data.SqlClient.ConnectionPool..ctor(DefaultPoolControl ctrl) +797
System.Data.SqlClient.PoolManager.FindOrCreatePool(DefaultPoolControl
ctrl) +170
System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnec
tionString options, Boolean& isInTransaction) +358
System.Data.SqlClient.SqlConnection.Open() +384
System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection,
ConnectionState& originalState) +44
System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32
startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
CommandBehavior behavior) +304
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord,
Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior
behavior) +77
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet) +38
Kumpfmueller.Data.DataHandler.LoadCategoryDetails(DataSetCategory ds) in
C:\Inetpub\wwwroot\Kumpfmueller\Data\DataHandler.cs:694
Kumpfmueller.Default.Page_Load(Object sender, EventArgs e) in
C:\Inetpub\wwwroot\Kumpfmueller\Default.aspx.cs:81
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +753
.... which got me think it has to do with connection pooling and i should try
to live without it.
But it didn't got me a running app.. ;-)
Could anybody point me to the solution of this odd thingy?
Thanks a lot!
Greets, Stefan