Find active users in NAV using SQL

Here is a simple query to discover who are the users that are currently connected to your Dynamics NAV instance using SQL Server Management Studio:

USE DatabaseName
GO
SELECT [User ID],[Client Computer Name],[Login Datetime] from [Active Session]

This will return you the user ID, computer name and the login time of the user. You can use * instead if you want to get all the data:

SELECT * from [Active Session]

You can also add a where clause if you are looking for something specific in an instance with large user count, for example:

USE DatabaseName
GO
SELECT [User ID],[Client Computer Name],[Login Datetime] from [Active Session]
WHERE [User ID] LIKE ‘%john%’

Michael

 

Dynamics CRM 2016 Step-By-Step installation guide

Hi everyone!

To be honest – The installation process & requirements of Dynamics CRM 2016 is practically identical to 2015 – But most people that are new to Dynamics don’t know that.

So here is a new video tutorial for Dynamics CRM 2016 installation

“The server reports that it is from digest” – NAV OData Web Services

Recently I tried to configure Dynamics NAV 2015 OData web services. After the initial configuration i was unable to authenticate with the OData URL – The Credentials prompt just kept popping up time after time. The message i received was:

The server is asking for your username and password
The server reports that it is from digest

digest

It seems that the reason for this issue (Although not documented in NAV requirements) is because I was working on a WORKGROUP server that was not a part of an Active Directory domain, and although Dynamics NAV is supported in a WORKGROUP environment – It seems that OData web services need an Active Directory environment – as they rely on Digest authentication.

In my case – adding the server to a domain or promoting it to a DC – solved the issue!

As i said – i did not find any detailed specifications for this in the Dynamics NAV requirements or technet – I relied on other sources regarding Digest authentication and it solved my issue – If you are having the exact same problem – this might be the solution.

Special thanks to Assaf from https://wirefighter.com/ who pointed me in that direction 🙂

Michael

You recieve a message from the web browser: “A script error has occurred” In NAV load balanced environment

I have stumbled upon this issue while configuring a Dynamics NAV 2015 Load Balanced solution combined with Forms Authentication.
In this scenario you will randomly get this error while browsing the NAV Web Client:

scripterror
“A script error has occurred, and the content cannot be displayed. Refresh the page or open a new browser window”

At the same time you will find an ASP.NET warning in the event log on one of the front servers saying:
“An error occurred processing a web or script resource request. The resource identifier failed to decrypt”

evlog

So what’s going on here?

Turns out that in order to work with forms authentication with NLB you need to configure Identical Machine Keys on both IIS servers that host your Dynamics NAV Web Client:

Solution:

1. Go to IIS on your first server and go to Machine Keys:

iismachinekey
2. Remove the check-box from both “Automatically Generate at runtime” options and then click Generate Keys.

iismachinekey2
3. Hit apply and copy both keys to notepad.
4. Go to IIS on your second server and paste the keys generated on the first server to the machine keys respectively.
5. Hit apply and do an IISRESET on both servers

This action should solve the script errors

Michael.

Find out who is connected to AX and from which computer

Here is a very simple query you can run against your Business Database to find out who are the users that have an active sessions in AX:

SELECT DISTINCT USERID, CLIENTCOMPUTER FROM SYSCLIENTSESSIONS WHERE STATUS = 1

This table has some more useful info that you can extract so you can tune the query for your own use.

use SELECT * from SYSCLIENTSESSIONS to see the whole table.

** This works for AX 2009 /2012