问题
Using the latest versions of signalR and @aspnet/signalr I still get issues connecting. I'm fairly sure the versions are exactly the same.
I've been following the startup project here. But instead I'm using an Angular 5 application. I get issues with CORS headers and more specifically the OPTIONS request returns a 405 method not allowed.
Visual studio version here.
Typescript/javascript client version here
回答1:
I faced same issue and it appeared that order matters. Make sure you've put it like this:
app.UseCors(...builder...)
app.UseSignalR(...routes...)
app.UseMvc(...routes...)
来源:https://stackoverflow.com/questions/49860919/asp-net-core-2-1-preview-2-signalr-cors-issues-and-405-on-options-request