locked
anyone succeed to implement signalR into VB app? RRS feed

  • Question

  • ..cause im not sure where im making mistakes.. i've followed Paul Van Bladel's posts on pragmaswitch, and signalR caught my eye, so i tried to implement commands and notifications with it.. his example works (in C# - after few quircks), but almost identical project in vb.net does not work and i'm getting aggregate error exception (on hubconnection.start.wait()).. i've used nuget packages from his demo app, except necessity for microsoft.aspnet.signalR.client which was downloaded from online repository.. anyone tried this already?

    Kivito


    Nobody expects the Spanish Inquisition! (M.P.F.C.)


    • Edited by Kivito Wednesday, February 6, 2013 11:05 AM
    Wednesday, February 6, 2013 11:03 AM

Answers

  • hi!

    i believe that error is caused by missing json assembly..

    i just managed to get it working, i've added global.asax (with registering hubs inside), and also used latest prerelease rc2 packages without other stuff from Paul's blog. so just go to server project, uninstall all signalr packages and add latest microsoft.signalr.aspnet package from nuget, and also same thing for microsoft.signalr.client in client package, also it seems that they changed "hubconnection.createproxy(...)" to "hubconnection.createhubproxy(...)".. see if it helps!

    Kivito


    Nobody expects the Spanish Inquisition! (M.P.F.C.)

    • Marked as answer by Kivito Wednesday, February 6, 2013 9:24 PM
    Wednesday, February 6, 2013 9:23 PM

All replies

  • I'm also stuck at a somewhat identical position. I First thought it was because of the missing Global.asax - but it still throws the aggregation exception.
    Wednesday, February 6, 2013 8:21 PM
  • hi!

    i believe that error is caused by missing json assembly..

    i just managed to get it working, i've added global.asax (with registering hubs inside), and also used latest prerelease rc2 packages without other stuff from Paul's blog. so just go to server project, uninstall all signalr packages and add latest microsoft.signalr.aspnet package from nuget, and also same thing for microsoft.signalr.client in client package, also it seems that they changed "hubconnection.createproxy(...)" to "hubconnection.createhubproxy(...)".. see if it helps!

    Kivito


    Nobody expects the Spanish Inquisition! (M.P.F.C.)

    • Marked as answer by Kivito Wednesday, February 6, 2013 9:24 PM
    Wednesday, February 6, 2013 9:23 PM
  • I will make another attempt this weekend - so far i couldnt make it to work.

    Just to be sure - SignalR DOES work without the HTML Preview, right? I know - no Servercontext then, but that's no Problem for me. Unfortunately i need Xtrareports in my Application which is incompatible with the HTML Preview.

    Friday, February 15, 2013 7:23 AM
  • hi!

    as im aware, it works only with html preview 2 (i've also tried in regular ls2012 app, but without luck)..

    Kivito


    Nobody expects the Spanish Inquisition! (M.P.F.C.)

    Friday, February 15, 2013 2:40 PM
  • Hi,

    if you don't use LightSwitch's ServerApplicationContext, SignalR works also in a regular LightSwitch application; no need for HTML Preview 2.
    Regards, Robert

    Saturday, February 16, 2013 5:34 PM
  • thanks Robert!

    now i have reason to try again.. 

    Kivito


    Nobody expects the Spanish Inquisition! (M.P.F.C.)

    Sunday, February 17, 2013 8:06 AM
  • thanks guys!

    Paul, it seems that this example is also with html preview 2, Robert said that signalR can work in regular LS2012 app, but i can't get this to work, maybe some stupid mistake..

    when i place breakpoint in global.asax on RouteTable.Routes.MapHubs(), in html preview 2 it stops on it, but in regular ls2012 never reach it.. i guess there the problem lies.. 

    Kivito


    Nobody expects the Spanish Inquisition! (M.P.F.C.)

    Tuesday, February 19, 2013 8:49 PM
  • thanks guys!

    Paul, it seems that this example is also with html preview 2, Robert said that signalR can work in regular LS2012 app, but i can't get this to work, maybe some stupid mistake..

    when i place breakpoint in global.asax on RouteTable.Routes.MapHubs(), in html preview 2 it stops on it, but in regular ls2012 never reach it.. i guess there the problem lies.. 

    Kivito


    Nobody expects the Spanish Inquisition! (M.P.F.C.)

    I spent about 8 hours and never got that to work. Then I realized that LightSwitch doesn't have to actually host the service. I just got the HTML Client to connect to the service hosted in another site (that service can communicate into LightSwitch over OData). I plan a tutorial soon on LightSwitchHelpWebsite.com


    The Visual Studio LightSwitch Marketplace

    http://LightSwitchHelpWebsite.com

    Tuesday, February 19, 2013 9:37 PM
  • tnx Michael, great article!

    Kivito


    Nobody expects the Spanish Inquisition! (M.P.F.C.)

    Wednesday, February 27, 2013 6:13 PM