Microsoft Dynamics Nav: Web Services User Credentials

In previous posts (Adding a Record through Web Services, Retrieving a set of Records through Web Services, Using an XMLPort as a .NET DataSource) I demonstrated a simple solution for connecting to a Microsoft Dynamics Nav Web Service. In each of the examples the default user credentials were used. To connect to a Microsoft Dynamics Nav Web Service with specified user credentials you use the System.Net.NetworkCredential:
            ws = new GetSetCustomers_Binding();
            //ws.UseDefaultCredentials = true;
            System.Net.NetworkCredential cred = new System.Net.NetworkCredential("username","password","domain");
            ws.UseDefaultCredentials = false;
            ws.Credentials = cred;


Regsvr32: "LoadLibrary failed - The specified module could not be found"

During a recent deployment I had had an issue with the registration of a DLL.  Part of the deployment process included the registration with RegSvr32. On one computer the registration failed with the error “LoadLibrary failed - The specified module could not be found”.  This error was a bit troublesome as the installation process was previously successful on several other computers. I verified the path was correct, the library existed, permissions were correct and more.

I used Process Monitor to trace the activity, filtered on the Regsvr32 process, and noticed that a dependent library was missing. Process Monitor indicated, in the list, the specific file that was not found. In the end I copied the missing library to the computer and the registration was successful.


SQL: SSIS, a Flat File and the _x003C_none_x003E__x003C_none_x003E_ Text Qualifier

I had recently experienced a strange issue with a SSIS Package.  This was basic package that copied data from a SQL Server table to a text file. This SSIS package was deployed in production for several months without issue, until – a minor change needed to be made.  The change was insignificant; the location (path) of the output file (a config file is usually used but in this case I wanted to edit the package) needed to be changed.   I had changed the path, built and deployed the package. Soon after deploying the package I received word that the file created was not correct.

I reviewed the output file and noticed that each record (line) ended with strange hex looking data: _x003C_none_x003E__x003C_none_x003E_

_x003C_none_x003E__x003C_none_x003E_ text qualifier

I scratched my head for a bit, reviewed the package’s source and destination connections and could not find where this odd _x003C_none_x003E_ data was coming from. I decided to view the package with a different editor and realized that somehow the Text Qualifier property for the Flat File Connection Manager was set to this “strange” sequence.

TextQualifier Property _x003C_none_x003E__x003C_none_x003E_

I removed the value, built and deployed the package and everything was back to normal - well as normal as it could be...


C#: Populate a ComboBox with Enum Values

A C# example for populating a ComboBox with the values of an Enum.

The Enum:

public enum FromAccount
    { checking = 0, savings = 1, foodstamps = 2, cashbenefit = 3 }

The Code:

comboBox1.DataSource = Enum.GetValues(typeof(FromAccount));
comboBox1.SelectedIndex = 0;


Software: BPSNMPMon updated

An update to BPSNMPMon, a SNMP (Simple Network Management Protocol) utility that will monitor host processor, storage and interface values, is now available. The latest version includes several enhancements:

  • Added AutoHeight option to scale the interface graph based on visible values
  • The charts now resize with the form
  • SNMP counters can be saved to a delimited log file 


BPSNMPMon performs various SNMP queries at a user-defined time interval and graphically represents the information in a simple user friendly interface.


Add BPSNMPMon to your network management "toolkit".