Showing posts with label Debugging. Show all posts
Showing posts with label Debugging. Show all posts

Wednesday, September 19, 2018

Connection Error while launching debugger in NAV

Recently I was working on a project where we have switched the authentication from Windows to NAVUserPassword.

To access different databases and instances we have created different config files and have used them in our shortcut to launch them, everything was working fine but when I try to debug an issue, I was getting the following error, which complains about the DnsIdentity

SNAGHTMLd9b5b4

The key is when  you launch the debugger it uses the config file (ClientUserSettings.config.) located at C:\Users\YourUserName\AppData\Roaming\Microsoft\Microsoft Dynamics NAV\70 and depending on the version you are on it would be 80 or 90 folder. It does not use your custom config files you have created to launch the application.

So, you need to make sure this file is also updated with proper authentication using the ClientServicesCredential which should be NAVUserPassword if you are using UserName/Password. In my case everything was set properly except the DnsIdentity Property value which is blank.

Once I updated the DnsIdentity Value with proper subject name which is the CN name , the debugger started without any issues.

For more information about DnsIdentity and Certificates please check the following link

https://docs.microsoft.com/en-us/dynamics-nav/how-to--configure-authentication-of-microsoft-dynamics-nav-web-client-users

Share:

Friday, September 29, 2017

MAPI is not working properly while sending email in NAV

Recently I have worked on a issue related to E-mail, and would like to share the solution which helped me to resolve the issue.

One user is are getting the following error “MAPI is not working properly. One way to get MAPI working is to install Microsoft Exchange” when they try to send the email. This is version NAV 2009 R2, and in this version one way to send a report by email is using, File –> Send –> Report by Email. as show in Fig 1.

When I have searched the web I have found articles/forums where it was suggested to unregister MAPI OCX Dll File and Register it again, I have performed those steps but still it did not help to resolve the issue.


image

Fig 1.

One thing I did notice on that workstation was even though Outlook 2013 was installed it was never setup/initialized, once I have setup an account on outlook and then try to send the report by Email it opened the Outlook Client with Report body.

So, please make sure there is a default MAPI email client installed and setup when you receive the above error and that resolved the issue in my case.

If you have any other tips or suggestions to resolve this error, please do share them in the comments below.

Share:

Monday, October 5, 2015

Code Coverage in NAV 2016

If you remember in previous versions there is a tool called code coverage which was very useful tool to trace the code / debug the error for the developers, but in NAV 2013 and higher version this was not available but an alternative application profiler was available. If you want to learn more about that please visit my blog about this

http://www.archerpoint.com/blog/Posts/using-application-profiler-run-code-coverage-nav-2013-r2

Good news is Code coverage is back again in NAV 2016.

You can access the code coverage from Departments –>Administration –> Application Tools –> Code Coverage

image

It is easy to start, whenever you want trace the code for a specific action, just click the start button before the action and stop after the action. The code coverage page will list all the objects it got hit and will show the functions/triggers and coverage %. You can even filter the page for specific objects or line type.

I hope this tool will really help the developers/consultants to debug the code easily.

Please leave your comments, feedback or any suggestions you have for me to improve me my blog and also if you have any questions, feel free to post..

Share:

Friday, February 20, 2015

Application Profiler/CODE COVERAGE in Navision 2013 R2

In the previous versions of Navision we use to have code coverage which is used to trace C/AL Code and the developers used to have the ability to scan the piece of code which is executed during an action,process. This tool was very helpful in debugging. Even in Navision 2013 Microsoft shipped Application tool set which includes code coverage tool but in later version we don’t have this option.

In this blog I try to explain the options we have for Navision 2013 R2.  The tool which is available for Navision 2013 R2 is Application profiler and which can be downloaded from the following link

http://navappprofiler.codeplex.com/

The downloaded file has DLLs and few objects in .txt format. It also has readme file which will guide you through the easy install process.  Rename the objects numbers if you already used them.

In order to run the code coverage run the Page 50000/ Performance Profiler

image

In order to trace the C/AL code for an action, please select the session you want to execute the trace for from the Target Session ID and click Start.

After executing the actions click stop. In the below example I executed the post action for the sales order.

The data it collects is combination of SQL Statements and C/AL code as shown in the below figure.

image

In order to view only the C/AL code try to set the filter for the object ID <> 0 and you will see all the C/AL statements it executed for the action. You can view all the code and analyze it from the result set.

I have not tested this on 2015 but I believe it will work on it. When I get sometime I will test it on NAV2015 and post the results.

Please leave your questions and suggestions in the comment section.

Share: