Debugging Partially Trusted Code
If you can’t wait the Whidbey release for running your code from inside VS in a Zone other then your ComputerZone (a.k.a LocalMachine), it’s very easy to accomplish this without any policy changes and no network connection as well. Just got to your project property pages dialog and under the “Configuration Properties” folder, change the OutputPath property with the following settings:
For Intranet Zone:
OutputPath = \\MACHINENAME\C$\...\bin\Debug\
For Internet Zone:
OutputPath = \\127.0.0.1\C$\...\bin\Debug\
(Complete the “...” with the rest of the path where your project resides.)
Now you can run (and debug) your solution from the Zone you want. Notice that you might get several security exceptions caused by your restricted PermissonSet granted depending of which Zone you are running your code. However, this is a good practice and several production environments won’t give you the unrestricted permissions that you have when running code from your machine.
If you want further information about the dangerous things that might be done by a fully trusted code, just take a look at the excellent article that wrote Keith Brown - Beware of Fully Trusted Code -.
This posting is provided "AS IS" with no warranties, and confers no rights.