Vista Media Sharing With Xbox 360 Permissions Problems

Last night my cousin and I put some serious effort into getting a Windows Vista (Ultimate) machine with Media Center to share music with an Xbox 360.  Several hours later we finally got it to work, but it was quite a journey:

First off, our setup is maybe a bit non-typical from the standard home setup Microsoft envisioned when they designed it.  We have a domain with 2 servers, one which has all the media files on a shared drive.  We usually just add the network path of the shared drive to WMP11 on our local machines usually and it works just as well as if they are on the local HDD (provided the network is not down).  The two servers run Server 2003, and Microsoft dropped the ball there by not enabling WMP11 or Windows Media Connect to install on Server 2003.  So we setup another computer with Windows Vista Ultimate.  The plan was to add the media files into WMP11 using the shared drive on the server, and then share them on the Vista box using the built-in Media Sharing feature.

Unfortunately we ran into a permissions problem.  Except we didn't know this right away, and kept resetting everything, rebooting computers and the Xbox, and being really frustrated.  Really, really frustrated.

There are several problems.  First is that the Xbox doesn't show up to "Allow" in the Media Sharing dialogue until you try to access the shared library using the Xbox.  Of course it gives an access denied message (since you can't allow it in Media Sharing because it's not even there yet), and then it appears in Media Sharing and you can allow it.  Inconvenient.

Second, there are multiple users that can share a library on the same machine. This is a PITA.  As far as I can tell, wmpnetwk.exe goes through the C:\Users\ folder and looks in all the profiles for a WMP11 database (C:\Users\%username%\AppData\Local\Microsoft\Media Player\).  So it will share any user's library when the settings are configured to allow that (and the settings can get really goofy really fast--they are deceptively simple).  Then you will see two different libraries (or three, or four) to connect to on the Xbox, but they will both be on the same computer.  Invariably, one of them shares only the songs that ship with Vista, and since you haven't gotten anything else working yet, that is all you can listen to.  Anyways, I had an old profile on my computer from before it joined the domain, and I wasn't able to delete the profile because the WMP11 database was in use by an application.  So I had to disable Media Sharing, end the wmpnetwk.exe process, and then try and delete it (it didn't work until the 3rd or 4th try for some reason).  The real WTF is that this was all going on while the old user didn't even exist on the computer anymore (deleted via lusrmgr.msc).

Third, the permissions problem.  It turns out this is what was really stopping us the whole time.  The other two problems are just annoyances.  We would be able to get the right username on the right computer to show up on the Xbox 360 and it would connect fine, but the library would always be empty when we went to play songs.  After suspecting permissions problems and finally just copying some files to the local HDD before we added them to the library on the Vista machine, we were able to actually see songs and play them on the Xbox.  Much rejoicing.  So we grabbed the drive from the server (good thing it was external USB) and hooked it up to the Vista box.  It still seems to be working (although I did have to power-cycle the HDD this morning, I'm not sure what happened there).

The permissions things boils down to Media Center and Media Sharing both wanting their own user account to access media.  I'll speculate that the process that tried to set these permissions did not have permission to set them, and thus neither Media Center or Media Sharing was able to use them.  Anyways, the files on the external drive now have have two additional users in the security tab--"WMPNetworkSvc" (for Media Sharing) and "uuid: 10000000-0000-0000-0200-0017FA3792D7" (for Media Center).  No, I didn't know that the obscure uuid number was associated with Media Center until I opened up the local user manager and saw Mcx1 next to that mess of numbers and then read online that Media Center uses user "Mcx1" to access files.

So, if you really wanted to share network files via Media Sharing or Media Center, you could either give the media machine's Mcx1 and WMPNetworkSvc users read access to the media files or just give everyone full control of the media so that the necessary permissions can be applied (the former is recommended over the latter).  We ended up just moving the media files, but that might not be viable for some people.