473,327 Members | 1,976 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

ASP.net to SQL server , connection not closing even after Log out

Hi all,
In my application i use efficient use of the DAL, but for eg
4 users has been connected to the application, it shows 4 connections
established, when all the users logout, and again logs in it shows 8
connections established, What should i do inorder to release all my
connections when i logout, even though in my application i have closed
the connections appropriately

Thanks in Advance

thomson

Dec 2 '05 #1
4 1330
I'm curious of a session.abandon will help..
?
"thomson" <sa**********@yahoo.com> schreef in bericht
news:11**********************@g43g2000cwa.googlegr oups.com...
Hi all,
In my application i use efficient use of the DAL, but for eg
4 users has been connected to the application, it shows 4 connections
established, when all the users logout, and again logs in it shows 8
connections established, What should i do inorder to release all my
connections when i logout, even though in my application i have closed
the connections appropriately

Thanks in Advance

thomson

Dec 2 '05 #2
iam using Session.Abandon(), while the user logs out, but still the
connection is not getting closed
Regards

thomson
Edwin Knoppert wrote:
I'm curious of a session.abandon will help..
?
"thomson" <sa**********@yahoo.com> schreef in bericht
news:11**********************@g43g2000cwa.googlegr oups.com...
Hi all,
In my application i use efficient use of the DAL, but for eg
4 users has been connected to the application, it shows 4 connections
established, when all the users logout, and again logs in it shows 8
connections established, What should i do inorder to release all my
connections when i logout, even though in my application i have closed
the connections appropriately

Thanks in Advance

thomson


Dec 3 '05 #3
Why would you expect database connections to close themselves?
Anything you open will remain so until you explicitly close it. If you
end a request with that database connection still alive, it will sit
there awaiting further instructions forever (or until garbage
collection gives up on it, which is essentially forever in machine
time.)

If you don't want your code to leak, wrap every database connection in
a using{} block and explicitly close it when you have finished your
operation. Otherwise, you'll see exactly what you're seeing from your
"efficient" DAL!

Jason Kester

Dec 3 '05 #4
Your topic title versus contents confused me.
Like the other responded, you should close every connection.
The IDisposed stuff might be a help as well.
I'm using a class which on destruction frees the connection it made.
I can force that but i can also wait until ISS destroys it.
Since then no more odd events.

At first, i thought you where talking about user (http)connections.

"thomson" <sa**********@yahoo.com> schreef in bericht
news:11**********************@o13g2000cwo.googlegr oups.com...
iam using Session.Abandon(), while the user logs out, but still the
connection is not getting closed
Regards

thomson
Edwin Knoppert wrote:
I'm curious of a session.abandon will help..
?
"thomson" <sa**********@yahoo.com> schreef in bericht
news:11**********************@g43g2000cwa.googlegr oups.com...
> Hi all,
> In my application i use efficient use of the DAL, but for eg
> 4 users has been connected to the application, it shows 4 connections
> established, when all the users logout, and again logs in it shows 8
> connections established, What should i do inorder to release all my
> connections when i logout, even though in my application i have closed
> the connections appropriately
>
> Thanks in Advance
>
> thomson
>

Dec 5 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: rs | last post by:
how I the client tell the server that the socket is closed? or this there an even that informs the server that the clients socket is close? Oh, I am using vb.net 2003 Thanks
0
by: =?Utf-8?B?QWxwZXIgQUtDQVlPWg==?= | last post by:
Hello, First of all I wish you a good day. My help request is about .NET asynchrounus socket communication. I have developed Server-Client Windows Forms .NET applications in VC++ .NET v2003. I...
0
by: =?Utf-8?B?QWxwZXIgQUtDQVlPWg==?= | last post by:
Hello, First of all I wish you a good day. My help request is about .NET asynchrounus socket communication. I have developed Server-Client Windows Forms .NET applications in VC++ .NET v2003. I...
5
by: marshmallowww | last post by:
I have an Access 2000 mde application which uses ADO and pass through queries to communicate with SQL Server 7, 2000 or 2005. Some of my customers, especially those with SQL Server 2005, have had...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.