How can I use the service fabric actor model from MVC project? -
i used stateful actor template in visual studio 2015 create service fabric service. in same solution created mvc app , in controller attempted copy code sample client. when run web app , execute action hangs. don't exception or indicates why didn't work. running sample client console app got code works fine. suggestions on may wrong?
public actionresult about() { var proxy = actorproxy.create<io365servicehealth>(actorid.newid(), "fabric:/o365services"); try { int count = 10; console.writeline("setting count in actor {0}: {1}", proxy.getactorid(), count); proxy.setcountasync(count).wait(); /* hangs here */ console.writeline("count actor {0}: {1}", proxy.getactorid(), proxy.getcountasync().result); } catch (exception ex) { console.writeline("{0}", ex.message); } viewbag.message = "your application description page."; return view(); }
is mvc app hosted within service fabric? if not won't able access service fabric information unless it's exposed in way (e.g. through owincommunicationlistener on service).
Comments
Post a Comment