Monday, January 9, 2012

Windows 7 Home Premium and Visual Studio 2010

Just did a new install of Visual Studio 2010 on a Windows 7 Home Premium. After all the computer is not part of a domain, uses Home Networking, and I don't need any of the comparison features when checking out the different editions.
Well... almost true. It appears that Microsoft in their infinite wisdom decided that not only would they not offer up the .msi to manage Users and Groups, but they would ship it with Home Premium and then disable it from working. Friendly?
The problem I came across was that my newly installed system just wasn't playing well out of the box and it appeared to be a permissions problem (what a surprise!) Unfortunately, I tried to find out which users were enabled on the machine only to find out that you can't use the .msi gui interface to check up on them. Of course, behind the scenes everything is still working and you can use the command prompt (NET commands) to check up and change permissions.
Ultimately though, it was using the IntelliTrace break all option that set me on the right path.  It told me that my code could not be run because there were not sufficient permissions in the "Temporary ASP.NET Files" directory. Depending upon when I did the break and what had needed to be recompiled that time, the particular directory in question was either in the user's AppData/Local/Temp directory or the Windows\Microsoft.NET\Framework\v4.0.30319 directory.
Next I discovered that IIS normally runs (as in out of the box) in the context of IUSR. Although Windows 7 Home Premium disables the .msi manager, when you go to the directory and click sharing, if you know the user name (i.e. IUSR) it can be shared and access permissions granted to it.
Once I added the rights to IUSR for both the "Temporary ASP.NET Files" directories, things seemed to return to normal and my code could run as expected.