我的点对点应用程序不起作用 [英] MY peer to peer application is not working
问题描述
亲爱的先生,
我在下面的代码中获得了启动聊天服务器(点对点应用程序)的异常。
private void btnStart_Click(object sender,EventArgs e)
{
try
{
CustomPeerResolverService cprs = new CustomPeerResolverService() ;
ServiceHost主机=新ServiceHost(cprs);
cprs.Open();
//host.Open();
// host。
host.Open(); // < b>这里我得到异常,它是错误:System.ServiceModel.AddressAlreadyInUseException:IP端点0.0.0.0:808上已经有一个监听器。请确保你没有尝试在你的应用程序中多次使用这个端点并且那里此端点上没有其他应用程序列表。
lblMessage.Text =聊天服务器已启动;
}
catch(例外情况)
{
MessageBox.Show(错误:+ ex.ToString());
}
终于
{
btnStart.Enabled = false;
btnStop.Enabled = true;
}
}
请帮帮我。
谢谢
Abhishek
Dear Sir,
I am getting exception in following code for starting chat server (peer to peer application).
private void btnStart_Click(object sender, EventArgs e)
{
try
{
CustomPeerResolverService cprs = new CustomPeerResolverService();
ServiceHost host = new ServiceHost(cprs);
cprs.Open();
//host.Open();
//host.
host.Open(); // here I am getting exception and it is Error:System.ServiceModel.AddressAlreadyInUseException:There is already a listener on IP endpoint 0.0.0.0:808.Make sure u are not trying to use this endpoint multiple times in your application and that there are no other application listing on this endpoint.
lblMessage.Text = "Chat Server Started";
}
catch (Exception ex)
{
MessageBox.Show("Error: " + ex.ToString());
}
finally
{
btnStart.Enabled = false;
btnStop.Enabled = true;
}
}
Pls help me.
Thanks
Abhishek
推荐答案
这个主题答案很少
WCF - IP端点0.0.0.0:808上已经有一个监听器 [ ^ ]
如果版本4.5,然后检查这些
.NET 4.0 WCF服务在移动到.NET时抛出System.ServiceModel.AddressAlreadyInUseException 4.5 [ ^ ]
NetTcpBinding&共享同一端口的mexTcpBinding在升级到.net 4.5时会抛出AddressAlreadyInUseException吗? [ ^ ]
This thread has few answers
WCF - There is already a listener on IP endpoint 0.0.0.0:808[^]
If the version 4.5, then check these
.NET 4.0 WCF service throws System.ServiceModel.AddressAlreadyInUseException when moved to .NET 4.5[^]
NetTcpBinding & mexTcpBinding sharing same port throws AddressAlreadyInUseException on upgrade to .net 4.5?[^]
您已经有一个应用程序在同一个端口上侦听。
You already have an app listening on same port.
这篇关于我的点对点应用程序不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!