Remote Connection using TCP


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Remote Connection using TCP

  1. #1
    Join Date
    Jan 2009
    Posts
    2

    Remote Connection using TCP

    How to close/terminate an existing remote connection using tcp channel.

    My problem is while connecting to Remote connection im getting a socket exception saying "No connection could be maid because the target machine actively refused it."

    so for the next time i run my application i cannot run the application due to this exception and remote connection does not allow to login.

  2. #2
    Join Date
    Sep 2007
    Posts
    86
    My initial guess is that you have everything wrapped in a try block and are catching the exception then exiting your method or application. What you'd want to do is ensure that you close the connection. You can accomplish this by putting your close() in a finally block. Here's some reference on try/catch/finally statements:

    VB: http://msdn.microsoft.com/en-us/library/fk6t46tz.aspx
    C#: http://msdn.microsoft.com/en-us/library/dszsf989.aspx
    John Wiese
    ISV Architect Evangelist - Microsoft
    http://blogs.msdn.com/usisvde

Similar Threads

  1. Remote Connection using TCP Issue
    By kundenarchana in forum .NET
    Replies: 1
    Last Post: 01-07-2009, 10:34 AM
  2. Replies: 5
    Last Post: 02-06-2006, 11:58 AM
  3. Remote Access database connection
    By jggtz in forum VB Classic
    Replies: 1
    Last Post: 08-19-2005, 09:05 AM
  4. Simplest possible connection ?
    By 8man in forum .NET
    Replies: 0
    Last Post: 04-06-2005, 06:59 AM
  5. Replies: 0
    Last Post: 01-25-2001, 03:14 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center