未处理的"System.Runtime.Remoting.RemotingException"类型的异常出现在mscorlib.dll中。
其他信息:激活RemoteHello.RemoteObject,RemoteHello,Version=1.0.2181.16110,Culture=neutral,PublicKeyToken=null类型的权限被拒绝。客户端:
RemotingConfiguration.RegisterActivatedClientType(typeof(RemoteObject),
                           "http://localhost:6791/HelloServer");
RemoteObject obj = new RemoteObject();请教。

解决方案 »

  1.   

    public class RemoteObject : MarshalByRefObject
    按引用编组的哦.
      

  2.   

    服务器端:
    <configuration>
        <System.Runtime.Remoting>
            <application name="HelloServer">
                <service>
        <activated type="HelloServer.RemoteObject,RemoteObject"/>
                </service>
                <channels>
                    <channel type="System.Runtime.Remoting.Channels.Tcp.TcpChannel,
                    System.Runtime.Remoting" port="6791"/>
                </channels>
            </application>
        </System.Runtime.Remoting>
    </configuration>客户:
    <configuration>
        <system.runtime.remoting>
    <application name="HelloClient">
        <client url="http://localhost:6791/HelloServer">
            <activated type="HelloServer.RemoteObject,RemoteObject"/>
        </client>
        <channels>
        <channel type="System.Runtime.Remoting.Channels.Tcp.TcpChannel,
        System.Runtime.Remoting" port="777"/>
        </channels>
    </application>
        </system.runtime.remoting>
    </configuration>