1

I had some code that uses PNRP to discover peers on network. Everything works fine since Windows 10 update 1803.

public void Init()
    {
        try
        {
            _ServiceUrl = Dns.GetHostAddresses(Dns.GetHostName()).Where(address => address.AddressFamily == AddressFamily.InterNetwork).Select(address => _Address = address).Select(address => $"net.tcp://{address}:{Port}/SiemensVR").FirstOrDefault();

            if (string.IsNullOrEmpty(_ServiceUrl)) return;

            _LocalProxy = new PeerProxy(_EventAggregator, this);
            _Host = new ServiceHost(_LocalProxy, new Uri(_ServiceUrl));

            var binding = new NetTcpBinding();
            binding.Security.Mode = SecurityMode.None;

            _Host.AddServiceEndpoint(typeof(IPeerContract), binding, new Uri(_ServiceUrl));
            _Host.Open();

            _PeerName                     = new PeerName(PEER_NAME_ID, PeerNameType.Unsecured);
            _PeerNameRegistration         = new PeerNameRegistration(_PeerName, Port) { Cloud = Cloud.AllLinkLocal };
            _PeerNameRegistration.Comment = _UserId.ToString();
            _PeerNameRegistration.Start();

            ResolvePeers();
        }
        finally { }
    }

    private async void ResolvePeers()
    {
        var resolver = new PeerNameResolver();
        resolver.ResolveProgressChanged += OnResolveProgressChanged;
        resolver.ResolveCompleted += (s, e) =>
        {
            Console.WriteLine("Completed");
        };

        resolver.ResolveAsync(_PeerName, this);

        await Task.Delay(1000);

        resolver.ResolveAsyncCancel(this);
    }

Does MS have replace PNRP by something ?

I already tested to activate pnrp services, reinstall teredo tunneling and more.

Mayhem50
  • 165
  • 2
  • 8

3 Answers3

1

Microsoft has deprecated and is in the process of removing PNRP. You're out of luck, since its service and client APIs are being removed completely.

See https://learn.microsoft.com/en-us/windows/deployment/planning/windows-10-deprecated-features

0

Having the same issue here... Let me know if you find any resolution.

Previously, our application works fine, but on 1803 it doesn't work anymore. I can see the cloud start to synchronize and then each peer just ends up going to status alone.

0

Same issue, I found a Microsoft note to set the following services to Automatic Delayed Start:

Computer Browser (Browser) <- Set to Automatic, not delayed start
Function Discovery Provider Host (FDPHost)
Function Discovery Resource Publication (FDResPub)
Network Connections (NetMan)
UPnP Device Host (UPnPHost)
Peer Name Resolution Protocol (PNRPSvc)
Peer Networking Grouping (P2PSvc)
Peer Networking Identity Manager (P2PIMSvc)

But it didn't resolve the issue.

Any progress in resolving this?

jo phul
  • 639
  • 1
  • 9
  • 29