Trust Levels and Blocked Files

Topics: ASP.NET 2.0
Jun 11, 2009 at 3:16 AM

I recently moved my blog from a 2003/IIS 6 machine to a 2008/IIS 7 machine. After doing so and verifying everything worked properly, I upgraded to BE 1.5. After upgrading, the site started throwing the standard Security Exception error referring to trust levels. I run my own servers so I knew I wasn't running anything other than Full trust. Nevertheless, I adjusted the web.config file for Medium Trust which did nothing. I also checked, and re-checked the security (NTFS) permissions. When I slowed down, I noticed that the General tab of the file properties for one of the files had a notice stating the file was Blocked. I unblocked the file and checked a few others, every single file that I had unzipped for the upgrade was blocked. I have encountered this kind of thing before so I pulled out a trusty SysInternals tools, Streams, to take care of the problem for me. After running a simple command against the directory containing the web files, my blog was operational.

I know this isn't a BE problem but I figured I would share with community just in case someone else has a similar problem. If you want to understand why Windows blocks files, check out Russinovich's explanation on the Systinternals Streams page.

-Joe