locked
Two Hubs must not share the same name RRS feed

  • Question

  • User1759229208 posted

    I'm working on SignalRService and error occurs on this line

     app.MapAzureSignalR(this.GetType().FullName);

    It's returning an error "Two Hubs must not share the same name"

    Packages were updated. I don't have App_Code folder. Already cleaned bins.

    When I set it to just simple SignalR, it works.

    May I know other possible issues for this?

    Thank you.

    Monday, February 4, 2019 5:03 AM

All replies

  • User283571144 posted

    Hi baimars,

    As far as I know, the problems was  you put the hub class in App_Code folder in Web Application Project.

    The App_Code folder is a special ASP.NET RUNTIME folder. It will generate two hub files which make this issue.

    More details, you could refer to below article to know how app_code folder work:

    http://vishaljoshi.blogspot.com/2009/07/appcode-folder-doesnt-work-with-web.html 

    Best Regards,

    Brando

    Tuesday, February 5, 2019 5:17 AM
  • User1759229208 posted

    Thanks for your response.

    I'm using a Web Application project and I don't have App_Code folder.

    Any other suggestions to check? Thanks!

    Thursday, February 7, 2019 2:31 AM
  • User-1038772411 posted

    We should never use the App_Code folder for actual system code, it should be for your web forms only.You use the App_Code folder in anything but WebForms as that's the place where you can simply add code pages (even on the live server) and they'll compile at run time.

    We created a separate folder called _Code and place our code in there .

    Friday, February 8, 2019 7:56 AM