Getting 0x800a138f - Javascript Runtime Error: Unable To Get Property 'client' Of Undefined Or Null Reference
Solution 1:
You are referring to the client
object of an undefined
object. So I have been searching inside your code for
.client
These were the results:
chatHub.client.onConnected
chatHub.client.onNewUserConnected
chatHub.client.onUserDisconnected
chatHub.client.messageReceived
chatHub.client.sendPrivateMessage
So, if you look at the results, it becomes obvious that chatHub
is undefined
somewhere. This is how you initialize it:
var chatHub = $.connection.chatHub;
I wonder what is inside $.connection
. Are you missing a script from your html?
Solution 2:
A couple of things...
You're using an old signalr version, have you tried upgrading to the latest?
Otherwise; I had a similar problem, I had to solve it by setting up the connection without the generated proxy (/signalr/hubs).
See this link http://www.asp.net/signalr/overview/guide-to-the-api/hubs-api-guide-javascript-client and instead of setting it as a "generated proxy", implement it without it. (Search for "Without the generated proxy")
Post a Comment for "Getting 0x800a138f - Javascript Runtime Error: Unable To Get Property 'client' Of Undefined Or Null Reference"