This can be done by going through the web.config xml file which is located at “X:\AOSService\webroot”. Several parameters are configured here for for the application and i’ll go through some below, as a developer or administrator of Dynamics AX it is essential to know what configs are set here, so do give it a read and go through each element.
<add key=”Infrastructure.HostName” value=”usnconeboxax1aos.cloud.onebox.dynamics.com” />
<add key=”Infrastructure.HostUrl” value=”https://usnconeboxax1aos.cloud.onebox.dynamics.com/” />
<add key=”Infrastructure.SoapServicesUrl” value=”https://usnconeboxax1aos.cloud.onebox.dynamics.com/” />
<add key=”Infrastructure.InstanceEndpointIPAddress” value=”localhost” />
<add key=”Infrastructure.MaxInstanceEndpoint” value=”10010″ />
<add key=”Infrastructure.MinInstanceEndpoint” value=”10000″ />
<add key=”Infrastructure.PersistentVirtualMachineIPAddress” value=”localhost” />
Package directory folder settings:
<add key=”Aos.AppRoot” value=”C:\AOSService\webroot” />
<add key=”Aos.PackageDirectory” value=”C:\AOSService\PackagesLocalDirectory” />
Database info in the file:
<add key=”DataAccess.Database” value=”AxDB” />
<add key=”DataAccess.DbServer” value=”localhost” />
<add key=”DataAccess.SqlPwd” value=”XXX” />
<add key=”DataAccess.SqlUser” value=”axdbadmin” />
When creating a data entity for a data effective table there are a few properties we need to consider for our imports and exports to work correctly. There can be two scenarios.
1. Data entity is not date effective but one or more data sources within the entity are date effective.
For example we have to export details of a Party record. Now the Party record is saved under DirPartyTable that is not date effective but its First, Middle and Last names are stored in DirPersonName table that is date effective. In order to make sure that we get the latest names of this party while exporting data we need to configure the entity to do so, else it will send whatever record is first in DirPersonName against the party record. To configure it we simply need to set the Apply Date Filter Property to Yes for DirPersonName and make sure we add the ValidTo and ValidFrom fields of DirPersonName datasource to the entity field list.
Parent data source DirPartyTable, not DateEffective:
Child data source DirPersonName, that is date effective:
2. Data entity is date effective
What this means is that our data entity has at least one date effective data source and itself implements the date effective framework. Keeps track of latest and old records rather than overriding existing records on update. Will discuss this further in my next blog.
For more information about date effectivity in data entities see: Date effectivity
Mystery: IIS was stopped but D365 app was still running. How could this be? Its a single box Azure VM and everything, not just the AOSService but ISS itself is off. I verified the app is connecting to the right database and verified the webconfig file points to my own server so some other machine could not be hosting the App, I checked all configurations and none point to a different server so what magic is going on here.
I’m sure this would not be a mystery for everyone but for a short time it became a mystery to me and might become to some others as well so I had to get to the bottom of the magic happening. After some research I got to know that after the recent platform update 12 D365 is hosted on IIS Express, and as you know IIS express runs on visual studio, so if you have Visual studio open your app will be hosted. I ran a few scenarios after this so here is a list of them.
- If Visual Studio is open, your IIS is stopped, D365 would still run on based on IIS Express.
- If Visual Studio is closed, your IIS is stopped, D365 url will give you a Service Unavailable error
- If Visual Studio is closed, IIS is running, D365 will run based of your AOSService site.
- If Visual Studio is Open, IIS is running, D365 will run.
Thanks to a post by Faisal here which lead me to this. It explains what else was done wrt to update 12 like elimination of Admin user on lcs and availability of a Developer user.
If you are unbale to find the w3wp.exe process that we attach our VS debugger to inorder to step through X++ on D365. Chances are the windows logging service is not running. The service name to check is W3C Logging Service start this service by going to services.msc and reopen/refresh the process list.
P.s Also make sure your World Wide Web Publishing service is running. Without which your D365 client wont be hosted as well.
For more details on how to debug D365 have a look at the MS blog: Quick and easy debugging in AX 7
To debug without setting up a startup project and startup object in D365 fotr operations. Follow these steps:
- Open your object in visual studio
- Place breakpoints
- Goto Debug>attach to process and check show processes from all users
- Select w3wp.exe and click attach.
You can execute your process now from the client and execution will be stopped at your breakpoints.
Recently faced a problem where my breakpoints weren’t loading for objects in the AOT that were not in my solution and therefore I could not debug.
Solution: In order to load symbols for objects that have not been included in your solution you have to uncheck the following check box.
Load symbols only for items in the solution
To know more about how to debug in D365 visit: Debug X++