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

  • SEARCH
  • Home
  • 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 7925385
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T18:16:22+00:00 2026-06-03T18:16:22+00:00

I developing an SIP client. For this I must listen to port 5060 for

  • 0

I developing an SIP client. For this I must listen to port 5060 for incoming SIP Server messages. For this I coded something. (Also I take admin rights in program.)

    WindowsPrincipal pricipal = new WindowsPrincipal(WindowsIdentity.GetCurrent());
    bool hasAdministrativeRight = pricipal.IsInRole(WindowsBuiltInRole.Administrator);
    if (hasAdministrativeRight == true)
    {
        TcpListener server;
        Int32 port = 5060;
        IPAddress localAddr = IPAddress.Parse("127.0.0.1");
        server = new TcpListener(localAddr, port);
        server.Start();
        Byte[] bytes = new Byte[256];
        String data = null;
        while (true)
        {
            Console.Write("Waiting for a connection... ");
            TcpClient client = server.AcceptTcpClient();
            Console.WriteLine("Connected!");
            data = null;
            NetworkStream stream = client.GetStream();
            int i;
            while ((i = stream.Read(bytes, 0, bytes.Length)) != 0)
            {
                data = System.Text.Encoding.ASCII.GetString(bytes, 0, i);
                Console.WriteLine("Received: {0}", data);
                data = data.ToUpper();

                byte[] msg = System.Text.Encoding.ASCII.GetBytes(data);
                stream.Write(msg, 0, msg.Length);
                Console.WriteLine("Sent: {0}", data);
            }

            client.Close();
        }
    }

I get SocketException: “An attempt was made to access a socket in a way forbidden by its access permissions” (Native error code: 10013)…

Do you have a suggestion for this?

  • 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-06-03T18:16:23+00:00Added an answer on June 3, 2026 at 6:16 pm

    It seems that you were running two applications, and they are trying
    to access the same socket.

    What Microsoft says about your problem:

    WSAEACCES (10013)

    • Translation: Permission denied
    • Description: An attempt was made
      to access a socket in a way that is forbidden by its access
      permissions. For example, this error occurs when a broadcast address
      is used for sendto but the broadcast permission is not set by using
      setsockopt(SO_BROADCAST).

      Another possible reason for the WSAEACCES
      error is that when the bind (Wsapiref_6vzm.asp) function is called (in
      Microsoft Windows NT 4 .0 Service Pack 4 [SP4] or later), another
      program, service, or kernel mode driver is bound to the same address
      with exclusive access. Such exclusive access is a new feature of
      Windows NT 4.0 SP4 and later, and it is implemented by using the
      SO_EXCLUSIVEADDRUSE option.

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

Sidebar

Related Questions

I'm developing Sip Client for Android. And I need this library to complete my
I am developing a simple sip-based voip app for android. I used this sample
I'm currently developing a web application for one of my clients. This client requested
I am developing a SIP application for incoming and outgoing calls and i want
I am developing a SIP client. I understand SIP requests and SIP responses but,
i am developing a one SIP application to simply make and receive a call.
Currently developing an application using the newest version of symfony, obtained through PEAR. This
While developing a firefox extension, I create a wizard window from overlay.js using: this.wizard
I am new to Symbian development. I am developing a VOIP [SIP protocol] app
i am developing one application which is based on SIP. And i want to

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.