i am using library 'signalr-no-jquery' in ionic2 with visual studio 2015 . I'm using the following code .
Import:
import { hubConnection } from 'signalr-no-jquery';
Code:
console.log("Stage 1");
var connection =new hubConnection('http://192.168.0.213:9000');
console.log("Stage 2");
var hubProxy = connection.createHubProxy('broadcaster');
console.log("Stage 3");
connection.start({ jsonp: true })
.done(() => {
console.log('Now connected, connection ID=' + connection.id);
})
.fail(() => { console.log('Could not connect'); });
Every time it goes in fail and write console 'Could not connect'. Any suggestion what i'm doing wrong ?
Library link:
https://github.com/DVLP/signalr-no-jquery
I have searched but did not find any solution . Any suggestion?
Note: At server side i'm using c# web api . and hub is configured and it's working fine with angular1 as a client.But same is not working with my ionic2 app.
Update 1
Here is chrome network response .
Request 1
Request URL:
Response:
Request 2
Request URL:
Response
The ConnectionId is in the incorrect format.