Google alerts

Last week I found a new cool application/service from Google. It’s called “Google Alerts” and it will simple let you save a normal search query for Google search and on a daily or weekly basis you will get an email containing any changes in the search result.  The first alert I did put up was a simple search on the keyword “NAV” to get any news around Dynamics NAV sent directly to my inbox. I also found that this is a really good way to find new blogs and other people/companies interested in the same thing as you and of course general news about the product. Give it a try at http://www.google.com/alerts and newer miss any news in your area of interest.

Installing NAV 2009 R2 without Active Directory

Normally you need to have an Active directory server running to use multi-tier of NAV 2009 R2. But in some cases this is not possible or existing. In NAV 2009 R2 we got an new configuration option called ClientCredentialType that is meant to be used over WAN. But I will in this blog post show one simple way to get this up and running for development and test purpose, in a LAN environment Read more

Every time when adding/deleting a user the NAV service shuts down

Recently I run into a problem where NAV service did shut down every time I did add or delete a user.

The event log explain the problem like bellow. So it obvious that we of some reason can’t connect to the database.
Type: System.Data.SqlClient.SqlException
Class: 14
LineNumber: 1
Number: 916
State: 1
Source: .Net SqlClient Data Provider
ErrorCode: -2146232060
Message: The server principal “XX\YY” is not able to access the database “ZZ” under the current security context.

When looking at the security for database “ZZ” I found the same problem as the event log was pointing at, no trace of user “XX\YY” with gives the NAV service access to the database. It turns out that when adding or deleting a NAV user all user privileges is re-synced, and any user not part of the new list is deleted. And if the NAV service account is not part of the user list, NAV service can’t longer connect to database.

The solution is very simple. You have to make sure that the service account is added as a user in NAV under Tools – Security – Windows Logins. Followed by syncing logins.

Silent or unattended installation on NAV

What is silent or unattended installation
Simply said silent install is installation without any UI. In this case it’s about how to run “setup.exe” in silent mode. It’s recommended that you only run “setup.exe” when you install a new NAV installation, because the installer have been tested by them using this procedure only. So by that said it’s no longer supported to install from the different msi files directly. This is true for all NAV 2009 releases. The major problem you may run into if you are installing directly from the msi files is that you will not get prerequisites (as .Net, Report Viewer and so on) installed and you will also miss out one some pre installs checks (validating that you have everything needed as outlook).

How to-do it?
It’s very simple. “setup.exe” does support some different parameters for this purpose:
/quiet <– will turn of the UI
/log [filename] <– create a log text file in the specified location
/config [filename]<– point to the configuration file to use during the installation
/uninstall <– will simple un install the product
/repair <– repairs a bad installation

Read more

Change listener connetion error

“The Microsoft Dynamics NAV Server cannot connect the Change Listener to SQL Server because of the following error: user ‘NT AUTHORITY\NETWORK SERVICE’ failed when log in”.

This error may happen when you are attaching the database manually, or if database and NAV service is on two different machines. A variation of this may also happen if you setup NAV server to user domain user account. Luckily the solution is the same for all problems

Enabling the Object Change Listener Read more

How do you define a good installer?

Did read Christopher Painter blog “Back To Basics – Installation Principles” today. It contain some very basic rules of creating an installer. In his blog he lists 14 point of what to avoid and what you installer should do to be a good installer? I have personally seen big problem rise from his advice number 12 about using standard installation part and avoid using you home maid as much as possible. So to make it short, I think every installer developer should really look into this list to avoid doing the same mistakes.

And here is the list copied from Christopher.
1) Remember that your install is the very first impression the user gets of your application. If your install sucks or worse fails that will not want to use your software or your support desk will get flooded with calls. I can not understate this point. I have saved companies from the brink of bankruptcy by fixing their deployment problems and I’ve seen companies fail that were unwilling to take their problems seriously.

Read more

The pain of .NET “AnyCPU” build typ for installers

Today I found an interesting post about why we should avoid using “AnyCPU” as build type when we are building managed assemblies. The problem simple is that when installing the application and are writing registrie key we need to define if it’s a 32 bit or 64 bit application in the MSI. You can build an EXE as “AnyCPU” and on an x86 windows machine it will run on the 32bit CLR and on an x64 windows machine it will run as a 64bit process.

Christopher Painter gives this example on his blog post to explain the problem:
So let’s start with a simple example. Let’s go back 10 years in time and pretend we are writing an x86 application and x86 installer with no concern for x64. Someone hands you a vb6 EXE and a regfile ( HKLM\SOFTWARE\Company\Product type entries ) and says this is what needs to be deployed. You go off and create an MSI that writes the registry values, deploys the EXE and creates a shortcut. Now let’s come back to present. You take that MSI and throw it on a modern Windows 7 x64 box and it works just fine.

But now let’s pretend that the EXE was a .NET application. If it was compiled as x86 it would behave the same way. But if that application was built at AnyCPU ( the default for all versions of Visual Studio prior to VS2010 ) we are going to land in one of those traps. Here’s why:

MSI is marked as an x86 package so it writes the registry data to the Wow6432Node of the registry so the expected x86 application can find it. While the EXE gets installed to ProgramFiles(x86) it will actually JIT as a 64 bit process. This process will fail to find it’s registry resource at runtime and crash. This is because the .NET BCL Win32.Registry class cares about bitness.

You can find his complete post here

The “OK” button is greyed out on RTC server selection window

Did decide to write this blog since this simple problem did take a lot of time for me to find the solution for, in the hope that it will save you from the same time eater.

The problem I did run into was that when starting the RTC client it could not connect to the service, since I had moved the service. Since the service had moved I did say “no” to the questions if RTC should try to connect again. In the address field in the “server selection window” I did type the new address into address field. The “OK” button was now greyed out, so I could not connect to the server.

After spending some time to try to figure it out how to un grey the “OK” button I found by simple press TAB in the address field make RTC to connect to the service and retrieve the companies on the service. Now the “OK” button was not greyed out anymore.

Dynamics NAV RTC hangs when previewing/printing reports

Problem:
When previewing a report you only getting a small window in upper left corner with only a text string with the name for the report and the rest blank. When I trying to close this window, you get an error message: “Errors exist. Do you want to discard changes?” (Y/N). Pressing Yes, hangs and close the RTC client.

Probably cause:
You have installed the RTC client outside the setup chainer or you have uninstalled Report Viewer 2008. It may also be that Report Viewer 2008 installation is broken.

Solution:
Run DVDPrerequisite ComponentsMicrosoft Report Viewer 2008 ReportViewer2008.exe and select install or repair depending on if Report Viewer 2008 was already installed.

The TestApi v0.4 has shipped

The TestApi v0.4 has shipped! You can download the latest bits at http://codeplex.com/testapi. Some of the updates
• An improved Combinatorial Variation Generation API – we now support parameter value weights and tags (for “negative” variations);
• A new Memory Leak Detection API – allowing capture, comparison, and serialization/de-serialization of memory snapshots of a running process;
• A new Object Comparison API – allowing comparison of arbitrary .NET objects using arbitrary object comparison strategies;
• A new Text String Generation API – allowing generation of random strings, interesting from the testing point of view;
• Various documentation improvements and sample additions.

Next Page »