2
votes

What is this error? In the first calling this code:

SignalRInvoker Invoker = new SignalRInvoker GlobalHost.ConnectionManager.GetHubContext<GeneralHub>().Clients);

And the funny exception is :

Two Hubs must not share the same name. 'SM.GUI.Common.Remouting.GeneralHub, SM.GUI.Common, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' and 'SM.GUI.Common.Remouting.GeneralHub, SM.GUI.Common, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' both share the name 'generalHub'.

3
I got the same error while using Code Contracts, once I disabled code contracts everything worked fine. I think it has something to do with proxies being created for the your hubs.Vas

3 Answers

1
votes

For me, I needed to move the hub class out of the app_code folder.

0
votes

This error can be caused by not publishing the Hub correctlly,

Take a look at https://github.com/SignalR/SignalR/issues/2935 it deals with the same error.

0
votes

I had this error when I accidentally had 2 different .dll's in the bin folder of my web project, with one of them being an old .dll which happened to also contain the same named hub in it. When deploying to IIS I think the hub auto discovery process found the hubs in both .dlls. As soon as I just deleted the old .dll I worked fine.