Delphi XE10.3 使用FireDAC开发DataSnap服务器,客户端也使用TFDConnection连接服务器,据说比原来的TSQLConnection要快,要更方便使用。
照方法做了一个DataSnap,再做一个Client,在IDE中TFDConnection可以连接到DataSnap,但运行后,打开连接会报no peer with the interface with guid [{ }] has been registered错误,经在网上查找,有説引用IPPeerServer,出有説引用ippeerclient。最后两个全加上了,搞掂!
http://blog.sina.com.cn/s/blog_541686150102vsgq.html
“no peer with interface with guid”:与接口GUID没有同行
Where is this error coming from? In the example we are using DataSnap TCP/IP connectivity, which is internally implemented using Indy framework. The Indy implementation has changed between XE and XE3 versions, so there are little changes needed. On the server it is necessary to add "IPPeerServer" to the interface "uses" clause in the "ServerContainerUnit1" and on client we need to add "IPPeerClient" to the interface "uses" clause in the "ClientModuleUnit1". In fact the IDE can add these entries automatically. Just put the cursor somewhere in the "uses" clause of these two files and when you press "Enter" correct entries will be added for You! Cool:-)
在服务器上, “servercontainerunit1单元的 interface
uses下必须要添加 “ippeerserver” ”同时,在客户端“clientmoduleunit1”单元下 interface
uses 我们需要添加 “ippeerclient”
参照http://blogs.embarcadero.com/pawelglowacki/2013/01/10/39958/
另一篇的链接是:
https://blog.youkuaiyun.com/pulledup/article/details/80680127
本文详细介绍了在使用Delphi XE10.3的FireDAC组件开发DataSnap服务器时遇到的连接问题。通过在服务器端的ServerContainerUnit1和客户端的ClientModuleUnit1单元文件中分别添加IPPeerServer和IPPeerClient接口,解决了“no peer with interface with guid”错误,实现了客户端与服务器的正常连接。
892

被折叠的 条评论
为什么被折叠?



