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-
Start Mscorcfg.msc.
-
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.
-
In the right pane, click Add a Child Code Group.
-
Choose Create a new code group, enter a name for the code group, and then click Next.
-
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.
Note Make sure to add the asterisk at the end of the path.
-
Choose Use existing permission set and select FullTrust, and then click Next.
-
Click Finish.
-
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
- 10/26/2011
- Scubago
I've got a bottom line to worry about instead of messing with useless security that keeps the good guys out and lets bad guys in. The solution for me (if you'll pardon the pun) is to move over to an open source platform. I expect to have all my client projects ported over to PHP and/or perl by the end of the week.
- 6/14/2011
- fsdnhjkhjkgdfhg
Therefore if you have your source code sitting on a network share mapped to a drive letter (or through UNC) then add that to the Local Intranet Zone. For example lets say you have your source code on p: drive. Open IE, got to Tools -> Internet Options -> Security Tab. Click on Local Intranet; then the Sites button. Click the Advanced button then add the network drive (in our example this would be "file://p:" without the quotes) when you do this it will more than likely resolve to the name of the file server which is expected. Click OK button all the way back. Open your project and the message should now be gone.
- 5/25/2011
- MrFrankieG
- 2/13/2011
- chassykes
Why not add a button or checkmark on the "Project location not trusted" dialog box
called "Trust this location"
Microsoft wrote the OS, Framework, Visual Studio and the security around all the components. You have everything you need to make this easier rather than have users jump through hoops even BEFORE we start to write code.
- 1/3/2011
- dks99
- 10/11/2010
- Paul__Hickman
- 9/18/2010
- Paul Vencill
for information on getting around problems trying to use Visual Studio in a VM (VM Fusion under MACOS) accessing the files using \\.host\Shared Folders\userfiles
Seems Microsoft treats the UNC name \\.host as an INTERNET reference and not a INTRANET reference.
Furthermore, Visual Studio will not PARSE \\.host because of the '.'; you need to use another drive name or share the folders using a different UNC name.
How I wish the world could adopt consistent rules for UNCs
- 10/7/2009
- Keith Dorken
- 6/29/2010
- Stanley Roark
for C:\Users\Owner\Documents\Visual Studio 2008
use C:\Users\Owner\Documents\Visual%20Studio%202008
-- Or you could enclose the string in double quotes:
-- caspol -m -ag 1.2 -url "C:\Users\Owner\Documents\Visual Studio 2008" FullTrust
- 2/6/2010
- MarjieA1
- 3/3/2010
- Danny Thompson
1. Copy the zip file to my directory
2. Rt-click and select Unzip.
- 12/11/2009
- Francois Burianek [MS]
c:\SysInternalsSuite\streams.exe -s -d filepath
This deletes the entire file stream.
- 12/5/2009
- Dennis L. Hughes
Sysinternals has a utility called streams.exe to remove the untrusted zone recursively.
http://intellects.in/2008/11/06/utility-to-recursively-unblock-files-downloaded-from-internet/
- 6/17/2009
- DanGlass
- 6/16/2009
- JanBannister
I chose "All Code" as the Membership condition and "Full Trust" as the permission set. It fixed my problem.
Is there a safer set of settings I should try using? Also, I spoke with someone who "changed the security settings" and didn't have this problem anymore... but can't remember what he did. Is there a setting in Visual Studio 2008 to fix this?
Does this also mean that if I simply add "file://x:/" as a trusted site in Internet Explorer I can get a similar solution?
- 1/15/2009
- Rick Henderson
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
- 8/28/2008
- ShiatsuPete
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.
- 7/28/2008
- Tatworth
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.
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.
- 9/14/2007
- RoyPardee
