1

can I use Local Turnkey Prototyper to test exposing REST-Services? Or locally installed Turnkey with MDrivenServer? I have tried it but with no success

Efim

emett
  • 31
  • 2

2 Answers2

0

Yes - you set AllowRest = true on the ViewModel. Then try a get: http:localhost:yourport/TurnkeyRest/Get?command=vmname&id=rootobjref

This is described here : https://wiki.mdriven.net/index.php/Rest_Services_In_MDriven

Hans Karlsen
  • 2,275
  • 1
  • 15
  • 15
  • I can't figure out it... I send http://http://localhost:8182/Get?command=AllPersonsView&id=1!1. I get "404 To get control on what shows add a RedirectView viewModel" -not found. RestAllowed is set on AllPersonsView. – emett Feb 18 '22 at 12:07
  • You omitted the /TurnkeyRest/ from the url TurnkeyRest stears logic to turnkeys rest-controller. Try http://localhost:8182/TurnkeyRest/Get?command=AllPersonsView&id=1!1 – Hans Karlsen Feb 19 '22 at 09:35
0

Ah, I thought TurnkeyRest stands for the name of the Turnkey App in IIS.

But if I set url as you mean localhost:8182/TurnkeyRest/Get?command=AutoFormPerson&id=1!1 I get "this site is not available".

For Turnkey using MDrivenServer I set url as https://desktop-6ddsnaa/MDrivenTurnkeyApp/TurnkeyRest/Get?command=AutoFormPerson&id=1!1 and I get "During startup of Turnkey we initiate communication with your MDrivenServer - this failed. Check __MDrivenServer, if it is up - is the a-account possible to login with or locked out? Try SendSettingsAndRestart - it will reset the a-account if locked.".

But I can call "https://desktop-6ddsnaa/MDrivenTurnkeyApp/__MDrivenServer/" and log in user "a" with PW "123456"

emett
  • 31
  • 2
  • Suddenly it works - do not know why - for local Turnkey and local MDriven Server: http://localhost:8182/TurnkeyRest/Get?command=AutoFormPerson&id=1!2 and http://localhost:5001/TurnkeyRest/Get?command=AutoFormPerson&id=1!7. But it does not work for MDriven Server installed on premise: https://desktop-6ddsnaa/MDrivenTurnkeyApp/TurnkeyRest/Get?command=AutoFormPerson&id=1!1 – emett Feb 21 '22 at 09:53
  • When you get "...Check __MDrivenServer..." you should verify that you Turnkey-app is connecting correcly to you MDrivenServer. Check the App_Data/TurnkeySettings.xml does it have MDrivenServerUser and MDrivenServerPWD? – Hans Karlsen Feb 21 '22 at 11:12