.NET Remoting on Mono: Uri already in use

发布于 2022-08-31 20:29:56 字数 2277 浏览 15 评论 0

Running:

Ubuntu 13.10, 64-bit
Mono JIT compiler version 2.10.8.1
I have an application developed in VS 2008 that uses .NET remoting. We are trying to run this on Ubuntu/Ubuntu Kylin now, but I am receiving the following error.

Code

    //RemotingConfiguration.Configure(Application.ExecutablePath + ".config", false);该行Mono Migration Analyzer检测不过
RemotingConfiguration.Configure(Application.ExecutablePath + ".config");
//RemotingConfiguration.CustomErrorsMode = CustomErrorsModes.Off;该行Mono Migration Analyzer检测不过 
RemotingConfiguration.CustomErrorsEnabled(false);               
// Create and marshal an object for remote invocation.
_RemotingServer = new RemotingServer();
//注册Client
_RemotingServer.KeepAliveClient = new delClientInfo(KeepAliveClient);
_RemotingServer.AddClient = new delClientInfo(AddClient);
_RemotingServer.RemoveClient = new delClientInfo(RemoveClient);
obj = RemotingServices.Marshal(this._RemotingServer, "RemotingServer");

causing exception:
System.Runtime.Remoting.RemotingException: Uri already in use:

 <!--Remoting 设置-->
    <system.runtime.remoting>
        <customErrors mode="off"/>
        <application>

      <service>
                <wellknown mode="Singleton" objectUri="RemotingServer" type="EquipsLib.RemotingServer,EquipsLib" />
            </service>

      <channels>
                <channel name="MyChannel" port="8090" ref="http">
                    <serverProviders>
                        <provider ref="wsdl"/>
                        <formatter ref="binary" typeFilterLevel="Full"/>
                    </serverProviders>
                    <clientProviders>
                        <formatter ref="binary"/>
                    </clientProviders>
                </channel>
            </channels>
        </application>
    </system.runtime.remoting>
</configuration>


Any ideas on this problem? Thanks!

图片描述

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文