Invalid BinMessage signature found


(Peter Müller-Mannhardt) #1

I’m new to C# ASP.NET and trying to create an ASP.NET client for an existing RO-Server written in Delphi. After some trying I’m able to call the service but I allways get an " *Invalid BinMessage signature found<font size=“7”<Invalid Path exception. Server and Client are both build with the current (trial) build if RO-SDK.
The source-log shows:
Zeile 52: ___LocalMessage.WriteInt32(“B”, B);
Zeile 53: ___LocalMessage.FinalizeMessage();
Zeile 54: this.ClientChannel.Dispatch(___LocalMessage);
Zeile 55: int _Result = ___LocalMessage.ReadInt32(“Result”);
Zeile 56: return _Result;

the stack is:
RemObjects.SDK.BinHeader.ReadFromStream(Stream stream) +178
RemObjects.SDK.BinMessage.InternalReadFromStream(Stream stream) +52
RemObjects.SDK.Message.ReadFromStream(Stream stream) +24
RemObjects.SDK.IpHttpClientChannel.IntDispatch(Stream request, IMessage response) +888
RemObjects.SDK.ClientChannel.Dispatch(IMessage message) +403
ClassLibrary.BasicService_Proxy.Sum(Int32 A, Int32 B) in E:\VisualStudio\repos\MyASP.NET_Client\ClassLibrary\BasicLibrary_Intf.cs:54
ASP.default_aspx.Button2_Click(Object sender, EventArgs e) in e:\VisualStudio\repos\MyASP.NET_Client\WebApplication\Default.aspx:45
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +111

Whats to do?


(antonk) #3

Hello

For the start could you show the code of this method?

e:\VisualStudio\repos\MyASP.NET_Client\WebApplication\Default.aspx:45
System.Web.UI.WebControls.Button.OnClick(EventArgs e) 

I need to know the URL you are using to call the server.

After that the easiest way to pinpoint the issue would be to send us a testcase to support@ (your simple ASP.NET client and the server) Just take a copy of the existing one, remove all code in the service implementations and all business logic, even remove all methods from the server except for the one you are calling.

More complex way implies traffic interception between the server and client apps, however for now it is not needed.

Regards


(Peter Müller-Mannhardt) #4

Txs antonk. I’ve found out that ther server (delphi) used JSON Message while the ASP.NET client expected BIN :frowning: Using TROBinMessage server side fixed the problem :slight_smile:
But what if I’ve to use JSON? Can’t figure out, where I can change that on the client site :frowning:


(antonk) #5

Hello

At first, the same client app can expose its API using several message types at the same time. Ie a server can use Bin and JSON messages simultaneously. There is no performance penalties. Even more, for RO SDK-based client <-> RO SDK-based server communications Bin format will take less resources to encode/decode data and to transfer this data.

Please send the client app sources to support@ and I’ll tell you what you need to change.


(Peter Müller-Mannhardt) #6

Txs antonk,

good to know RO-Server can expose several message types at the same time. Didn’t known that.

According to the client project, I would prefer to use one of your examples (asked for one with reference number 17860). Mine is a mess at the moment :wink:

The Server is invoked like this:

System.DateTime aTime = ClassLibrary.ServerAccess.Instance.BasicService.GetServerTime();

You find the ServerAcces Class code attached. It follows the code, that the SDK Service-Builder code generator suggests.

I guess I’ll have to change ServerAccess.cs Line #40:

    this ._serverUrl = "http://localhost:8099/bin

Into something like:

this._serverUrl = "http://localhost:8099/json"

Right?

ServerAccess.cs (952 Bytes)


(antonk) #7

Yes, .../json is the default endpoint for JSON message type. You can easily check if that url is correct by opening it in the browser.