Thursday, June 26, 2014

Toshiba AuthenTec duplicate fingerprints

If you have a Toshiba with AuthenTec biometric device and you forgot to clear the fingerprints before formatting your windows 8.1 installation, you will face the issue of not being able to register the same fingers in your newly created Microsoft Account. The issue steams from the buggy implementation of the Toshiba Fingerprint Utility that doesn't handle domain accounts that well. Moreover, the fingerprint biometric data are stored inside the hardware, so no matter what file you delete, you won't be able to fix this. Some people on the net report that a simple export and import of the data (using the utility as administrator) worked for them. All the reports were mentioning windows 7 so I guess they were all facing an issue with local accounts and not domain ones.
Luckily, Toshiba discovered the issue and offers a command line tool to delete all fingerprint data from the hardware. The name of this tool is TFPU WBF Delete Fingerprint Tool (a.k.a. tc30636900b.exe) and this made the trick for me.

Wednesday, May 28, 2014

Renew expired pfx certificates for click once applications

If you used the click once technology back in visual studio 2005 you have saved yourself a lot of hassle deploying newer versions, especially during the UAT phase. Unfortunately, if you used a dev certificate from visual studio and now you have to do a minor update, you will discover that the certificate has expired and visual studio won't allow you to use it to create a new click once deployment. Although Microsoft has suggested a couple of ways to tackle the problem, replacing the certificate is not an option in most of the cases and the provided code doesn't work that well. Cliff Stanford has fixed the provided codebase and I have uploaded a slightly modified version in github in order to preserve it.
The main modification is that I add 105 years to the expiration date, in order to avoid redoing the process every 5 years :)

Saturday, April 12, 2014

Create hotspot on your windows machine

Being a developer, you might want to test your localy hosted websites with various mobile devices. The easiest way is to create a virtual hotspot and have the devices connected there. This can be easily done executing the first two commands of the following gist in an administration command prompt (run as admin):
Once connected, your devices will get an ip in the range of 192.168.x.y (mine was 192.168.173.something) and the pc will be available on the 192.168.x.1 ip.
In order to disable the hotspot, just run the last command on the gist.

Sunday, March 23, 2014

Grant execute on sql user

Back in the early days of sql server, stored procedures were much faster compared to normal queries. This meant that a typical system would host more than 200 stored procedures (hopefully on the same schema). In order to grant execute access to a role or user you can use the following snippet

Friday, February 28, 2014

Removing deleted files from git

If you have accidentally added huge binary files in a repo and you want to remove them, use the following git command:
Thanks fly to Sam Watkins for sharing this.

Friday, February 21, 2014

Relative deploy locations for visual studio 2012+

Working with team foundation server, you may end up having various publish profiles to publish various configurations. You can specify relative paths in the local folder location by adding something like the following:
Watch out that the $(MSBuildProjectDirectory) points to the folder that contains the pubxml file, so it points to \Properties\PublishProfiles folder. So, the 3 back in the path, end up in the solution folder (if there is one).

Saturday, February 1, 2014

Visual studio 2013 evaluate expression problem

While debugging in vs 2013, you may run into the issue of the quick watch not evaluating the expressions while debugging. Try enabling Managed Compatibility mode by going to
Options --> Debugging --> General --> Use Managed Compatibility Mode
Note that this happened while debugging wcf services under windows 7 and never occurred on my machine running windows 8.1, but I may have been lucky.
Hope this save you some time and also check this blog post for more weird debug issues