javascript - SignalR not working with domain folder -


i created app uses signalr has been working beautifully when running in visual studio's local iis web server (eg. http://localhost:12345). switched custom web server using iis uses domain folder (eg. http://localhost/test). signalr doesn't work. it's attempting user following url negotiate path:

http://localhost/signalr/negotiate?clientprotocol...... 

as can see, doesn't have subdomain test after http://localhost/.

i did searching , found people using $.connection.hub.url resolve issue, i'm unable work:

function init() {     connection = $.hubconnection();     hub = connection.createhubproxy('myhub');     $.connection.hub.url = baseurl + 'signalr';     connection.start(); }; 

thanks in advance.

i ended stumbling upon solution in this article.

you need pass domain folder $.hubconnection() method this:

function init() {     connection = $.hubconnection('domainfolder');     hub = connection.createhubproxy('myhub');     connection.start(); }; 

Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -