A while back I wrote to ArkeGlobal about windows 7 blocking my files. It really should go here, so here it is with some updates.
Original Sept 10, 2009
I downloaded an external dll source for a web application and adding the reference to my project yielded this error:
“System.Security.SecurityException: Request for the permission of type 'System.Web.AspNetHostingPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.”
As it turns out Windows 7 security was blocking my downloaded dlls from running as a trusted source. Going into the file system itself, I checked the permissions on the actually dll file and a message at the bottom says:
“This file came from another computer and might be blocked to help protect this computer.”
There is an ‘Unblock’ button right next to it and once I clicked it, it solved my issue.
Updated Oct 27, 2009
Since then, I ran into a similar issue but because of the way I had to build the project, every time it ran, it re-added that security back onto those dlls, so I found this: http://www.petri.co.il/unblock-files-windows-vista.htm
Look at solution 3 and/or 4.
Updated Mar 2011
This last encounter is for those of you that have large, and I do mean large files to copy down. I had a particular instance where I had to download an upgrade zip file for DNN to lay over a pre-existing one. When I downloaded and extracted all the contents of it to the client's machine, I had some blocked files. I grumbled and unblocked it, tried again and got the same error. Then I realized, Windows had blocked *every* file inside that zip. I immediately started googling and every single article basically said, 'window's does not provide a way to unblock in bulk'. So I stared at over 1700 files I had to right-click and unblock by hand with no one providing a solution. I was about 1 hour in when I had an idea:
"Right-click -> Properties" on the ZIP folder
It will have the same 'unblock' feature that all it's children are inheriting from. Once I unblocked the zip, I extracted and all my files played nice again.