The Project Location is Not Trusted Dialog Box

The Project Location is Not Trusted dialog box appears if you open a project that has been downloaded from the internet, or if you try to create a new client project or open an existing project by using a Universal Naming Convention (UNC) path. To prevent the dialog box from appearing for a project that has been downloaded from the internet, unblock the .zip file before you extract the project. For more information, see How to: Use An Assembly from the Web in Visual Studio (The page is about assemblies, but the unblocking procedure is the same for .zip files.)

By default, a UNC path is not a trusted location for a project. You can modify the security policy of the file share to prevent this dialog box from appearing. For more information, see Configuring Security Policy.

The following tools can be used to modify the policy affecting the file share:

Mscorcfg.msc

The .NET Framework Configuration tool (Mscorcfg.msc) is a Microsoft Management Console (MMC) snap-in that enables you to manage and configure assemblies in the global assembly cache, adjust code access security policy, and adjust remoting services. One simple way to modify the policy affecting a file share is to give a specific file share FullTrust permission using the Mscorcfg.msc tool. You must be an administrator on the computer to make this change.

If you want to manage .NET Framework 2.0 and later versions by using the configuration tool, you must install the .NET Framework 2.0 SDK.

Note

The .NET Framework versions 3.0 and 3.5 are built incrementally on the .NET Framework version 2.0. The configuration tool included in the .NET Framework 2.0 SDK is the latest version of the tool. You can use this version to manage code access security policy for the .NET Framework 3.0, 3.5, and later versions also.

You can run the Mscorcfg.msc from the following locations:

  • The Start menu

  • The command line

  • The Microsoft Management Console

For information about how to run the Mscorcfg.msc tool, see .NET Framework Configuration Tool (Mscorcfg.msc).

Caspol.exe

The CAS Policy tool (Caspol.exe) enables users and administrators to modify security policy for the computer policy level, the user policy level, and the enterprise policy level. The best way to run the Caspol.exe tool is from the Visual Studio command prompt. You must be an administrator on the computer to make security policy changes.

To run the Caspol.exe tool

  • From the Visual Studio command prompt, enter the following command:

    caspol -m -ag 1.2 -url urlname FullTrust
    

For more information about how to use the Caspol.exe tool, see Configuring Permission Sets Using Caspol.exe.

See Also

Other Resources

Configuring Security Policy