D365 FO error: Microsoft.WindowsAzure.Storage.StorageException: Unable to connect to the remote server
Run Job execute error: "Microsoft.WindowsAzure.Storage.StorageException: Unable to connect to the remote server"


Nghia Song - Technical Consultant

Error:

Microsoft.WindowsAzure.Storage.StorageException: Unable to connect to the remote server —> System.Net.WebException: Unable to connect to the remote server —> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it.

Solution:
  1. On OneBox VM, run command prompt as administrator.
  2. Navigate to “C:\Program Files (x86)\Microsoft SDKs\Azure\Storage Emulator\”
  3. Run “AzureStorageEmulator.exe Init”
  4. Run “AzureStorageEmulator.exe start”
Thanks for reading.
Nghia Song 
Split string by word and break line by max length
Split string by word and break line by max length

Nghia Song - Technical Consultant
   public container MergeSplitWordsToLines(container  inputStrings, int maxLength)
    {
        str currentLine = "";
        str separator = " ";
        container breakLines = conNull();
        str strL;
        int i = 1;

        for(i = 1; i <= conLen(inputStrings); i++)
        {
            strL = conPeek(inputStrings, i);
            if (strLen(currentLine) == 0)
            {
                currentLine =  strL;
            }
            else if (strLen(currentLine) + strLen(separator) + strLen(strL) > maxLength)
            {
                breakLines += currentLine;
                currentLine = strL;
            }
            else
            {
                currentLine += separator + strL;
            }
        }

        if (strLen(currentLine))
        {
            return breakLines;
        }
        return breakLines;
    }

    public container SplitStringByWords(str inputString, int maxLength)
    {
        container splitWords = conNull();
        container splitLines = conNull();

        splitWords = str2con(inputString, " ");

        if (conLen(splitWords))
        {
            splitLines = this.MergeSplitWordsToLines(splitWords, maxLength);
        }

        return splitLines;

    }

How to build customize MPOS and release

How to build customize MPOS and release


Song Nghia - Technical Consultant


Step 1. 
Developer command:
1.       Cd "K:\RetailSDK"
2.       K:
3.       msbuild.exe /t:rebuild


Step 2.
Download MPOS Setup after rebuild. 
Download to MPOS machine

Step 3.
Search file pfx : *.pfx
Download file pfx to MPOS machine

Step 4.
MPOS machine will have 2 file

Step 5. 
Double click to pfx file
Select Local Machine
Next

Step 6. 
Next

Step 7.
Next

Step 8.
Click Browse
Select Trusted Root Certificate
OK
Next
Step 9.
Install MPOS
Done