Deployment Server For C Code From Local To Dev
Posted By admin On 12.12.20Mar 03, 2020 While running under the local development server, the users.createloginurl and users.createlogouturl functions return URLs for /ah/login and /ah/logout on the local server. The local development server can send email for calls to the App Engine mail service using either an SMTP server or a local installation of Sendmail. I've developed a pretty simple web app using entity framework code first. I realized after hours of frustration that even though localdb is SQL Server Express it is actually not meant to be used with production when using 'publish' (the publish wizard).
-->Important
Dynamics 365 for Finance and Operations has evolved into purpose-built applications to help you manage specific business functions. For more information about these changes, see Dynamics 365 Licensing Guide.
This topic describes how to access development instances, configure on-premises development virtual machines (VMs), and find important configurations settings for developers and administrators.
Definitions
Term | Definition |
---|---|
End user | A user who accesses an instance through the web client. The end user must have Microsoft Azure Active Directory (Azure AD) credentials to access an instance and must be provisioned/added as a user of that instance. |
Developer | A user who will develop code through the Microsoft Visual Studio environment. A developer requires Remote Desktop access to development environment (VM). The developer account must be an administrator on the VM. |
Deploying cloud development environments
The process of deploying cloud hosted environments differs for Lifecycle Services (LCS) trial or partner projects and LCS customer implementation projects.
For a Trial or Partner project:
Create a connection between an LCS project and your Azure subscription. You will need your Azure subscription ID and authorize the use of the subscription.
Select + under Environments to deploy.
Select an application and platform version.
Select an environment topology. You can choose to either use a cloud hosted environment or download a VHD. For more information, see Sign up for preview subscriptions.
If you chose a cloud-hosted environment, select which Azure connector you want to use. Then select Deploy.
If you did not choose a cloud-hosted environment, select a VHD to download.
For a Customer Implementation project:
Sign in to your LCS Implementation project.
Select Configure to deploy.
Select an application and platform version.
Specify the settings and select Save.
Customers are provided with one free 'develop and test' environment hosted in Microsoft's Azure subscription. Under 'Develop and test', there are two types of environments, Develop and Build and Test. For development and customization activities, configure a Develop environment. Build and Test environments are not supported for standard development activities. Instead, they are used for daily build and test automation. For more information, see Deploy and use an environment that supports continuous build and test automation.
Additional develop and build environments can either be purchased or hosted in your own Azure subscription. To deploy an environment in your own subscription, go to the Cloud-hosted environment page.
Cloud environment that is provisioned through LCS
When a cloud environment is provisioned through LCS:
- The user who requests the cloud environment is provisioned as the administrator in that environment.
- User accounts are provisioned on the development VM to allow access to the environment using Remote Desktop, these credentials are accessible on the environment page in LCS.
Accessing an instance through a URL
The system can be accessed by end users. The administrator can add users to this system by using the Users page in the instance. Note that these additional users don't have to be users in LCS. You obtain the base URL for the cloud environment from your LCS project site.
- Go to your LCS project page.
- In the Environments section, click the deployed environment.
- When the environment page opens, you can access the application by clicking Login > Log on to Finance and Operations in the upper-right corner.
- Use valid end user credentials to sign in to the application. If the current LCS user is the user who originally deployed the environment, that user is probably a valid end user and the administrator of the application.
- In your browser, make a note of the base URL after you sign in. For example, the base URL might be
https://dynamicsAx7aosContoso.cloud.dynamics.com
.
Accessing the cloud instance through Remote Desktop
Cook serve delicious free download android. Cloud environments can be accessed both as an end user and as a developer. The developer gets access to the system through Remote Desktop credentials. The Remote Desktop credentials are obtained from the environment page on the LCS project site (see the illustration earlier in this topic).
For environments deployed before Platform update 12:
- Click the VM name.
- Use the local administrator user name and password that are shown to connect to the cloud VM through Remote Desktop. You can reveal the password by selecting the show password icon.
For any environments deployed on or after Platform update 12 , there are distinct accounts, a developer account and an admin account. Customers will not have access to virtual machine admin accounts on development or build environments that are running in Microsoft subscriptions. Thus, the admin account will be hidden unless the environment is running in their Azure subscription. For more information, see Development and build VMs that don't allow admin access FAQ.
After you sign in to the environment through Remote Desktop, if you want to access the local application from the browser, use the same base URL that you use to access the application from a remote computer. The previous section explains how to obtain this base URL from LCS.
VM that is running on-premises
A virtual hard disk (VHD) is made available for download from LCS, so that you can set it up on a local machine. This system is intended to be accessed by a developer and is a pre-configured one-box development environment of Finance and Operations apps. The VHD is available in the Shared Asset library of LCS under the asset type Downloadable VHD.
- Go to the LCS main page and select Shared asset library or go to Shared Asset Library.
- Select the asset type Downloadable VHD.
- Find the VHD you are looking for based on the desired Finance and Operation version. The VHD is divided into multiple file parts that you need to download. For example, the asset files that start with 'VHD - 10.0.5' are the different files you need in order to install version 10.0.5.
- Download all files (parts) associated with the desired VHD to a local folder.
- After the download is complete, run the executable file that you downloaded, accept the software license agreement, and choose a file path to extract the VHD to.
- This creates a local VHD file that you can use to run a local virtual machine.
Commerce configuration
Follow the steps in this section if you are also configuring for Commerce.
Deployment Server For C Code From Local To Devil
To use the downloadable VHD for POS customizations, you must also follow this step.
- On the host computer, enable Nested VM support. For more information, see Run Hyper-V in a Virtual Machine with Nested Virtualization.
Running the virtual machine locally
Follow these steps to run the VM from Hyper-V Manager.
To start the VM, select Start.
To open the VM in a window, select Connect.
Select the Ctrl+Alt+Delete button on the toolbar. The VM receives most keyboard commands, but Ctrl+Alt+Delete isn't one of them. Therefore, you must use the button or a menu command.
Sign in to the VM by using the following credentials:
- User name: Administrator
- Password: pass@word1
Tip
You can resize the VM window by changing the screen resolution. Right-click the desktop on the VM, and then click Screen resolution. Select a resolution that works well for your display.
Provision the administrator user. For more information, see the next section.
Start the Batch Manager Service. This step is required if you're running batch jobs or workflows.
- Open a Command Prompt window as an administrator.
- Type net start DynamicsAxBatch, and then press Enter.
You can also start the service from the Services window.
Apply updates as needed.
Commerce configuration
Deployment Server For C Code From Local To Devices
For POS customizations, you must also follow these steps on the guest VM.
- Download and install Microsoft Emulator for Windows 10 Mobile Anniversary Update.
- Start the Hyper-V host service. For more information, see Hyper-V: The Hyper-V Virtual Machine Management service must be running. If errors occur during startup, you can also try to uninstall and reinstall the Hyper-V role on the guest VM.
Provisioning the administrator user
For developer access, you must be an administrator on the instance. To provision your own credentials as an administrator, run the admin user provisioning tool that is provided on the desktop, and provide your email address (Azure AD credentials) in the tool.
- From the desktop, run the admin user provisioning tool as an administrator (right-click the icon, and then click Run as administrator).
- Enter your email address, and then select Submit.
Commerce configuration
Follow the steps in this section if you are also configuring for Commerce.
For Dynamics 365 for Operations, Version 1611
Run the RetailTenantUpdateTool.
- The icon for this tool is available on the desktop.
- This tool is also available at the following location: C:windowsSystem32WindowsPowerShellv1.0PowerShell.exe -File C:RetailSDKToolsRetailTenantUpdateTool.ps1
Double-click the icon to start this tool. You will be prompted for your Azure AD credentials. You must use the same credentials that you used in the admin user provisioning tool earlier.
For Dynamics 365 for Operations 7.0
Install Microsoft Online Services Sign-In Assistant for IT Professionals RTW.
Install Azure Active Directory Module for Windows PowerShell (64-bit version).
Query Azure AD for your tenant and user ID. Open a Windows PowerShell Integrated Scripting Environment (ISE) window with administrative privileges, and run the following command. You will be prompted for Azure AD credentials. Use the same user account that you used in the admin user provisioning tool earlier.
Update the following SQL script, and run it in on AXDB for that environment. Supply values for the following parameters from the preceding Windows PowerShell script output:
- TenantID – For example, c83429a6-782b-4275-85cf-60ebe81250ee
- UserId – For example, a036b5d8-bc8c-4abe-8eec-17516ea913ec
Reset Internet Information Services (IIS) by running IISRESET in an elevated Command Prompt window.
Update the Real-time service profile to use the new admin user.
- Go to Retail and Commerce > Headquarters setup > Commerce scheduler > Real-time service profiles.
- Edit the JBB record so that it uses the user that you used earlier (for example,
administrator@contosoax7.onmicrosoft.com
). - Run CDX Job 1070 (Staff) for the default channel database.
- Verify that the job succeeded by viewing the Download Sessions page on the client.
Base URL of the local application
After the user is provisioned as an administrator, that user can access the instance on the computer by navigating to the following base URL: https://usnconeboxax1aos.cloud.onebox.dynamics.com
. If you're using version control and plan to connect multiple development VMs to the same Azure DevOps project, rename your local VM. For instructions, see Rename a local development (VHD) environment.
Commerce configuration
The URL of the POS app is https://usnconeboxax1pos.cloud.onebox.dynamics.com/
.
The URL of the Cloud POS app is https://usnconeboxax1pos.cloud.onebox.dynamics.com
. After you complete the configuration steps, this VM is provisioned with your Azure AD tenant. Your Azure AD admin account is mapped to a cashier worker account in demo data. You can use this cashier account to easily activate a POS device in this environment.
- Cashier user ID: 000160
- Cashier password: 123
- Cashier LE: USRT
- Cashier store: Houston
Location of packages, source code, and other AOS configurations
On a VM, you can find most of the application configuration by opening the web.config file of AOSWebApplication.
- Start IIS.
- Go to Sites > AOSWebApplication.
- Right-click, and then click Explore to open File Explorer.
- Open the web.config file in Notepad or another text editor. The following keys are of interest to many developers and administrators:
- Aos.MetadataDirectory – This key points to the location of the packages folder that contains platform and application binaries, and also source code. (Source code is available only in development environments.) Typical values are: c:packages, c:AosServicePackagesLocalDirectory, and J:AosServicePackagesLocalDirectory.
- DataAccess.Database – This key holds the name of the database.
- Aos.AppRoot – This key points to the root folder of the Application Object Server (AOS) web application.
Commerce configuration
The software development kit (SDK) is available at C:RetailSDK. For more information about how to use and customize applications, see the following topics:
Redeploying or restarting the runtime on the VM
To restart the local runtime and redeploy all the packages, follow these steps.
- Open File Explorer, and go to C:CustomerServiceUnit.
- Right-click AOSDeploy.cmd, and then click Run as administrator.
This process might take a while. The process is completed when the cmd.exe window closes. If you just want to restart AOS (without redeploying the runtime), run iisreset from an administrator Command Prompt window, or restart AOSWebApplication from IIS.