private void WriteExceptionResponse(PipeConnection pipe, string exceptionMessage)
 {
     try
     {
         MemoryStream stream = new MemoryStream(System.Text.Encoding.ASCII.GetBytes(exceptionMessage));
         pipe.BeginWriteMessage();
         pipe.Write(stream);
         pipe.EndWriteMessage();
     }
     catch { }
 }
        private void WriteClientResponse(PipeConnection pipe,
                                         ITransportHeaders headers,
                                         Stream responseStream)
        {
            String uri;
            Object oUri = headers[CommonTransportKeys.RequestUri];

            if (oUri != null)
            {
                uri = oUri.ToString();
            }
            else
            {
                uri = "";
            }

            pipe.BeginWriteMessage();
            pipe.WriteHeaders(
                uri,
                headers);

            pipe.Write(responseStream);
            pipe.EndWriteMessage();
        }
Ejemplo n.º 3
0
 private void WriteExceptionResponse(PipeConnection pipe, string exceptionMessage)
 {
     try
     {
         MemoryStream stream = new MemoryStream(System.Text.Encoding.ASCII.GetBytes(exceptionMessage));
         pipe.BeginWriteMessage();
         pipe.Write(stream);
         pipe.EndWriteMessage();
     }
     catch { }
 }
Ejemplo n.º 4
0
        private void WriteClientResponse(PipeConnection pipe,
                                         ITransportHeaders headers,
                                         Stream responseStream)
        {
            String uri;
            Object oUri = headers[CommonTransportKeys.RequestUri];
            if (oUri != null)
            {
                uri = oUri.ToString();
            }
            else
            {
                uri = "";
            }

            pipe.BeginWriteMessage();
            pipe.WriteHeaders(
                                uri,
                                headers);

            pipe.Write(responseStream);
            pipe.EndWriteMessage();
        }