我正在使用NGINX卸载SSL,然后使用varnish来加载来自IIS8的平衡/缓存响应。
i.e. ssl -> nginx -> varnish -> iis8
这完美无缺。使用长轮询的SignalR工作正常 - 所有超时等都已正确配置。
现在我正在尝试使用SignalR和websockets来使用此配置;没有成功。为简化起见,我尝试了以下两种设置:
- nginx - > iis8(with these settings)
- 清漆 - > iis8(with these settings)
醇>
这些都不奏效。我一直在Chrome中收到此错误:
与'ws:// xxxxxxxx'的WebSocket连接失败:意外的响应代码:500
这来自IIS:
System.InvalidOperationException: Not a valid web socket request.
at Microsoft.AspNet.SignalR.Owin.ServerRequest.AcceptWebSocketRequest(Func`2 callback)
at Microsoft.AspNet.SignalR.PersistentConnection.ProcessRequest(HostContext context)
at Microsoft.AspNet.SignalR.Owin.CallHandler.Invoke(IDictionary`2 environment)
at Microsoft.Owin.Host.SystemWeb.OwinCallContext.Execute()
at Microsoft.Owin.Host.SystemWeb.OwinHttpHandler.BeginProcessRequest(HttpContextBasehttpContext, AsyncCallback callback, Object extraData)
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.Owin.Host.SystemWeb.CallContextAsyncResult.End(IAsyncResult result)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
似乎某些内容未正确转发到IIS或IIS正在挑剔某些事情。有人能指出我为这个设置工作的配置吗?