Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/wpf/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Wpf 信令平衡环境500内部服务器错误_Wpf_Signalr_F5 - Fatal编程技术网

Wpf 信令平衡环境500内部服务器错误

Wpf 信令平衡环境500内部服务器错误,wpf,signalr,f5,Wpf,Signalr,F5,我在平衡环境中安装信号器应用程序时遇到问题 我的设想是: WPF应用程序->F5平衡器->IIS 7 Win 2008 R2上托管的服务。 没有背板配置,基本上我的应用程序是一个服务器到客户端的ticker,因此只有服务器将与连接的客户端通信 我在论坛上读了很多: 我已经在服务器上配置了机器密钥 我已配置服务器跟踪,未在web app文件夹上创建任何文件 信号员ping工作http::8081/signar/ping 信号集线器显示为httpd::8081/signar/hubs 每次客户端开始

我在平衡环境中安装信号器应用程序时遇到问题

我的设想是: WPF应用程序->F5平衡器->IIS 7 Win 2008 R2上托管的服务。 没有背板配置,基本上我的应用程序是一个服务器到客户端的ticker,因此只有服务器将与连接的客户端通信

我在论坛上读了很多:

我已经在服务器上配置了机器密钥 我已配置服务器跟踪,未在web app文件夹上创建任何文件 信号员ping工作http::8081/signar/ping 信号集线器显示为httpd::8081/signar/hubs

每次客户端开始连接时,我都会从Fiddler处看到:

http://<mydomain>:8081/signalr/negotiate?clientProtocol=1.4&connectionData=%5B%7B%22Name%22:%22AgentsHub%22%7D%5D
端口8081已打开,信号员ping回复我,在我的笔记本电脑上,此方案有效

我不知道怎么解决它

有什么建议吗


非常感谢

我终于找到了配置中的错误

1我开始使用WPF client和Console.net self-host Signaler开发示例应用程序,使用signalr documentation bootstrap选项,用于自主机应用程序: WebApp.StartConfig.getSignalServerUri

2我添加了一个新的ASP.Net服务,使用相同的引导方法,忘记安装nuget AspNet.SignalR包

服务正在回复Ping,而rest服务正在回复,但连接管道不工作

3删除WebApp.StartConfig.GetSignalRServerUri并仅使用启动类:

[assembly: OwinStartup(typeof(Startup))]
namespace MyApp.Host.WebService.SignalR
{
    public class Startup
    {
        private static readonly ILog log = LogManager.GetLogger(typeof(Startup));

        public void Configuration(IAppBuilder app)
        {
            // Any connection or hub wire up and configuration should go here
            try
            {

                var hubConfiguration = new HubConfiguration();
                hubConfiguration.EnableDetailedErrors = true;
                app.MapSignalR("/signalr",hubConfiguration);
                log.Debug("SignalR started");
            }
            catch (Exception ex)
            {
                log.Error("Error during SignalR startup");
                log.Error(ex);
            }
        }
    }
}
包括Microsoft.Signalr软件包,一切都正常

我从这个链接中获取了完整的示例:

检查服务器上的事件日志-它可能包含更多详细信息,如异常详细信息,包括stacktrace@Pawel,我没有看到任何特定错误,客户端可以ping,可以列出集线器,但无法连接。通过IISExpress,它可以在本地工作。这看起来像是一个配置问题,但很难说——500的原因可能有很多。您可能想尝试以下方法:
[assembly: OwinStartup(typeof(Startup))]
namespace MyApp.Host.WebService.SignalR
{
    public class Startup
    {
        private static readonly ILog log = LogManager.GetLogger(typeof(Startup));

        public void Configuration(IAppBuilder app)
        {
            // Any connection or hub wire up and configuration should go here
            try
            {

                var hubConfiguration = new HubConfiguration();
                hubConfiguration.EnableDetailedErrors = true;
                app.MapSignalR("/signalr",hubConfiguration);
                log.Debug("SignalR started");
            }
            catch (Exception ex)
            {
                log.Error("Error during SignalR startup");
                log.Error(ex);
            }
        }
    }
}