Installation of Dynamics NAV 2009 hangs during installation of Outlook Add-in

When installing NAV 2009 RTM you can sometimes if you are unlucky end up with an installer that hangs when installing Outlook Add-in. The most common reason for this is that the installation is not able to update the” Outlook.exe.config” file and get stuck in an infinitive loop.
When looking in the event viewer you will get a similar error message to this:

Product: Microsoft Dynamics NAV 2009 Outlook Add-in — Error 27519.Error updating XML file C:Program FilesMicrosoft OfficeOffice12Outlook.exe.config. -2147024891
Read more

0.00 avg. rating (0% score) - 0 votes

WPF Application Quality Guide v0.5 has been released

WPF Application Quality Guide v0.5 has been released today at the WindowsClient.NET with new topics and updates.

This release includes several new additions and updates:
1. Suggested Roadmap – updated to include new topics based on different persona
2. Performance and Scalability Testing – updated with a few new resources
3. Integration and Scenario Testing – a new article outlines the strategies and the steps to take in Integration and Scenario testing.
4. TestApi (Tools) – updated with summary of the new APIs from TetsApi v0.2 as well as sample usages.
5. Tools – various new additions and updates to commonly used tools.
6. A1 Building a WPF Application Test Suite by Using VSTS, NUnit, or xUnit – a new article summarized the common unit testing frameworks including sample test code and key resources.
7. A4 Considerations for WPF Browser Applications – a new valuable write-up with common considerations in XBap apps.

The full online version can be found here.

0.00 avg. rating (0% score) - 0 votes

Using SQL Server 2008 Express in Dynamics NAV 2009

NAV 2009 will install SQL Server Express 2005 by default if no SQL server is installed. So if you would like to use SQL Server Express 2008 instead, this is the way to go:

The Demo installation of NAV 2009 is looking for a SQL Server instance called MSSQLSERVER. If the installer can’t find this instance SQL Server Express 2005 will be installed and the Demo Database will be attached to SQL Server 2005 even though you might have had SQL Server Express 2008 installed.
So to install on SQL Server Express 2008 you need to set the instance name to MSSQLSERVER. This way NAV 2009 will install the Demo Database on SQL Server 2008.

Note: SQL Server 2008 requires the following:
.NET Framework 3.5 SP1
Windows Installer 4.5
Windows PowerShell 1.0 (Included in Windows Vista SP1 and Windows Server 2008)

0.00 avg. rating (0% score) - 0 votes

Strong name versus certificate signing

When I have been looking around on the net about strong naming and signing I have found some confusion about the purpose and the difference between does two methods.

Strong naming
Strong names make names cryptographically strong. When you load banan.dll by its strong name you are saying “load banan.DLL which was signed by XCompany”. The loader verifies that the named dll was signed with the correct key, and if not the loader will refuse to load the dll. This is the only thing that strong naming does (making the name of a dll cryptographically strong). Strong names are not a mechanism for expressing trust decisions. Strong names are just about making a name stronger so that you have a guarantee that the code you are loading at runtime is the code you compiled against. That is the ONLY thing you can safely use a strong name for. Strong name keys go into a “snk” file, which you then typically include with your project.

Certificates signing
Certificates signing are completely different. Certificates form a chain of trust, where a trusted root certificate (Verisign, for example) is installed in every user’s root certificate store. Those trusted root certificates are then used to certify the identities of organizations that issue code signing certificates. This enables the customer to setup trust policies. For example, they can say “I want to trust anything that comes from XCompany”. How will they do that? They first check to see if the dll was signed by an XCompany certificate. But how do they know that the XCompany certificate actually came from XCompany? Because Verisign says so – Verisign signed the XCompany certificate saying “we certify that this dll signing certificate actually came from XCompany”. Why do they trust Verisign? Because  Verisign is part of the Microsoft root certificate program. Acceptance into this program means Microsoft trusts these certificate authorities and places their root certificate in the Trusted Root store on Windows machines. That’s the root of the chain of trust. Certificates doesn’t go into strong name key files, they go into the operating system’s certificate store.

5.00 avg. rating (93% score) - 1 vote

Microsoft Certified Professional Windows Developer

After been spending some tuff days with only reading about user cases and different deployment ways I have finally passed the windows MCPD exam. This is the exam that I think I did learn less from out of the 3 you need to get a MCPD for windows. It was a lot about user cases and testing that I did know most of it already trough my work and universities studies. So I guess the exam was more for people that would like to have paper that they know this things of have not any university degree in computer science.

0.00 avg. rating (0% score) - 0 votes

Microsoft .NET Framework – Windows-Based Client Development

After 1 month of preparation and a weekend that disappeared I have passed my second MCTS exam. I did use the “MCTS Self-Paced Training Kit (Exam 70-526): Microsoft® .NET Framework 2.0 Windows®-Based Client Development” book for my preparation and Measureup’s online test questions. I did also try’s question that I did borrow from a friend. I found that the questions many times were almost exactly the same (Found some question with exactly the same options). So I can’t recommend Measureup did cover all the areas good except the custom control integration to VS design toolbox and properties dialog. Many questions on the real exam were about this functionality that I had not read about in the book or had any questions about in the practice online tests. So for that area I would recommend to read MSDN.

My study strategy was more or less as last MCTS exam. I did read 1 chapter in the book per day/ every second day (15 chapters in total). I also did plan to do the labs in the book but I never got the time for it. Instead I did concentrate on the lesson and chapter review questions plus the summary in the end of every part of the book. The last weekend that totally disappeared from my life, I did go through all lessons and chapter reviews plus summaries. I also did use the Measureup’s web site very heavily. Went through all 150 questions and read all explanations to all questions (this gave me the most). Another good part with the web questions is that it contain link to relevant MSDN sites for more information.

MCTS Self-Paced Training Kit (Exam 70-526): Microsoft® .NET Framework 2.0 Windows®-Based Client Development book

0.00 avg. rating (0% score) - 0 votes

10 Papers Every Programmer Should Read (At Least Twice)

Found a really interesting blog by Michael Feathers today. His goal is to get every programmer from different background up to minimum knowledge bar. The blog contain link to good papers about best practice and other thing a programmer should know as how programming language works.

0.00 avg. rating (0% score) - 0 votes

Using an enum type with WCF services

I recently started to work with Windows Communication Foundation and one of the first problems I did run into was how to use enum type in WCF.

This is a small example of a data contract and a service contract/interface that makes use of the enum type.

using System;
using System.ServiceModel;
using System.Runtime.Serialization;
namespace Test.DataContracts
    [DataContract(Namespace = "Testing", Name = "JobResult")]
    public enum JobResult
        Passed = 0,
        Failed = 1,
        Running = 2,
        TestFailure = 3,
        Queued = 4,
        JobNotFound = 5

Read more

3.67 avg. rating (76% score) - 3 votes

CSV parsing using OLEDB

For a few days I did run into the problem of importing CSV data with OLEDB. The first thing I tried was creating my own parser, but later I found an easy built in way. I show both methods here.

My own parser is simple based on the split string functionality.

//create the table
DataTable dt = new DataTable("Import");
dt.Columns.Add("col1", typeof(string));
dt.Columns.Add("col2", typeof(string));
dt.Columns.Add("col3", typeof(string));
//read the data
using (StreamReader sr = new StreamReader(filepath))
    int i = 0;
    while (!sr.EndOfStream)
        //skip the header
        while (i < 1)
        string[] text = sr.ReadLine().Split(',');
        DataRow dr = dt.NewRow();
        dr["col1"] = text[0];
        dr["col2"] = text[1];
        dr["col3"] = text[2];

The build in CVS parser uses a connection string and a SQL query to handle the CVS data. The connection string is configured according to:
• Provider: Jet OLEDB
• Data source: The directory that contains the CSV file
• Extended properties: ‘text’ means that we are parsing a text, the HDR property can be set to ‘Yes’ (the first row in the CSV files is header information) or ‘No’ (there is no header row), and setting the FMT property set to ‘Delimited’ essentially says that we will be working with a comma separated value file.

public static DataTable ParseCSV(string filePath)
    if (!File.Exists(filePath))
        return null;
    string fileName = Path.GetFileName(filePath);
    string dirName = Path.GetDirectoryName(filePath);
    //connection string 
    string connString = "Provider=Microsoft.Jet.OLEDB.4.0;" + "Data Source="" + dirName + "\";" + "Extended Properties="text;HDR=No;FMT=Delimited"";
    string query = "SELECT * FROM " + fileName;
    DataTable dt = new DataTable();
    OleDbDataAdapter adapter = new OleDbDataAdapter(query, connString);
    catch (InvalidOperationException)
    { }
    return dt;
0.00 avg. rating (0% score) - 0 votes

UI automation with accessibility object and win 32 API

In my earlier blogs (Fun with UIAutomation and calc, Fun with UIAutomation and calc 2 (event handling)) I have been talking about how to user uiautomation in .NET. Now it time to dig down bellow uiautomation and go directly to the source WIN 32 API. I have tried to translate the first calculator project to use win 32 API and accessibility object instead. The first thing that we need to-do is to create DllImport statement for user32.dll used for handling more or less all windows UI and oleacc.dll used for accessing the accessibility object. You will find my complete solution in the end of the blog.

An example of DllImport is EnumChildWindows that gives use the possibility to get all child windows to a specific window.

[DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Unicode)]
[return: MarshalAs(UnmanagedType.Bool)]
public static extern bool EnumChildWindows(IntPtr parentHandle, Win32Callback callback, IntPtr lParam);

Read more

5.00 avg. rating (93% score) - 1 vote

« Previous PageNext Page »