Category

Project

Visual Studio and Npgsql error while compiling

During the last 3 days I’ve spent sometime on an annoying issue concerning Visual Studio 2012 and Npgsql ( a .Net Data Provider for Postgresql).

If you’ve ever had something similiar :

Error Message: Parser Error Message: Assembly ‘Npgsql, Version=2.1.12.0, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7’ not found

while debugging or running your application, you might need to add the reference of the Npgsql.dll into your GAL.

If you have Visual Studio 2012, the related GAL is located on:

C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools\gacutil.exe.

Visual Studio 2010 has the same path with the exception of the version which should be V.7.0 (if patched 7.1). Visual studio 2013 should has the same path with the version V.9.0. Once you found it, you should run the command below to insert into the Global Assembly Cache (GAL), the missing reference. (adding the Reference from the Solution, it’s not enough)

What you need to do is to open a command prompt, in my case the Npgsql is located in C:\Npgsql, and run these commands:

#cd C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools\
#gacutil.exe /i C:\Npgsql\Npgsql-2.1.2-net40\Npgsql.dll

2014-08-04 09_48_25-Amministratore_ C__Windows_system32_cmd.exe

As you can see from the reference page on MSDN, \i installs the reference as required. A good check would be to run /l after inserted, in order to check if it has been added correctly or not.

OpenNMS, check email status (MailTransport)

 

Carrying on talking about OpenNMS features, this time I’d like to introduce the service called Mail Transport Monitor, normally abbreviated to MTM. The aim of this service is to monitor the complete functioning of your mail system: sending and receiving e-mails. For this purpose we need an “external” email which should rapidly answer to our request with a so called “echo-reply”, to let us know that everything’s working. Instead of putting an automatic reply rule to your ”free” Gmail/Hotmail/Yahoo (etc..) account, it would be nice to have an automatic service that does this job automatically, without any configuration. These services exists and they’re public (anyone can use them) but unfortunately they’re not so reliable as expected (if you only think at how many emails per seconds they receive, maybe this delay is understandable)

Here you can look at the most famous Echo-Mailer (just a German page on Wikipedia, Google helps you). After many tries, here’s my suggestion: echo@tu-berlin.de and echo@univie.ac.at are the best choices. If you send an email no more frequently than every 2 minutes, you will never have problems with them (since 6-7 months). Now we can have a look on how it’s the configured OpenNMS and this tricky MTM service.

Read More

OpenNMS, how to start.

Before starting to work in a real company,  I didn’t know anything about devices monitoring. When I arrived there the most impressing thing was how much the Team cares about knowing at every time how was the status of all the devices we need to manage. For that reason there were already installed, and properly configured, the most “popular” monitoring softwares like Nagios, Cacti & SmokePing. All of them are complementary each other, with the exception of Nagios that with 3rd part plugins can become more powerful than as it is out of the box.

In order to avoid a continuos switch from these 3 tools, we start a project  for introducing a pretty new  monitoring software called OpenNMS: our original purpose was to use a unique software for monitoring the infrastructure.  During the past 6 months I focused completely into customising and learning this software and I would like to express my experience about it…

Read More