4.5 でうまく動作したシグナルがあります。4.6にアップグレードした後、Windows 2008 R2では正常に動作しますが、Windows 2012では動作しません。Websocket接続が.net 4.6で失敗しました
エラーは次のとおりです。
System.InvalidOperationException: WebSockets is unsupported in the current application configuration. To enable this, set the following configuration switch in Web.config:
system.web
httpRuntime targetFramework="4.5"
system.web
For more information, see http://go.microsoft.com/fwlink/?LinkId=252465.
at
System.Web.Util.SynchronizationContextUtil.ValidateMode(SynchronizationContextMode currentMode, SynchronizationContextMode requiredMode, String specificErrorMessage)
at System.Web.HttpContext.AcceptWebSocketRequest(Func2 userFunc, AspNetWebSocketOptions options) at Microsoft.AspNet.SignalR.Transports.WebSocketTransport.AcceptWebSocketRequest(Func2 callback)
at Microsoft.AspNet.SignalR.PersistentConnection.ProcessRequestPostGroupRead(HostContext context, String groupsToken)
at Microsoft.AspNet.SignalR.TaskAsyncHelper.FromMethodT1,T2,T3,TResult
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Owin.Mapping.MapMiddleware.d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at
Microsoft.Owin.Host.SystemWeb.IntegratedPipeline.StageAsyncResult.End(IAsyncResult ar)
at System.Web.HttpApplication.AsyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
私はweb.configファイルにのhttpRuntime targetFramework = "4.5" を追加した場合、アプリケーションがまったく実行されません。
があなたの問題が解決される問題を解決追加しますか? – Aria