Quick tip: RadComboBox and WCF over https

At work we are are constantly using Telerik components. To be honest, sometimes we also use them, where a plain ASP.NET control would be just as fine. Anyway, we use RadComboBox control as auto-complete fields for various search filters etc. Normally, we have RadComboBox connected to regular .NET Web service and it works like a charm. But, to make things a little less dull, I decided to write a WCF service and connect it to RadComboBox.

First, I checked if RadComboBox supports WCF services and it appears it does, as long as it is a Ajax-enabled WCF service. Second, I want my WCF service to be part of existing web application and not a standalone project as no other project will use it. So, I created a simple Ajax-enabled WCF service with one method which returned exactly the same string for every call. Nothing fancy. I connected WCF to RadComboBox, and it worked like a charm.

However, then I remembered that our test and production servers enforce SSL encryption, which means that by default my application will run on https. I thought it would be no problem, but there is no way that one can configure RadComboBox and Ajax-enabled WCF service to connect via https. To be honest, this is not fault of RadComboBox control. It is due to the fact that Ajax-enabled WCF service must use webHttpBinding or it doesn’t work. Well it does, but it returns an encoded blob. Anyway, with hours spent on fiddling with configurations of both app and IIS, I finally gave up and created a plain old regular .NET Web service. It may not be as fancy, or interesting, but it at least works.

Win32: Hide to system tray – Part 3

In Part 1 of the series, we have seen how we can hide the application and display an icon in system tray. In Part 2 we have implemented a redisplay of application window upon double click on system tray icon. In Part 3, we will see how we can display a popup menu on left and right click on system tray icon without disturbing double click behaviour.

[Read the rest of this entry…]

New keyboard

After years of abuse, my Logitech UltraX keyboard decided to die and forced me to find a replacement. As I always have been Logitech man when keyboards and mice are concerned (despite those few years in 90s, when I enjoyed Cherry keyboard) and I was really really pleased with UltraX keyboard, I went on a quest to find a replacement.

[Read the rest of this entry…]

Win32: Hide to system tray – Part 2

In Part 1 of the series, we have seen how we can hide the application and display an icon in system tray. In Part 2 we will build on Part 1 example to see how we can implement a redisplay of application window upon double click on system tray icon. To do that, we need to create a message that tray icon will report to main application and check it for events.

[Read the rest of this entry…]

Win32: Hide to system tray – Part 1

I used to code in C++ a lot. And I mean, a lot. For instance, at previous gig, I created an application that measures bandwidth between multiple clients and a server. Interesting project. Specially since three quarters down that road, I had to port it from Windows platform to Linux. But that is entirely different story. However, as years went by, there was less and less things I found comfortable doing in C++. Mostly because (and I know this sounds as a heresy) C# has become my favourite language. But that is as well another story.

Lately, though, I decided to rekindle my C++ knowledge. As a result, you will be seeing some of my C++ work up here. My first project, RGB to Hex converter, was presented online about a month ago. Now I decided to go for something Windows based and created an empty Win32 application that can hide to tray and then redisplay again. Part 1 will cover hiding application and displaying icon in system tray.

[Read the rest of this entry…]

Web 3.0

Just in case you (like me) didn’t know what the **** Web 3.0 is (I didn’t even know it is a buzz word these days), you should read this post on Amit Agarwal’s blog should help you out.

RGB to HEX converter

In my line of work (building intranet business apps), I too commonly encounter a problem of converting RGB numbers to hex value. Sure, I could just use rgb notation, but I prefer a hex one, as it is easier on the eyes and makes CSS shorter. My solution, usually was, to either use a calculator to convert RGB to hex or search the web for an online converter. As first chance makes you convert each number separately, making it utterly slow and painful process, the second is of no use, when there is no internet connection around.

As I had a couple of minutes of spare time, I created a small windows command line program that does exactly that. It takes RGB value as a command line parameter and convert it to hex.

Sample usage:

> rgb2hex 100 55 234

Hex value: #6437ea

You can download it from here.

There is also source code available. You can download it using git:

> git pull https://jkovalenkov@bitbucket.org/jkovalenkov/rgb2hex.git.

 

Extending BuildMaster

I might have mentioned, or I might have not, that we have recently started to use BuildMaster as a continuous integration tool. Before continuing, let me make myself clear and say that besides being a satisfied customer of BuildMaster, I have nothing to do with the product itself. Now, with that out of the way, if you do not automate your builds yet, I deeply recommend using BuildMaster, which is also free to use (albeit with some limitations).

Anyway, back to my story. As mentioned, we are using BuildMaster for currently eight .NET applications that need to be deployed each in its own special way. And with BuildMaster it works like a charm. However, integrated Subversion Create Tag action was too general for our needs and purposes. Hence, it was time to create our own BuildMaster Extension. [Read the rest of this entry…]

Lazy

As you might have noticed, my recent post count suffered a tremendous drop. And surprisingly, work has nothing to do with it. It is just a dangerous attack of laziness that I can not shake off. In my spare time, I have become lazy to a point, where writing this article took about a month of preparation and it is written now only because I am out of moves in Triple Town and Bejeweled can entertain me only so far. Yes, I admit, I am lazy to a point where I cannot be bothered even playing a proper PC game. There are latest X-COM (and all 4 original parts), Civ5 and FM2013 waiting for me patiently in Steam, but haven’t run them in ages.

This state is mindboggling to me. I can not stand laziness. I am usually found writing my own projects or just surfing latest development tech sites in the wee hours of the morning. Lately, not so much. So all of this got me thinking. How to get out of this funk?

[Read the rest of this entry…]

Quick tip: Publishing a web application with MSBuild

We have this project, that is developed in house and at an outside contractor. Recently, we purchased and installed BuildMaster and tried to use it to automatically publish this project as well. As it occurs, it is not as easy to publish a .NET 3.5 web application as it is from Visual Studio.

To cut the long story short… After several hours of research, hair pulling and quiet swearing, I found a solution that works. So, if you want to publish a web application with references to another project with MSBuild, you need to run it like this:

cd /D x:\Source\myApp\
c:\Windows\Microsoft.NET\Framework\v3.5\MSBuild.exe /target:ResolveReferences;_CopyWebApplication /p:Configuration=Release;WebProjectOutputDir=X:\Builds\myApp\;OutDir=X:\Builds\myApp\bin\ myApp.csproj

Then, just move the contents to final destination.