Closed Sokal21 closed 7 years ago
This is not a problem of the client library. Please look at your SignalR server configuration and make sure you provide the correct CORS headers. Please see https://docs.microsoft.com/en-us/aspnet/signalr/overview/guide-to-the-api/hubs-api-guide-javascript-client#how-to-establish-a-cross-domain-connection for details.
Yes, It was problem of the server. Thanks for your answer!
2017-10-20 8:59 GMT-03:00 Sebastian P.R. Gingter notifications@github.com:
This is not a problem of the client library. Please look at your SignalR server configuration and make sure you provide the correct CORS headers. Please see https://docs.microsoft.com/en-us/aspnet/signalr/overview/ guide-to-the-api/hubs-api-guide-javascript-client#how- to-establish-a-cross-domain-connection for details.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/DVLP/signalr-no-jquery/issues/30#issuecomment-338186485, or mute the thread https://github.com/notifications/unsubscribe-auth/ARyeGKtzdbZUeTZcK7RW2vldIFLDLcTSks5suIscgaJpZM4PHZ0o .
@Sokal21 then close this :P
Hello,
I'm facing the same issue, but with enabled support of JSONP:
ASP.NET startup sample:
var config = new HttpConfiguration();
config.EnableCors(new EnableCorsAttribute("*", "*", "*"));
...
appBuilder.MapSignalR(new HubConfiguration {EnableJSONP = true});
Client code sample:
const connection = hubConnection('http://localhost:5042')
connection.start({ jsonp: true })
I'm using: Microsoft.AspNet.WebApi.Core 5.2.7 Microsoft.AspNet.SignalR.Core 2.4.0 Client is React component.
Can you please tell what I'm doing wrong?
I'm triying to start a connection with a server wich is hosted in another domain, but every tieme I tried to start it I get the "No 'Access-Control-Allow-Origin' header is present on the requested resource" error. How can I fix it?