C# System.Net.Sockets.SocketException:请求的名称有效,但未找到请求类型的数据
我有一个使用远程处理的C#应用程序。但是,一些客户最近报告了一个问题。我的代码中有一个异常: System.Net.Sockets.SocketException:请求的名称有效,但未找到请求类型的数据 创建新的C# System.Net.Sockets.SocketException:请求的名称有效,但未找到请求类型的数据,c#,C#,我有一个使用远程处理的C#应用程序。但是,一些客户最近报告了一个问题。我的代码中有一个异常: System.Net.Sockets.SocketException:请求的名称有效,但未找到请求类型的数据 创建新的tcp频道时出现异常。我使用的代码是: BinaryServerFormatterSinkProvider binaryServiceProvider = new BinaryServerFormatterSinkProvider(); binaryServiceProvider.Typ
tcp频道时出现异常。我使用的代码是:
BinaryServerFormatterSinkProvider binaryServiceProvider = new BinaryServerFormatterSinkProvider();
binaryServiceProvider.TypeFilterLevel = System.Runtime.Serialization.Formatters.TypeFilterLevel.Full;
BinaryClientFormatterSinkProvider binaryclientProv = new BinaryClientFormatterSinkProvider();
IDictionary props = new Hashtable();
props["port"] = portNo;//PortNumber I use is 20052
props["name"] = "ApplicationName";
try
{
TcpChannel channel = new TcpChannel(props, binaryclientProv, binaryServiceProvider);
ChannelServices.RegisterChannel(channel, false);
}
catch (Exception a_Exception)
{
System.Diagnostics.Debug.WriteLine(a_Exception);
System.Diagnostics.Trace.WriteLine(a_Exception);
}
可能相关: