在信号/集线器上的信号err_connection_refused



我已经换了电脑来运行我的项目和网站,现在它根本不能工作。

当我去http://localhost:8080/signalr/hubs我得到"ERR_CONNECTION_REFUSED"

在我的自托管应用程序中:

string url = "http://*:8080";
using (WebApp.Start(url))
 {
     writeStatus("Server running on " + url);
 }

在我的网站上:

<script src="http://localhost:8080/signalr/hubs"></script>

我错过了什么?

Try this->CorsOptions.AllowAll;

        app.UseCors(CorsOptions.AllowAll);
        var hubConfiguration = new HubConfiguration() ;
        hubConfiguration.EnableDetailedErrors = true;
        app.MapSignalR(hubConfiguration); 

最新更新