none
Troubleshooting p2p Register/Resolve RRS feed

  • Question

  • I'm trying to register a peer name using code, and be able to resolve the peer on another machine. My first attempt is to get it working on my own network, but want to get it working globally.

    Update: Seems to be failing to add a registration. I can register via commandline on my other machine and resolve it on the other.

    I need help figuring out why registration fails silently on my Win 7 machine.

    http://stackoverflow.com/questions/19471053/troubleshooting-p2p-resolve

    Monday, October 28, 2013 4:45 PM

All replies

  • Hi,

    Try this code:

    Imports System
    Imports System.ServiceModel
    Imports System.ServiceModel.Description
    Imports System.Net
    Imports System.Net.PeerToPeer
    
    Module Module1
    
        Sub Main()
    
            Dim reg As PeerNameRegistration = RegisterPeer("AMS", 8000)
            reg.Cloud = PeerToPeer.Cloud.Global
            reg.Comment = "Hello!"
            reg.Start()
    
            Console.WriteLine("Please press 'Enter' to exit...")
            Console.ReadLine()
        End Sub
    
        Public Function RegisterPeer(ByVal classifier As String, ByVal port As Integer) As PeerNameRegistration
            Dim peerName As PeerName = New PeerName(classifier, PeerNameType.Unsecured)
            Dim reg As New PeerNameRegistration(peerName, port)
            reg.UseAutoEndPointSelection = True
            Return reg
        End Function
    
    End Module

    Tuesday, October 29, 2013 7:53 AM
  • That's my code. The problem is it works on one machine but not on my dev machine. I'm trying to discover the problem. The registration silently fails on my dev machine.
    Tuesday, October 29, 2013 1:15 PM
  • I am a MSDN subscriber, would be nice to get some support for a change...
    Thursday, October 31, 2013 3:06 PM