# Unexpected end of Message when connecting from a .NET Client using HTTP transport

**URL:** https://talk.remobjects.com/t/unexpected-end-of-message-when-connecting-from-a-net-client-using-http-transport/5830
**Category:** Remoting SDK
**Created:** [March 7, 2015, 6:25pm UTC](https://talk.remobjects.com/t/unexpected-end-of-message-when-connecting-from-a-net-client-using-http-transport/5830 "2015-03-07T18:25:40Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![rgomezc](https://talk.remobjects.com/user_avatar/talk.remobjects.com/rgomezc/32/530_2.png) [@rgomezc](https://talk.remobjects.com/u/rgomezc)
#### Post date: [March 7, 2015, 6:25pm UTC](https://talk.remobjects.com/t/unexpected-end-of-message-when-connecting-from-a-net-client-using-http-transport/5830/1 "2015-03-07T18:25:40Z")

</div>

Hello,

I have added an Indy HTTP Server to my RO Server, but when I try to use it from a .NET client I get the following exception:

```
BinMessage: Unexpected end of stream.

Línea 2199: @__LocalMessage.WriteUtf8String("Modulo", Modulo);
Línea 2200: @__LocalMessage.FinalizeMessage();
Línea 2201: @__ClientChannel.Dispatch(@__LocalMessage); <<<< here is where the exception happens.
Línea 2202: int _Result = @__LocalMessage.ReadInt32("Result");
Línea 2203: @__LocalMessage.Clear();

```

I have been used correctly a TCP and NamedPipes transport from this client; this only happens with the HTTP channel.

I create the channels with this code:

```
 Channel = (ClientChannel)ClientChannel.ChannelMatchingTargetUri(URL);

```

In the server the only thing I did was adding the HTTP Server, changed the port number, and added the message handler. The Message (Bin) handler uses an AES envelope.

The message in this case is a simple login, I mean, the size should be quite small.

Any idea?

---

<div class="post-metadata">

### Author: ![antonk](https://talk.remobjects.com/letter_avatar_proxy/v4/letter/a/a5b964/32.png) [@antonk](https://talk.remobjects.com/u/antonk)
#### Post date: [March 10, 2015, 10:31am UTC](https://talk.remobjects.com/t/unexpected-end-of-message-when-connecting-from-a-net-client-using-http-transport/5830/2 "2015-03-10T10:31:14Z")

</div>

Hello

Unfortunately we weren’t able to reproduce the issue. Could you provide a simple testcase where the issue reproduces and provide the exception stacktrace? Also please specify exact versions of RemObjects SDK you are using.

Thanks in advance

---

<div class="post-metadata">

### Author: ![rgomezc](https://talk.remobjects.com/user_avatar/talk.remobjects.com/rgomezc/32/530_2.png) [@rgomezc](https://talk.remobjects.com/u/rgomezc)
#### Post date: [March 10, 2015, 4:09pm UTC](https://talk.remobjects.com/t/unexpected-end-of-message-when-connecting-from-a-net-client-using-http-transport/5830/3 "2015-03-10T16:09:25Z")

</div>

I’m using the latest March 2015 release in both client and server.

I will try to create a simple test case and post it here.

---

<div class="post-metadata">

### Author: ![infraestructura](https://talk.remobjects.com/letter_avatar_proxy/v4/letter/i/edb3f5/32.png) [@infraestructura](https://talk.remobjects.com/u/infraestructura)
#### Post date: [July 26, 2017, 2:41pm UTC](https://talk.remobjects.com/t/unexpected-end-of-message-when-connecting-from-a-net-client-using-http-transport/5830/4 "2017-07-26T14:41:59Z")

</div>

I have the same problem , did you can to resolved it.

---

<div class="post-metadata">

### Author: ![antonk](https://talk.remobjects.com/letter_avatar_proxy/v4/letter/a/a5b964/32.png) [@antonk](https://talk.remobjects.com/u/antonk)
#### Post date: [July 26, 2017, 8:21pm UTC](https://talk.remobjects.com/t/unexpected-end-of-message-when-connecting-from-a-net-client-using-http-transport/5830/5 "2017-07-26T20:21:07Z")

</div>

Hello

Could you please create a testcase? The original poster never provided it, and the issue cannot be reproduced without it.

Thanks in advance
