Public Class RemoteObject
    Inherits MarshalByRefObject    'return the name of the current application domain
    Public Function GetActiveDomain() As String        Return AppDomain.CurrentDomain.FriendlyName
    End Function
End Class
这是一个简单的类
这是调用
 Dim RemoteObj As New RemoteObjects.RemoteObject //就这句报错了。
请求的名称有效,但没有找到请求的类型的数据

解决方案 »

  1.   

    RemotingConfiguration.Configure("SimpleClient.exe.config")
    这是SimpleClient的app.config
    <?xml version="1.0" encoding="utf-8" ?>
    <configuration>
    <system.runtime.remoting>
    <application name="SimpleClient">
    <client url="tcp://localhost:8080/SimpleServer">
    <activated type="RemoteObjects.RemoteObject,RemoteObjects"/>
    </client>
    <channels>
    <channel ref="tcp client"/>
    </channels>
    </application>
    </system.runtime.remoting>
    </configuration>
    总是报找不到服务