Microsoft_MVP_banner

D365FO: How to debug a non-development and a non-production environment

This post outlines the steps how to debug an issue which is happening in non-development or non-production environments e.g. UAT environment.




1.    RDP to your environment where you want to debug the issue, with this example I am connecting to UAT (Sandbox). 
2.    Connect to SQL server
a.     Get the server name from LCS database accounts
b.    Use .database.windows.net to connect to database


3.    Create a new SQL sign-in that the developer can use. This step lets the system administrator maintain the security of the sandbox environment. The developer will have access to one database for only a limited time. Use the following code to create the new SQL sign-in.
CREATE USER devtempuser WITH PASSWORD = ‘pass@word1’
EXEC sp_addrolemember ‘db_owner’, ‘devtempuser’
4.    Stop following services in development box
a.     IIS or world wide web publishing service development box
b.    Microsoft Dynamics 365 unified Operations: Batch Management service
5.    Go to J:AosServiceWebRootweb.config.
6.    Save a copy of the original web.config file, so that you can switch back later. I copied file in the same directory and renamed the web.config to webDev.config and copied one to web.config
7.    Edit the following section in the web.config file.
Before your changes
<add key=”DataAccess.Database” value=”AxDB” />
<add key=”DataAccess.DbServer” value=”devDbServerName” />
<add key=”DataAccess.SqlPwd” value=”password” />
<add key=”DataAccess.SqlUser” value=”axdbadmin” />
After your changes
<add key=”DataAccess.Database” value=”sandboxdatabaseServerName” />
<add key=”DataAccess.DbServer” value=” sandboxdbName.database.windows.net” />
<add key=”DataAccess.SqlPwd” value=”P@ssw0rd” />
<add key=”DataAccess.SqlUser” value=”devtempuser” />
8.    Start IIS or world wide web publishing service
9.    Do not start batch service otherwise your batch jobs of development box will start writing into UAT environment. Be careful with this step!!!
10.  Now, connect to your development box from browser. Oops!!! It does not connect and throw an error. Don’t worry let’s jump into event log and see what’s in there


Okay; so it is an access issue and here is the resolution for it.
11.  Execute the following command against Master database in UAT database server. IP address you get from the event viewer.
exec sp_set_firewall_rule N’PPDEV01′, ‘13.70.85.22’, ‘13.70.85.22’



Note: Restart IIS and make sure application pool is started

12.  Connect to development URL again from browser and this time it works. You can now access UAT database (all legal entities etc.)
13.  Restart or your start your VS in development box and attach to Process w3wp.exe to troubleshoot the issue(s)
Done with your debugging and got the resolution J
14.  Now it is time to remove devtempuser from UAT database, this prevents having the permanent access to the sandbox database. Right-click on the devtempuser user under Sabndoxdatabase | Security | Users and delete it.

15.  Stop IIS.

16.  Revert changes from the web.config file or simply delete the copied one and rename the original one from WebDev to Web.

17.  Start IIS.

18.  Start batch service 

19.  Connect to development environment URL and make sure it is connected to development database.

Reference: 
https://docs.microsoft.com/en-us/dynamics365/unified-operations/dev-itpro/dev-tools/debugx-issue-against-copy-of-production

Share:

Related Posts

Microsoft Copilot
admin

Exploring Microsoft Copilot Architecture

Microsoft Copilot isn’t just another AI tool; it’s a comprehensive platform designed to be your indispensable companion, enhancing productivity, fostering creativity, and facilitating information comprehension all through a user-friendly chat interface. The concept of Copilot emerged two years ago when Microsoft introduced GitHub Copilot, aiming to assist developers in writing

Read More »
How to enable new Microsoft teams - Public Preview!
Microsoft Teams
Faisal Fareed

How to enable new Microsoft teams – Public Preview!

New Microsoft Teams is just AWESOME, quick but useful post below shows how you have this preview feature to make your life EASY!  Open Microsoft Teams admin center [Ask admin in your organization if you don’t have access] and follow path Teams > Teams update policies > Click on an existing

Read More »

Send Us A Message

Leave a Reply

Your email address will not be published. Required fields are marked *

Recent Post

Exploring Microsoft Copilot Architecture

Exploring Microsoft Copilot Architecture

Microsoft Copilot isn’t just another AI tool; it’s a comprehensive platform designed to be your indispensable companion, enhancing productivity, fostering creativity, and facilitating information comprehension all through a user-friendly chat interface. The concept of Copilot emerged two years ago when Microsoft introduced GitHub Copilot, aiming to assist developers in writing…

How to enable new Microsoft teams – Public Preview!

How to enable new Microsoft teams – Public Preview!

New Microsoft Teams is just AWESOME, quick but useful post below shows how you have this preview feature to make your life EASY!  Open Microsoft Teams admin center [Ask admin in your organization if you don’t have access] and follow path Teams > Teams update policies > Click on an existing…

Electronic Reporting: Send vendor payments to external azure storage via X++

Electronic Reporting: Send vendor payments to external azure storage via X++

Electronic Reporting module in Microsoft Dynamics 365 Finance Operation lets you archive file generated by ER at SharePoint location and in Azure Storage as per this link Archive ER destination type – Finance & Operations | Dynamics 365 | Microsoft Learn. APIs can be used to check message status and read…

FaisalFareed@2025. All rights reserved

Design by T3chDesigns