Tag Archives: CIL Generation

Troubleshooting Error: CIL Generation;The given key was not present in the dictionary

While working, I encountered this error. The error is mentioned in the image below:

CIL Generator Found Errors and Could not save the assembly

And the compilation log had the following error:

The given key was not present in the dictionary

I was able to solve the error by carrying out the outlined steps:
1.Restart AOS Service
2.Generate Full CIL
In case, you do not have enough time for the Full compilation, go the error log and recompile the objects mentioned in the error message.

Troubleshooting Error: Cannot open database requested by the login.

Here is one of the errors I encountered while I was working in Dynamics AX 2012. The complete error message is:

Cannot open database requested by the login. The login failed.Login failed for user ‘NT AUTHORITYNETWORK SERVICE’.

This error normally occurs when the application has been configured with the IIS and IIS does not have proper credentials to access SQL.

Here is a quick solution to solve this error. Open SQL Server Management Studio and go to the Security->Logins and right click on NT AUTHORITYNETWORK SERVICE.Right click on it and select Properties. A new screen will appear. Go to “User Mapping” and select your desired database. In the Database role memberships, tick the “db_owner” checkbox. Click Ok and restart your AX service.