Closed zdh8675 closed 4 years ago
Everyone has not encountered any problems about invoke?
I have and I think it might be limited to long polling. I had to add this line at line 73 of jQueryShim.js:
if (options.type === 'GET' && options.data.data) options.url += `&data=${options.data.data}`
Can you try that and see if it works for you? When the POST command switches to a GET in long polling, the post body is ignored and you have to put the data into the querystring. (I think)
@gtwilliams03 thank you sir, the error disappear, but I still have problems, it seems that there is no call to the server method.
I can not see any 'Console', method not called, something goes wrong?
I'm seeing the same error as the original post, as I try to invoke a subscription :(
Edit: Disabled { jsonp: true } and I'm all good now
thanks @kamil212 that solved the same issue for me too
I have already specified here { jsonp: true },
and then use this code to call the server method:
hubProxy.invoke('joinGroupAsync', { groupName: 'GroupBaoJing' })
but reported the following error:
I used C # to write Signalr's self-hosted service, and also added the code to allow cross-domain, but it did not work.
So,I really do not know how to solve this problem, ask for you help.