Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 886361
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T13:03:15+00:00 2026-05-15T13:03:15+00:00

VS 2008 I am using the code below to detect if the client can

  • 0

VS 2008

I am using the code below to detect if the client can connect to our SIP server. This was working fine. However, the client has changed there network and now my application has to connect to the SIP server from behind a proxy server.

The error I get is the:

“A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond xxx.xxx.xx.xx:xx”

This code was working ok, until I have to connect from behind a proxy server.

I could not see any properties there I can add the proxy address to the socket.

Am I missing something?

Many thanks for any suggestions,

public bool IsSIPServerAvailable()
{
    bool isAvailable = true;
    Socket sock = new Socket(AddressFamily.InterNetwork,
                             SocketType.Stream,
                             ProtocolType.Tcp);

    try
    {
        sock.Connect("xxx.xxx.xx.xx", xx);
    }
    catch (SocketException ex)
    {
        Console.WriteLine(ex.Message);
        isAvailable = false;
    }
    catch (Exception ex)
    {
        Console.WriteLine(ex.Message);
        isAvailable = false;
    }
    finally
    {
        if (sock.Connected)
        {
            sock.Close();
        }
    }

    return isAvailable;
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T13:03:15+00:00Added an answer on May 15, 2026 at 1:03 pm

    See my answer here, maybe it will be helpful. The general idea is to first establish connection to a proxy, and then use HTTP CONNECT command to open another TCP connection to a given host and port.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

C# 2008 SP1 I am using the code below: dt.ReadXml(%AppData%\\DateLinks.xml); However, I am getting
Visual Studio C++ 2008 I am using this code. However, gethostbyname always returns an
C# 2008 I am using the code below to login to a softphone. However,
C# 2008 I am using this code to test for an internet connection. As
I want to write a code to backup my Sql Server 2008 Database using
This code was once working on sql server 2005. Now isolated in a visual
Okay, this is getting stupid, I have Microsoft Visual Studio 2008, was working fine,
I am using the code given in below link http://jsharkey.org/blog/2008/08/18/separating-lists-with-headers-in-android-09/ Please help me how
C# 2008 I am using the code below to find out if the user
I'm trying to download an image using this code: from urllib import urlretrieve urlretrieve('http://gdimitriou.eu/wp-content/uploads/2008/04/google-image-search.jpg',

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.