473,473 Members | 1,960 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Windows Service takes too long to completely shut down, socket address already used?

1 New Member
Hello.
I have a little problem. I created a little Service which uses SIP, all works rather well, but when I want to shut it down in the Services panel, it looks as if it's shut down, but in fact it's not:
- when I try want to delete the .DLL file, I can't: the file is still locked
- if I "Start" my Service again, it refuses
I have to wait like ~20s, and then it is really shut down.

When I shut down the Service, and then try to Start it again, in the Event Viewer it says:
Service cannot be started. System.Net.Sockets.SocketException: Only one usage of each socket address (protocol/network address/port) is normally permitted
at System.Net/Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAdress socketAddress)
at System.Net.Sockets.Bind(EndPoint localEP)
at Microsoft.Rtc.Internal.Sip.TCPListener.Listen(EndP oint endPoint)
etc etc...

Anyway,
- how can I be sure that the sockets I use are "closed" ?
- Where can I put breakpoints in the code to try and see what's still "opened" ? (OnShutdown(), OnExit(), ...) ?

Any tip welcome, thanks.
Mar 6 '07 #1
0 2010

Sign in to post your reply or Sign up for a free account.

Similar topics

9
by: Brian Roberts | last post by:
I have a command line Python program that sometimes takes a bit (several minutes) to run. I want to provide an optional method for an impatient user (me!) to check the status of the program. The...
1
by: Guillaume Kaddouch | last post by:
Hi, I am in trouble since many days because i'm facing a problem that i can't solve. I used to play with RAW socket under Linux, but the near same code ported on Windows doesn't works, and i...
9
by: SP | last post by:
Hi All, I wrote a windows service which is supposed to stop after specified amount of time. I am calling OnStop() after specified time. OnStop() methods executed but I dont see the service...
6
by: carbon_dragon | last post by:
Ok, so here is the problem. I'm working on a headless server program implemented as a .NET C# Console project. There is a UPS mounted to this server (though not a windows compliant UPS). I can only...
7
by: Mark Rae | last post by:
Hi, I wrote a Windows service for a client a few months ago, and the client has now asked me to modify it so that it shuts itself down under certain circumstances e.g. a catastrophic failure of...
9
by: TulasiKumar | last post by:
Hi all, What is my requirement is i want to get the TCPIP data from TCP Port.I had written the code in c#.Net.What i had written the code is pasted below.what i written the code is correct or...
2
by: Trevor | last post by:
Argh! This problem is driving me nuts! Can you help? In November of 2003, I installed a web service on Windows Server 2003 built in VB.NET for v1.1.4322 of the framework. It contains a timer...
4
by: jez123456 | last post by:
Hi Experts I've written a c# windows service which runs another program at certain intervals. The other program may take upto 20 minutes to complete it's tasks. My question is what happens to...
7
by: GD | last post by:
Hi, I am trying to call a webservice from a windows service application. It works only if I launch the windows service app from VS.Net 2005 (Worked around from Main()) or from a winform test...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.