Sunday, May 1, 2011

AX Service start error, SQL diagnostic error.

When a new database is installed for an existing application instance, sometimes new does not have get configured properly and following error is shown, when AOS is started, in the event viewer .

Error ---
SQL diagnostics: [Microsoft][SQL Native Client][SQL Server]Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.. Connect information was: Userid = [], Database = [CN_Dev1], Server = [MDT753], DSN = [], Other = []
Object Server 01: Server main session is being destroyed.
Object Server 01: Fatal SQL condition during login. Error message: "[Microsoft][SQL Native Client][SQL Server]Login failed for user 'NT AUTHORITY\NETWORK SERVICE'."
Login failed for user 'NT AUTHORITY\NETWORK SERVICE'. Reason: Failed to open the explicitly specified database. [CLIENT: <local machine>]

Resolution /Cause --
If it is a new database then check the user in security node, there must be some user that is missing from the list.Usually the users that syatem should add are network service & the machine-name$. If the users are not there, add these users in security node and in schema list.
While adding user in the user list, In new user window -> Securables page add two Stored procedures "CREATESERVERSESSIONS" & "CREATEUSERSESSIONS"  that is responsible for Server session and User Session. These can be found using search option and adding the two. Also provide execute permission on them. If this step is not taken then the AOS will not start.

Windows could not start AX service, AOS crashed, AOCP revision mismatch

All of us would have faced AX service start/crash issue for one or the other reason. A couple of them has been listed below --

Error -- at services.msc
windows could not start the DAX AOS 5.0$01-xyz_ax on local computer.For more information,review the system event log. If this is a non-microsoft service, contact the service vemdor, and refer to service-specific error code 110.
Log at Event viewer --
Concurrent number of AOS' for this application exceeds the licensed number
Resolution/cause -- Get another license for AOS.
-- This issue comes in a scenario where multiple AOS has to connect to a single instance of DB and Application server (clusterred environment).

Error--at services.msc
windows could not start the DAX AOS 5.0$01-xyz_ax on local computer.For more information,review the system event log. If this is a non-microsoft service, contact the service vemdor, and refer to service-specific error code 10.
log at eventvwr --
The home directory for Axapta (file://sqldb/AOSFS/Program Files\Microsoft Dynamics AX\50\Application) does not match the required structure or can not be accessed. Please check installation, configuration and access rights.The directory "file://sqldb/AOSFS/Program Files\Microsoft Dynamics AX\50\Application\bin" does not exist or access to it has been denied by the operating system.

Resolution/cause -- The directory structure should be like --
file://sqldb/Program Files\Microsoft Dynamics AX\50\Application ".
------- The mistake I commited was that there was an additional folder structure layer above "Program Files" .

Error -- Internal aocp revision mismatch
At event viewer --
Faulting application Ax32Serv.exe, version 5.0.1500.3761, time stamp 0x4cd58bba, faulting module Ax32Serv.exe, version 5.0.1500.3761, time stamp 0x4cd58bba, exception code 0xc0000005, fault offset 0x00147b3a, process id 0x%9, application start time 0x%10.
Resolution/cause -- This error is raised due to the mismatch between client the AX server. It happens since the client machine is not patched properly. Ideally the client machine should also get patched with the same pack as AX Server.

Error -- Cannot restart AOS, Logon failure , error code 1069
Resolution/Cause -- Goto --> services.msc --> AXService --> Properties --> Logon tab --> Re-enter the user name and password.
Since the user with which the AX Service is running has property "password never expires" not checked and  the pwd has been reset, system throws this error. System verifies the user with AD at the time of restarting the service and finds user/pwd combinantion incorrect.

Error -- AOS crash
Cause/Resolution -- Due to change in code system was getting stuck in a deadlock and it was first hanged and then getting crashed.
Sol :: check the code, if there is any code ambiguity, any infinite loop, memory leak, reference mismatch while passing parameter by reference. In such cases system does not throw any specific/detail error so it is difficult to find the issue sometimes.

Friday, April 22, 2011

IIS in running 32-bit emulation mode, please fix this error to continue

On x64 machines sometimes there could be situation where IIS is 32 bit enabled. I got error while I tried to
configure sharepoint on a server 2008 x64 machine. The error message is :
'IIS in running 32-bit emulation mode, please fix this error to continue'

Just execute the following command to reset the IIS to its default configuration of x64 --

CScript "%SystemDrive%\InetPub\AdminScripts\adsutil.vbs" set w3svc/AppPools/Enable32bitAppOnWin64 0

Then restart the sharepoint installation !!!

User "x" is not authorized to delete a record in the table 'DEL_PBATRANSLATECONSISTOF' .

When a user tries to DELETE one of the  companies, he gets a meesage : User "x" is not authorized to delete a record in the table 'DEL_PBATRANSLATECONSISTOF' .
resolution :: have to set  the AOSAuthorization property to NONE at table level.

Saturday, March 19, 2011

Invalid sort field in hour forecast form of ax 2009

Hi All,

In an implementation where I am working with india localization I found there are a lot of bugs in standard AX and some have moved as it is in AX 2012 as well. The bug that I am talking about can be regenerated as
Project details form -> Forecast button -> Hour ->  Hour forcast form -> Overview tab -> Activity number column. When one tries to click and go to main table form it generates an error "Invalid sort field".
I gave a workaround to my client for this option and opened the main form(Activity form) with filtered  data based on selected activity number. In order to achieve this just override "jumpref" method at the datasource field level comment call to super. Instead add following code and the job is done.

public void jumpRef()
{
    //super();
    FormRun formRun;
    Args args = new Args();
    ;
    args.name(formstr(smmActivities));
    args.record(smmActivities::find(projForecastEmpl.ActivityNumber));
    formRun = ClassFactory.formRunClass(args);
    formRun.init();
    formRun.run();
    formRun.wait();
}

Logic can be changed as per user need and the respective form can be opened.

Enjoy !!!!!!!!!!!!!!!!

Tuesday, February 1, 2011

AX 2009 enterprise portal -- Sys.ArgumentNullException error

While testing one of the controls in enterprise portal one of my team-mate got this error. In this scenario he got it after clicking on the ax date control to choose a date. This error was coming most of the time except for the first when the page was opening. The error is associated with date control. The detailed error is as follows:



User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; SLCC1; .NET CLR 2.0.50727; .NET CLR 3.5.21022; .NET CLR 3.5.30729; .NET CLR 3.0.30729; MS-RTC LM 8; InfoPath.2)

Timestamp: Mon, 31 Jan 2011 10:11:33 UTC

Message: Sys.ArgumentNullException: Value cannot be null.
Parameter name: panelsDeleting[7]
Line: 4723
Char: 21
Code: 0
URI: http://AXDev/ScriptResource.axd?d=BbXpLQ1o3AIdHtS9ypBQfYDbdhpQLYX3HwkftdXT3c85Pz79UWU7kN5H85iLIwwP4D2wY1XbQFNNAZH_mWXc22MaLkqOGf2gE11PwTELiSg1&t=4ca27158

Usually in order to debug code in enterprise portal we change  the property debug = true from the standard false in Web.config file. The complete standard value is  <compilation batch = "false" debug="false"> .

This is the solution, making debug= false and then a IISRESET comand will resolve the issue.

Unable to logon to microsoft dynamics AX

I got this error while trying to login to the dev. environment from the local client by changing the client configuration. On the other hand I was able to logon using remote client. This comes because some user information gets stored in the machine and it hinders the process to connect to the specified environment from the client. This user information is saved at following location - Start --> Control Panel --> User Account --> Manage Network Password --> from here remove the password.

Now move out and logon to any environment !!! :)

Reference

Tuesday, January 4, 2011

Excel merged cell problem with SSRS 2005 .

               Wishing everybody a very happy and enjoyable New Year 2011.

Recently I have got a chance to work on sql server 2005 based reports. My client has 12 countries roll-out of AX 4.0 and use SSRS 2005 for reporting. These reports are purely based on SSRS fundamentals and not the way AX 4.0 SSRS reports are build ie: report  pulls data directly from SQL server.

Now what I wanted to share is an issue that I came across. In SSRS 2005 if you export the report in excel and open. Then you may find that multiple cells overlap. This becomes a problem for end users when they try sorting. Ideally excel should render the data like one column of excel for each column in the report.
I started to resolve this issue in the most ideal way, googling. I have got two links which will help others as well. The following blog post will help understand the actual problem and why it happens. The MSDN article explains about excel rendering.


Current Scenario –


Report has page header and Body section. Check out the image

From the image it is visible that one of the columns in the body section is getting overlapped and two cells are merged. In this situation sorting on columns won’t work. I followed all the sugestions in the blog(links) except using the measurement unit as point.
1.       First I put all the objects table, taxt-boxes in a rectangle object both in header and body.
2.       I corrected the left and right margin.
3.       Since “line” was used I gave it the same length as the width of the report.
4.       Initially the report width was kept as 9.3 inches. In order to make the conversion correct(avoid loss of precision) I made it as 10 inches.Trick is round off the margin(report width).
That’s it and my report renderd perfectly. Hope it helps ….:)