Tuesday, March 11, 2014

Windows Phone–Removing Duplicate Songs and/or Albums

Time for another post that has nothing to do with development…

If you own a Windows Phone, you have probably seen duplicate songs or albums in your music library. This can be a very frustrating bug to deal with and it is difficult to fix. It would be nice if you could simple select a track or album and delete it right from your phone. Unfortunately, Microsoft does not allow us to do that. It would even be great if connecting the phone to your computer and deleting it files in the file browser or via the Windows Phone app would take care of it for you. Well… no. That doesn’t always work. After struggling with this for a little while, I found a solution that worked for me. Hopefully it works for you too if you are in the same boat. Here is what I did to remove the duplicate songs.

-Connect the phone to your computer with the usb cable and open it up in Windows Explorer.

-Locate the Music folder.

-Select View > Show Hidden Files (from the toolbar or ribbon control depending on what os you are running)

-Once you are seeing the hidden files, you should see an Artists folder that contains a file for each artist in your collection. Find the artist that has the duplicate files and erase that file.

-Navigate to that artist’s corresponding music files directory on your phone and delete those files.

-Copy the music files from your music library on your pc back onto your phone. This should re-generate that file you previously deleted under the hidden Artists directory. This is the file that tells your phone what files to display.

That should do it. You can now disconnect your phone and see no more duplicate files (or at least that worked for me).

Good luck!

Friday, March 7, 2014

OutOfRangeInput Error in Azure

I’m fairly new to Azure programming. Maybe this is obvious to everyone out there, but it wasn’t obvious to me, so I figured I’d record it on my blog for all you newbies out there like me.

I have been working on a simple application that stores data in a table in Azure. Because I am new to Azure table storage, I followed a few online tutorials to get started. Here is one of the ones I read.


I made a few basic changes to my code rather than copying it word for word. When I tried to run my app, I kept getting a

StorageException - The remote server returned an error: (400) Bad Request.

every time I tried to insert a new row in the table. The samples were so simple and I thought I followed them closely. I spent a couple of hours trying to figure out what was going on, and I finally stumbled upon the answer. This took WAY TOO MUCH time to figure out, so I hope this helps you out in your development.

So here is the deal…

When I created my entity that I was going to insert, I had a DateTime.Now.ToString as part of the row key in the entity. It turns out you can’t use that in partition keys or row keys. When you are running on Azure, the format for the date is “YYYY/MM/DD”. The ‘/’ character is not permitted in row keys or partition keys.

Once I removed that, everything worked smoothly.

It was a simple error, but like I said before, it took way too long to figure out.

Happy Coding Folks!