MVC File Upload - Access to the path is denied

Interesting problem occurred yesterday, when I was trying to upload a file to the server. I was getting: Access to the path '' is denied The problem wasn't actually caused by the file upload but by my attempt to create a directory to put that file there. After reading a bunch of answers on StackOverflow,...

ASP.NET Automatic Migrations

Understanding migrations can be a bit tricky. Hopefully, this article will resolve at least some of the questions you might have. First things first - What are migrations? Well... If you built your website using first code approach every time you change your model you need in order to keep the database in sync. There...

MediaElement Not Firing Events

Today, we encountered quite an interesting problem. MediaElement wasn't firing events. Using simple speech synthesis on Windows 8.1 using the speech synthesiser we tried:

None of the variations worked. The speech worked just the event wasn't getting fired. After a bit of digging it turned out that in order to fire events MediaElement must...

Set background color for all buttons in WPF

Hehe, simple enough thing, but took long enough. You need to use resources to do it.

In there you can define styles:

It is simple enough to read: apply it to buttons. Property: Background set the value to whatever color you like.

Image FadeOut Animation

Today, I decided to play around with WPF a little bit. I created a simple App for animating a logo

Converting a 32-bit PNG to an 8-bit PNG

Accord library was crushing all the time when I was trying to do Vector Machine learning on with the images send from Android. I turned out that Accord doesn't work with 32 bit images. Only with 8 bit. Here is a simple function to convert 32-bit to an 8bit:

Tracing Not Working

This was a really annoying error. Again the lack of installed entity framework inside the project caused the service to be unusable. All the services worked in VS but not after deployment. I've added tracing to my application. Guess what? It didn't work. I had no idea what was happening. After researching it turned out...