How to generate the interface file using named pipe and Visual Studio

Hi,
I have a .net console application that needs communicate with a Dephi Server using NamedPipe. I created a .remoteRODL file as follows:

<RemoteRodl>
  <Server>
    <Name>PServerUtils</Name>
    <ServerUri>namedpipe://123456@./bin</ServerUri>
  </Server>
</RemoteRodl>

If I use the Delphi to generate the Intf file everything works, but If I have use VisualStudio (rigth click->Update Interface File) using the same URI I got the error:
Cannot read RODL library from source namedpipe://123456@./bin. Cannot load RODL from provided server Uri. Invalid URI: The hostname could not be parsed.

I already tried using the URI namedpipe://123456@localhost/bin but doesnt works too. I get the error:
Cannot read RODL library from source namedpipe://123456@localhost/bin. Cannot load RODL from provided server Uri. Unable to connect to pipe. Error code 5

What is wrong?

I don’t believe the Named Pipe channel supports serving the RODL. Is this a Codefirst server or a RODL based server? in the latter case it would be simplest just use the rodl from the server to generate the Into for the client… otherwise, you might need to expose a second server channel, say HTTP, to obtain the RODL, even if you won’t use it (or even disable it) for production.

Hi,

.NET uses system classes so dot (.) cannot be recognized as host name.
Replace . with localhost like

note: Pay attention that NetworkByteOrder property has different default values on Delphi and .NET platforms so they should have the same value.

I already tried that. If I use namedpipe://newproject@localhost I get the error:

Cannot read RODL library from source namedpipe://123456@localhost. Cannot load RODL from provided server Uri. Unable to connect to pipe. Error code 5.

However, I managed to work around the problem using Service Builder (ROServiceBuilder.exe).

Hi,

  • have you used the same the NetworkByteOrder value on Delphi server and .NET client (both are true or both are false)?
  • have you used the same user account? for example, this error can be raised if server is launched as Windows Service and Visual Studio is launched under usual user account.

You are sure. After changing NetworkByteOrder to True on my Delphi server and starting it manually (not from Delphi which runs as administrator), everything works.

Thank you very much !

2 Likes