Category Archives: Windows

c# – accessig application configuration file using ConfigurationManager

Using configuration file is pretty straightforward. First  add to your application references Assembly System.Configuration. ConfigurationManager provides access to configuration files for client applications, It makes sense to encapsulate configuration settings read and write to special methods.  

To add or update use AddUpdateAppSettings:

For read use ReadSetting. In this sample we provide also default values so in case… Read More »

5 cent hint – Unix timestamp to c# datetime

If you need to covert Unix timestamp  to DateTime then here it is:  

Update: DateTime to Unix timestamp

 

HTTP Error 404.3 while browsing wcf service

How to fix HTTP Error 404.3 – Not Found error  while browsing wcf service on Windows Server 2012 R2 Symptoms :   Solution: From the Server Manager, click on Add roles and features   Select the appropriate server Then select Features. Under .NET Framework 4.5 Features, you’ll see WCF Services, and under that, you’ll find… Read More »

c# – Get Product Version and Assembly Version of external application

Sometimes it is needed to know version of external application’s  Product Version or Assembly Version. It is actually very easy task.

As not version information parts might not be present the try-catch is a must. On other hand there is nothing to do if error occurs, so it is just ignored. Now we set version info… Read More »

c# – Windows File Explorer extension for creating url shortcuts – Part 2

In previous post we stated extension for creating url shortcuts. Now it is time to create actual file explorer menu items and get the basics working. First let’s create small class what will deal with needed registry entries. Creating contect menu items is quite simple, just two entries in registry.  

To handle registration and… Read More »

5 cents hint – msi installer is not updating exe or additional dll-s

After struggling with the issue found simple solution. Open the AssemblyInfo.cs file for your project, and change AssemblyVersion to [assembly: AssemblyVersion(“1.0.*”)] then the assembly version information is automatically updated each time you build the project. Then comment out or remove the AssemblyFileVersion entry from the same file, so the file version defaults the same as… Read More »

c# – Windows File Explorer extension for creating url shortcuts – Part 1

I like to save interesting websites as file system shortcuts in OneDrive directiory. It works nice using New->Shortcut in file explorer, but there is room for improvement. In first part we will look how to fetch website info and create url shortcut and in second will convert prepared code to file explorer extension. Development is easier using… Read More »