Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Connection error: An attempt was made to access a socket in a way forbidden...

Discussion in 'Windows' started by Rob-Taylor, Sep 5, 2013.

  1. Rob-Taylor

    Rob-Taylor

    Joined:
    Sep 5, 2013
    Posts:
    2
    I am currently using Unity(not Pro) and SmartFoxServer2x to develop my multiplayer game for the Windows Store Apps.
    My game works perfectly within the unity editor, however when make a Windows Store Apps build and open the project
    that is created this is the issue I get when trying to connect to my server.

    error "Connection error: An attempt was made to access a socket in a way forbidden by its access permissions *:9933 at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)\r\n at System.Net.Sockets.Socket.Connect(EndPoint remoteEP)\r\n at System.Net.Sockets.Socket.Connect(IPAddress address, Int32 port)\r\n at Sfs2X.Core.Sockets.TCPSocketLayer.ConnectThread() ==> AccessDenied" string

    Is there anyway I can fix this error?
     
  2. BFS-Kyle

    BFS-Kyle

    Joined:
    Jun 12, 2013
    Posts:
    883
    It sounds like you haven't given your app the appropriate permissions to use the Internet. Take a look at http://msdn.microsoft.com/en-us/library/windows/apps/hh464936.aspx - you probably need to add the internetClient capability.

    -Kyle
     
  3. Rob-Taylor

    Rob-Taylor

    Joined:
    Sep 5, 2013
    Posts:
    2
    Thanks for your help that was my issue.