When I am trying to connect to signalR (Asp.Net WebApi) through a seperate app (angular4) all locally, I get the following error:
http://127.0.0.1:50840/signalr/negotiate?clientProtocol=1.5&connectionData=%5B%7B%22name%22%3A%22apihub%22%7D%5D&_=1503591726722. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://127.0.0.1:61679' is therefore not allowed access.
What was done here and here by doing the following:
public void Configuration(IAppBuilder app)
{
app.Map("/signalr", map =>
{
map.UseCors(CorsOptions.AllowAll); //TODO: FIX THIS
var hubConfiguration = new HubConfiguration()
{
};
map.RunSignalR(hubConfiguration);
});
}
But that still does not seem to work - any ideas? The Configuration gets hit on app startup. It seems simple, what am I missing? Thank you.