Tip of the Day #9 (The Project Location Is Not Trusted)
23 March, 2009 7 Comments
If you download zipped source code from the web, unzip it and then open the solution in Visual Studio 2008 (and apparently VS 2003 and VS 2005 as well) you may get a dialog that says “The project location is not trusted” … “Running the application may result in security exceptions when it attempts to perform actions which require full trust.” A bit like this:
What happens is that when you download something from the internet Windows (from Windows XP SP2 onwards) will add an alternate stream to the file called zone.identifier. If the file is a zip it will then add that alternate stream to each of the files as it unzips.
You can view this stream by typing something like the following at a command prompt:
You can then read the contents of the alternate stream:
What the ZoneStripper program does is delete the zone.identifier alternate stream from the file so that zone aware applications (and the OS) treat the file normally.
Note: If you unzip the files to a FAT based file system then you won’t have a zone.identifier in the first place as the FAT file system does not support alternate file streams.