Re: Very strange SQL connection problem

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: David Browne (meat_at_hotmail.com)
Date: 11/24/04


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



Relevant Pages

  • Re: share session between more than one web application
    ... >> I have three web applications that I want to provide one single web ... >> If I am able to share the session between them, ... Place data in a database when the first app is hit. ... The others live in subdirectories (and I have to go ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Session Variables - why arent novice developers warned?
    ... But knowing "how a web applications work and its stateless nature" does not ... predict that the IE action File-New-Window will open a new browser window ... content of session variables with damaging consequences. ... integrity of an application which relies on session state is COMPLETELY ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Scheme vs Lisp! [was Re: web application framework]
    ... > session in interaction with a web page using function calls and returns ... What about keeping state in memory (closures+call stack) ... That's what I do (keeping state in memory) but in objects and closures, ... in the call stack because, as I and others tried to explain, web applications ...
    (comp.lang.lisp)
  • Re: Losing Session when switching directories
    ... Sounds like you organized them into web applications. ... applications in IIS. ... > Request.Redirect keeps the Session on the Transferred / ... > Page1 redirects to ~/otherfolder/Page2 ...
    (microsoft.public.dotnet.framework.aspnet)