开发者

IpcChannel MSDN Example : Cannot load type {0} Exception

开发者 https://www.devze.com 2023-03-31 15:06 出处:网络
I followed the MSDN example for the IpcChannel class : http://msdn.microsoft.com/en-us/library/system.runtime.remoting.channels.ipc.ipcchannel.aspx

I followed the MSDN example for the IpcChannel class : http://msdn.microsoft.com/en-us/library/system.runtime.remoting.channels.ipc.ipcchannel.aspx

I made two Console Application Projects :

The client :

namespace IPC_Client_Test
{
    class Program
    {
        [SecurityPermission(SecurityAction.Demand)]
        public static void Main(string[] args)
        {
            // Create the channel.
            IpcChannel channel = new IpcChannel();
            // Client code

And th开发者_如何学Goe server :

namespace IPC_Server_Test
{
    class Program
    {
        [SecurityPermission(SecurityAction.Demand)]
        public static void Main(string[] args)
        {
            // Create the server channel.
            IpcChannel serverChannel =new IpcChannel("localhost:9090");
            // Server Code

I run the Server then launch the Client and I get an exeption at this line :

Console.WriteLine("The remote object has been called {0} times.", service.GetCount());

Cannot load type 'IPC_Client_Test.RemoteObject, IPC Client Test, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.


When I started using IPC, I've search over the web and found some examples by Zach Smith, from TechRepublic. I think you could start by this. It helped me to make a basic IPC.

http://www.techrepublic.com/article/using-ipc-channels-and-net-framework-20-to-communicate-between-processes/6143016

0

精彩评论

暂无评论...
验证码 换一张
取 消