Re: Very strange SQL connection problem
From: David Browne (meat_at_hotmail.com)
Date: 11/24/04
- Next message: DraguVaso: "How to limit the TextLenght in a column in a DataGrid?"
- Previous message: Carlo Folini: "Re: Data access pattern"
- In reply to: Stefan Kals: "Very strange SQL connection problem"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 24 Nov 2004 08:02:18 -0600
"Stefan Kals" <stefan.kals@css-web.net> wrote in message
news:41a4379a$1@e-post.inode.at...
> 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
>
I have no idea why this exception is occuring, but it is happening in the
process of examining your context to see if you need to enlist in a
transaction. You should be able to avoid that whole process (which you
aren't using anyway) by setting enlist=false in your ConnectionString.
David
- Next message: DraguVaso: "How to limit the TextLenght in a column in a DataGrid?"
- Previous message: Carlo Folini: "Re: Data access pattern"
- In reply to: Stefan Kals: "Very strange SQL connection problem"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|