none
SSL in .NET REMOTING RRS feed

  • Question

  • Hi

        I want my application which uses tcpchannel in .net remoting (not wcf) need to be communicated safely with key exchange.

        I have writen custom sync, IClientChannelSink. In processrequest method, i encrypt the request stream with tripledes algorithm as follows. Its not working but it works if i skip below lines. It reaches central but method is not invoked.

                    tripleDES = SymmetricAlgorithm.Create("Rijndael");

                    tripleDES.GenerateIV();

    Stream outStream = new System.IO.MemoryStream();
                CryptoStream encryptStream = new CryptoStream(outStream, tripleDES.CreateEncryptor(), CryptoStreamMode.Write);

                byte[] buf = new Byte[1000]; int cnt = inStream.Read(buf, 0, 1000); while (cnt > 0)
                {
                    encryptStream.Write(buf, 0, cnt);
                    cnt = inStream.Read(buf, 0, 1000);
                } encryptStream.FlushFinalBlock(); outStream.Seek(0, SeekOrigin.Begin);
                return outStream; 

    Please help me... Where i am wrong....

    Sunday, February 8, 2015 2:30 PM

All replies