Click to Rate and Give Feedback
MSDN
MSDN Library
Visual Studio 2005
Visual Studio
 The Project Location is Not Trusted...
This page is specific to
Microsoft Visual Studio 2005/.NET Framework 2.0

Other versions are also available for the following:
Visual Web Developer 
The Project Location is Not Trusted Dialog Box 

This dialog box appears if you attempt to open or create a client project on a Universal Naming Convention (UNC) path. By default, a UNC path is not a trusted location for a project. Your project might not run correctly when you attempt to debug or run from this location. For more information, see Configuring Security Policy.

The following tools modify the policy affecting the file share:

Mscorcfg.msc

One simple way to modify the policy affecting a file share is to give a specific file share FullTrust permission using Mscorcfg.msc. You must be an administrator on the computer to make this change.

To give a file share FullTrust permission
  1. Start Mscorcfg.msc.

  2. Expand the Runtime Security Policy node, the Machine node, the Code Groups node, and the All_Code node, and then highlight the LocalIntranet_Zone node.

  3. In the right pane, click Add a Child Code Group.

  4. Choose Create a new code group, enter a name for the code group, and then click Next.

  5. Choose a condition type of URL, and enter the UNC path to the share location of your project, using the format file://\\servername\sharename\* where \\servername\sharename is the name of the share. Click Next.

    NoteNote

    Make sure to add the asterisk at the end of the path.

  6. Choose Use existing permission set and select FullTrust, and then click Next.

  7. Click Finish.

  8. Restart Visual Studio.

Caspol.exe

Using caspol.exe to accomplish this change, you would use the following command line (you must be an administrator on the computer to make this change.):

caspol -m -ag 1.2 -url urlname FullTrust

See Also

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Trust issues may be cause by ZIP files      PeterWone ... EricTN   |   Edit   |  

When the untrusted project location is on a local file path this usually means the files and folders were extracted from an untrusted ZIP file. Right-click on the ZIP file and choose Properties to obtain the Properties dialog. If you see an Unblock button enabled then this is the cause of your troubles. Click the Unblock button. Delete the files and folders you previously extracted and any copies you made (which will also exhibit the problem) and repeat the extraction and copying process. You should find the problem is resolved.

12/09/2007 - I just wanted to concur, this problem happened to me when I tried to load a solution from the Beta 3 Entity Samples (http://www.codeplex.com/adonetsamples/Release/ProjectReleases.aspx?ReleaseId=8858) that I had extracted from the zip file onto a Vista machine. The instructions above solved the issue.

Tags What's this?: Add a tag
Flag as ContentBug
Looks like making this change at the 'user' level does *not* work      RoyPardee   |   Edit   |  
Just FYI--I tried adding a code group at the user level rather than machine w/the proper membership condition & it looks like it did not have the desired effect. So you really do have to do it at 'machine' level.
Tags What's this?: Add a tag
Flag as ContentBug
Does not seem to work for DFS Shares      TedSA   |   Edit   |  
This doesn't appear to work when the share is referenced through the Distributed File System unless the DFS root is included in machine's Intranet zone.

Also it seems that if .Net 2.0 is installed side by side with .Net 1.1, the configuration must be done using the .Net 2.0 tools.
Need to mention that a Visual studio of Framework specific prompt needs to be opened.      Tatworth   |   Edit   |  

Since the CASPOL and MSCORCFG.MSC are framework specific, it is necessary to open either a visual studio of framework specific prompt. The documentation should include this.

Tags What's this?: Add a tag
Flag as ContentBug
When 2 or more version of Visual Studio installed      ShiatsuPete   |   Edit   |  

I just wanted to clarify Tatworths comments - thanks for them, as that helped me find the solution, but it still took a while to get there.

I have VS2003 & 2008 installed on the same machine, when I tried opening MSCORCFG.MSC, caspol.exe, or using the .net config tools in Admin Tools I always got version 1.1 tools without knowing, and still got an error with VS2008. What I eventually realised was that I needed to open command prompt, and then run vsvars32.bat from the c:|Program Files\Visual Studio\Common7\Tools Folders specific to the version of VS that I had the problem with.

After that running Caspol.exe sorted out my permissions.

Hope that helps

Tags What's this?: Add a tag
Flag as ContentBug
Processing
© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker