尝试为未绑定类型创建代理 [英] Trying to create a proxy to an unbound type
本文介绍了尝试为未绑定类型创建代理的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
hello
我开始构建远程客户端/服务器但每次我尝试连接服务器时都会出现此错误
System.Runtime.Remoting.RemotingException: 'Trying to create a proxy to an unbound type.'
推荐答案
嗨el3ashe2,
Hi el3ashe2,
根据您的错误和代码,我猜您可能会在此行中显示以下错误消息:
According to your error and code, I guess that you may have this error message in this line:
obj = DirectCast(Activator.GetObject(GetType(ViewerService.ViewerService), URI), ViewerService.ViewerService)
我找到一篇关于使用Visual C#创建对远程服务器的客户端访问的msdn文章,你可以看看:
I find one msdn article about creating client access to remote server by using Visual C#, you can take a look:
Dim chan As New TcpChannel()
ChannelServices.RegisterChannel(chan)
Dim obj As myRemoteClass = CType(Activator.GetObject(GetType(myRemoteClass), "tcp://localhost:8085/RemoteTest"), myRemoteClass)
If obj Is Nothing Then
System.Console.WriteLine("Could not locate server")
ElseIf obj.SetString("Sending String to Server") Then
System.Console.WriteLine("Success: Check the other console to verify.")
Else
System.Console.WriteLine("Sending the test string has failed.")
End If
最好的问候,
Cherry
这篇关于尝试为未绑定类型创建代理的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文