How to run Cloud POS from Retail SDK
Here I will explain how you can compile and run Cloud POS by leveraging its sources provides in Retail SDK on the LCS VM, this post assumes you are using the latest available (at the date of the post creation) drop - AX7 Update1.
Start Visual Studio (do that by using Administrator's privileges) and open the solution J:\RetailSDK\POS\CloudPos.sln then set the project Pos.Web as StartUp one and press F5, you will see that POS app starts under http://localhost:34546/cloudpos/ , click Next button and you will be redirected to the AAD UI which will ask for the credentials, type your credentials there and as a result AAD will display an error:
Note the error details at the bottom of the page - it says that the reply address was not expected, this happens because Cloud POS AAD Application allows only those https Urls which end with dynamics.com and our locahost url is obviously not meeting that expectation. The AAD Application was registered in Microsoft's tenant and therefore you physically cannot add your own Reply Url there as would be possible if the application would belong to your own tenant.
To satisfy the Reply Url check you can create a new Web Site on your VM to host dev version of Cloud POS:
1. Go to IIS, create a new Web Site and provide the following values for "Add Website" dialog:
Site name - type any name you want, for instance, RetailCloudPosFromSdk
Physical path - J:\RetailSDK\POS\Web
Binding->Type - https
Host Name - RetailPosFromSdk.cloudax.dynamics.com
SSL Certificate - *.cloud.dynamics.com
Leave default values in all other input fields.
2. Open c:\Windows\system32\drivers\etc\hosts (use elevated command prompt) and add one line there:
127.0.0.1 RetailPosFromSdk.cloudax.dynamics.com
and then save the file.
Now open your browser inside the VM and navigate to https://RetailPosFromSdk.cloudax.dynamics.com - you should see the page saying "Activate Cloud POS" - if you do the web site and the mapping were successfully setup. Now you should be able to successfully pass AAD interoperation but keep reading - there are more steps to do.
Next step is to wire this web site with the project (this will enable us to have standard Visual Studio experience when pressing F5 - the application will run):
1. right click (in Visual Studio) Pos.Web project and select Unload
2. find the element IISUrl and replace its value with https://RetailPosFromSdk.cloudax.dynamics.com
3. set the value false for the element UseIISExpress
4. Save the project file, then right click it and choose Reload Project, answer Yes to close already opened project file.
5. Make sure Pos.Web project is set as Startup Project.
Now press F5 and you should have normal Visual Studio experience you would expect - Cloud POS will start in the browser with the debugger attached.
Provide your credentials to AAD then specify Url for the Retail Server (don't forget Commerce at the end, for instance: https://<YourEnvironmentPrefixIsHere>ret.cloudax.dynamics.com/Commerce
click next, as a result you will for some time see a screen saying Retrieving stores for this Url which will be followed by the error:
If you look into Retail Server's log you will see a corresponding error "The requested resource does not support http method 'OPTIONS". To fix it open Retail Server's web.config, locate there a key AllowedOrigins and add there the url corresponding to your dev version of Cloud POS - https://RetailPosFromSdk.cloudax.dynamics.com if you are following the above example. Then save the file and click Retry in Cloud POS. Now you should be able to select the Store, Register and Device - basically the same experience when you use Prod version of your Cloud POS.
Comments
-
-
-
-
"To fix it open Retail Server's web.config, locate there a key AllowedOrigins and add there the url corresponding to your dev version of Cloud POS" means "https://RetailPosFromSdk.cloudax.dynamics.com"; if you follow suggested naming
-
Are you using AX7 Update 1 or not? If not - it could probably explain why you see different cert. In fact you just need to select here the same cert which is assigned to a Cloud POS pre-deployed on your LCS VM.
-
SSL Certificate - *.cloud.dynamics.com
In my environment, there is no such option,but there is one :SSL Certificate - *.cloud.onbox.dynamics.com
just want to make sure if there any mistake?

Like
Report
*This post is locked for comments