New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Signal R client javascript funtion not being called nor executed #1891
Comments
Hi dablaz, |
Have you followed the documentation: http://www.aspnetboilerplate.com/Pages/Documents/SignalR-Integration I'm asking this since you are using I ask you to follow the documentation and implement your feature step by step to understand which step you have a problem. Also, Abp writes some logs to the browser console like |
@hikalkan I already did follow the documentation still did not work |
So, can you describe on what step you get which error? I can not help for "just does not works" because "it just works" for me :) |
@hikalkan My Client Methods on my javascripts are not been called. |
Is it connecting to signalr? Or, can you just create a new template from http://www.aspnetboilerplate.com/Templates and add your simplified code to see it if works. If not works then share the project. It would be easier for me to investigate if there is a problem. |
Still having the issue of my client callback not working, and am not getting any errors |
I've been having this issue too. I think I may have narrowed it down to abp.signalr.js connecting to the server before the client side events have been established. It seems you need to call If I set |
Same problem here. Although I am using an old 4.8.1 ABP, I have the same problem - abp.signalr.connect() needs to be called manually AFTER I bind to hub methods.
So, that is indeed true - connect should be made AFTER adding all event handlers. Unfortunately this is still mentioned nowhere in the documents. Please mention, that You need to get the hub in another way (maybe this is only for old versions of ABP, but hey, this problem took me almost a complete working day to find out): var connection = $.hubConnection();
var contosoChatHubProxy = connection.createHubProxy('contosoChatHub');
contosoChatHubProxy.on('addContosoChatMessageToPage', function(userName, message) {
console.log(userName + ' ' + message);
});
connection.start()
.done(function(){ console.log('Now connected, connection ID=' + connection.id); })
.fail(function(){ console.log('Could not connect'); }); |
I have added a note about this to SignalR documentation #6785 |
I am currently developing a web application using asp.net MVC and asp.net boilerplate framework. Recently I just tried implementing real time updates using Signal R 2.2.1, But my callbacks on my JavaScript client are not been called nor executed. I don't know where I have gone wrong, please how do I get my client callback to be excited. Thanks, Below are my code.
My Signal R hub
My JavaScript Code
and my owin startup
Currently using the version 1.4.2
The text was updated successfully, but these errors were encountered: