Tech
Forums
Jobs
Books
Events
Live
Interviews
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
0
Reply
Use Multiple HUB in SignalR
Ajay Patel
Jun 25 2014 8:30 AM
2.2k
Reply
Hello,
I am facing issue to access multiple HUBs in SignalR. I have 2 HuBs in my Application. It is connected successfully if I do not create any client methods but when I add client method then It gives error:
"No transport could be initialized successfully. Try specifying a different transport or none at all for auto initialization."
e.g
Method to connect :
msg = $.connection.messages;
chat = $.connection.chat;
chat.client.isActive = function (connectionid) { // if I add this method before start connection it will give error.
}
$.connection.hub.start({ transport: 'auto', xdomain: true }).done(function () {
chat.client.isActive = function (connectionid) { // if I add this method here, then it will not called from HUB
}
})
.fail(function (e) {
alert(e);
});
HUB:
public class Chat : Hub
{
}
public class Messages : Hub
{
}
What is the issue ???
Please suggest me
Thanks
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
0
)
Next Recommended Forum
How upload the video and saved into database ,play in asp.ne
How to avoid Memoryleak with googlemap API in javascript ?