[RESOLVED] Socket/Port remains open after app crashes
Posted on
16th Feb 2014 07:03 pm by
admin
I'm having this problem with a networked app in vb.net.
If the program exits normally the port closes fine, however, if it crashes sometimes it remains open and I am unable to close it. The next time I run the program it is unable to open the port because it is already in use. Here's the exception:
10048: Only one usage of each socket address (protocol/network address/port) is normally permittedAny ideas on how I can reclaim this port, or how I can close it?
Did you know?Explore Trending and Topic pages for more stories like this.
I tried using the reuse address socket option
Code: SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReuseAddress, 1) but that just opens the port again and does not close the old one. see this netstat output:
TCP PCISERVER:14000 PCISERVER.cpwpci.cpwgroup.net:0 LISTENING 4320
[System]
TCP PCISERVER:14000 PCISERVER.cpwpci.cpwgroup.net:0 LISTENING 5808
[System]
TCP PCISERVER:14001 PCISERVER.cpwpci.cpwgroup.net:0 LISTENING 5808
[System]
TCP PCISERVER:14001 PCISERVER.cpwpci.cpwgroup.net:0 LISTENING 4320
[System]
As you can see once the program exits the ports remain opened by the System process.
I don't know of a way to stop them from listening besides a restart.
No comments posted yet
Your Answer:
Login to answer
87
27
Other forums
DOMDocument
Hello All,
I need to take an XML document, modify some of the nodes in it and then perform a
Is this Safe or Unsafe?
Hi i made a few pages with lots of peoples help now i just want to know if they are safe or not can
Need Reporting Advice
My SQL server doesn't support MS SQL reporting services that comes with SQL Enterprise or Express. T
listing help
Hi,
at first, great new design!!! I like it,
i got a problem,
I want to list so
help me, how to find text on an external html site using PHP
Would anyone know how to search an external html file for a work or phrase ?
I was thinking s
Echo-ing MySQL content and Keep Formatting?
I have data in my MySQL such as:
QuoteBlah blah
Blah blah
etc
but when i ech
images aren't rendering
I'm trying to call a JPG file from within PHP (in an effort to hide the actual JPG folder). The imag
Inserting 100x and 100y coordinates in mysql table - easy
Is there a way to insert this data into a mysql table named 'map' with the fields: 'x int 3' , 'y in
add to sql result
ok see rite now my sites hit counter is counted from the mysql visitor log i need to clear it aft
how to put the 0-100 numbers into 1.txt and 100-200 into 2.txt ?
how to put the 0-100 numbers into 1.txt and 100-200 into 2.txt and so on 200-300 into file 3.txt ?