Click here to Skip to main content
15,887,214 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all,

This is probably going to sound like a strange/stupid, but I need to accomplish the following:

I have a SignalR service running and hosted on a domain. I also have an MVC application hosted on a separate domain. I now need the two to talk to each other. I can easily generate comms between a WPF app and the SignalR service, but I am having issues with the MVC app because of the way I want to do my comms between them. Basically, I want to have the comms at the controller level in in the MVC app and not via the views or javascript files like all the examples I have found. In a way, I would like to code it similar to what you do for the WPF application.

My questions are:
1 - Is it possible to build the comms like this with SignalR (MVC Controller Level <-> Service and not Javascript <-> Service)?
2 - If so, can someone please point me in the correct direction to go about implementing this?

Thanks in advance!
nortee
Posted
Comments
Richard Deeming 29-Jun-15 10:56am    
If you can call it from WPF, you should be able to call it from the MVC controller in exactly the same way.
nortee 29-Jun-15 11:00am    
Hi Richard,

Thanks for your response.

Unless there is something wrong with my configuration / setup of my MVC app, I cannot get it to even connect to the service. I will update this response in about an hour or so (when I am busy with the code again) with the error message I receive. Basically it breaks when I try to connect to the service (where it works fine in the WPF application).
Richard Deeming 29-Jun-15 11:19am    
Don't forget to post the relevant code as well as the error message. :)
nortee 29-Jun-15 14:31pm    
Hi Richard,

Well this is embarrassing. I figured out what my issue was. It was the wrong hub name that I used to connect to the service *_drops head in shame_*.

For everyone out there, SignalR does NOT give you a nice error message when you give it the wrong hub name.

Thanks again Richard!

1 solution

Embarrasing!!! I used the wrong hub name. Once this was changed to the correct hub name it began connecting properly... :|
 
Share this answer
 
Comments
Andy Lanng 29-Jun-15 17:26pm    
Ha ha - I've been there ^_^

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900