The Project Location is Not Trusted Dialog Box when trying to use Network Location<p class=MsoNormal style="margin-bottom:0pt;line-height:normal"><span style="font-size:12pt;font-family:">The Project Location is Not Trusted Dialog Box <br></span></p> <p class=MsoNormal style="margin-bottom:0pt;line-height:normal"><br><span style="font-size:12pt;font-family:"></span></p> <p class=MsoNormal style="line-height:normal"><span style="font-size:12pt;font-family:">This dialog box appears each time I attempt to create a client project to a folder on my NAS “\\N5200\Development\”.<span>  </span>If I ignore the warning, the project will not run correctly when I attempt to debug or run from this location. </span></p> <p class=MsoNormal><span style="font-size:12pt;line-height:115%;font-family:">I am aware that by default, a UNC path is not a trusted location for a project.<span>  </span>I have tried each of the following without success:</span></p> <p class=MsoNormal><br><span style="font-size:12pt;line-height:115%;font-family:"></span></p> <p class=MsoNormal style="line-height:normal"><b><span style="font-size:16pt;font-family:"><font size=4>Mscorcfg.msc</font></span></b></p> <p class=MsoNormal style="line-height:normal"><span style="font-size:12pt;font-family:">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.</span></p> <p class=MsoNormal style="margin-bottom:0pt;line-height:normal"><span style="font-size:12pt;font-family:">To give a file share FullTrust permission </span></p> <ol type=1> <li class=MsoNormal style="line-height:normal"><span style="font-size:12pt;font-family:">Start Mscorcfg.msc. </span> <li class=MsoNormal style="line-height:normal"><span style="font-size:12pt;font-family:">Expand the <b>Runtime Security Policy</b> node, the <b>Machine</b> node, the <b>Code Groups</b> node, and the <b>All_Code</b> node, and then highlight the <b>LocalIntranet_Zone</b> node.</span> <li class=MsoNormal style="line-height:normal"><span style="font-size:12pt;font-family:">In the right pane, click <b>Add a Child Code Group.</b></span> <li class=MsoNormal style="line-height:normal"><span style="font-size:12pt;font-family:">Choose <b>Create a new code group</b>, enter a name for the code group, and then click <b>Next</b>.</span> <li class=MsoNormal style="line-height:normal"><span style="font-size:12pt;font-family:">Choose a condition type of <b>URL</b>, and enter the UNC path to the share location of your project, using the format <b>file://\\</b><i>N5200\Development</i><b>\*</b> Click <b>Next</b>. </span> <li class=MsoNormal style="line-height:normal"><span style="font-size:12pt;font-family:">Choose <b>Use existing permission set</b> and select <b>FullTrust</b>, and then click <b>Next</b>.</span> <li class=MsoNormal style="line-height:normal"><span style="font-size:12pt;font-family:">Click <b>Finish</b>.</span> <li class=MsoNormal style="line-height:normal"><span style="font-size:12pt;font-family:">Restart Visual Studio.</span></li></ol> <p class=MsoNormal style="line-height:normal"><b><span style="font-size:16pt;font-family:"><font size=4>Caspol.exe</font></span></b></p> <p class=MsoNormal style="line-height:normal"><span style="font-size:12pt;font-family:">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.):</span></p> <p class=MsoNormal style="margin-bottom:0pt;line-height:normal"><span style="font-size:10pt;font-family:">C:\Windows\Microsoft.NET\Framework64\v2.0.50727\caspol -m -ag 1.2 -url \</span><b><span style="font-size:12pt;font-family:">\</span></b><i><span style="font-size:12pt;font-family:">N5200\Development</span></i><b><span style="font-size:12pt;font-family:">\*</span></b><span style="font-size:12pt;font-family:"> </span><span style="font-size:10pt;font-family:">FullTrust</span></p> <p class=MsoNormal style="line-height:normal"><span style="font-size:12pt;font-family:"><br></span></p> <p class=MsoNormal style="line-height:normal"><span style="font-size:12pt;font-family:">What should I do to resolve this issue?<span>  </span>Saving to local machine is not an option.<span>  </span>{Using Vista Ultimate and VS 2005, running all as administrator.}<span>  </span>Thanks.</span></p> <p class=MsoNormal> </p>© 2009 Microsoft Corporation. All rights reserved.Thu, 02 Jul 2009 13:21:33 Z5065fd7c-f2ed-4ddc-8242-19c0eda2a1a1http://social.msdn.microsoft.com/Forums/en-US/vssetup/thread/5065fd7c-f2ed-4ddc-8242-19c0eda2a1a1#5065fd7c-f2ed-4ddc-8242-19c0eda2a1a1http://social.msdn.microsoft.com/Forums/en-US/vssetup/thread/5065fd7c-f2ed-4ddc-8242-19c0eda2a1a1#5065fd7c-f2ed-4ddc-8242-19c0eda2a1a1Phil2834http://social.msdn.microsoft.com/Profile/en-US/?user=Phil2834The Project Location is Not Trusted Dialog Box when trying to use Network Location<p class=MsoNormal style="margin-bottom:0pt;line-height:normal"><span style="font-size:12pt;font-family:">The Project Location is Not Trusted Dialog Box <br></span></p> <p class=MsoNormal style="margin-bottom:0pt;line-height:normal"><br><span style="font-size:12pt;font-family:"></span></p> <p class=MsoNormal style="line-height:normal"><span style="font-size:12pt;font-family:">This dialog box appears each time I attempt to create a client project to a folder on my NAS “\\N5200\Development\”.<span>  </span>If I ignore the warning, the project will not run correctly when I attempt to debug or run from this location. </span></p> <p class=MsoNormal><span style="font-size:12pt;line-height:115%;font-family:">I am aware that by default, a UNC path is not a trusted location for a project.<span>  </span>I have tried each of the following without success:</span></p> <p class=MsoNormal><br><span style="font-size:12pt;line-height:115%;font-family:"></span></p> <p class=MsoNormal style="line-height:normal"><b><span style="font-size:16pt;font-family:"><font size=4>Mscorcfg.msc</font></span></b></p> <p class=MsoNormal style="line-height:normal"><span style="font-size:12pt;font-family:">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.</span></p> <p class=MsoNormal style="margin-bottom:0pt;line-height:normal"><span style="font-size:12pt;font-family:">To give a file share FullTrust permission </span></p> <ol type=1> <li class=MsoNormal style="line-height:normal"><span style="font-size:12pt;font-family:">Start Mscorcfg.msc. </span> <li class=MsoNormal style="line-height:normal"><span style="font-size:12pt;font-family:">Expand the <b>Runtime Security Policy</b> node, the <b>Machine</b> node, the <b>Code Groups</b> node, and the <b>All_Code</b> node, and then highlight the <b>LocalIntranet_Zone</b> node.</span> <li class=MsoNormal style="line-height:normal"><span style="font-size:12pt;font-family:">In the right pane, click <b>Add a Child Code Group.</b></span> <li class=MsoNormal style="line-height:normal"><span style="font-size:12pt;font-family:">Choose <b>Create a new code group</b>, enter a name for the code group, and then click <b>Next</b>.</span> <li class=MsoNormal style="line-height:normal"><span style="font-size:12pt;font-family:">Choose a condition type of <b>URL</b>, and enter the UNC path to the share location of your project, using the format <b>file://\\</b><i>N5200\Development</i><b>\*</b> Click <b>Next</b>. </span> <li class=MsoNormal style="line-height:normal"><span style="font-size:12pt;font-family:">Choose <b>Use existing permission set</b> and select <b>FullTrust</b>, and then click <b>Next</b>.</span> <li class=MsoNormal style="line-height:normal"><span style="font-size:12pt;font-family:">Click <b>Finish</b>.</span> <li class=MsoNormal style="line-height:normal"><span style="font-size:12pt;font-family:">Restart Visual Studio.</span></li></ol> <p class=MsoNormal style="line-height:normal"><b><span style="font-size:16pt;font-family:"><font size=4>Caspol.exe</font></span></b></p> <p class=MsoNormal style="line-height:normal"><span style="font-size:12pt;font-family:">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.):</span></p> <p class=MsoNormal style="margin-bottom:0pt;line-height:normal"><span style="font-size:10pt;font-family:">C:\Windows\Microsoft.NET\Framework64\v2.0.50727\caspol -m -ag 1.2 -url \</span><b><span style="font-size:12pt;font-family:">\</span></b><i><span style="font-size:12pt;font-family:">N5200\Development</span></i><b><span style="font-size:12pt;font-family:">\*</span></b><span style="font-size:12pt;font-family:"> </span><span style="font-size:10pt;font-family:">FullTrust</span></p> <p class=MsoNormal style="line-height:normal"><span style="font-size:12pt;font-family:"><br></span></p> <p class=MsoNormal style="line-height:normal"><span style="font-size:12pt;font-family:">What should I do to resolve this issue?<span>  </span>Saving to local machine is not an option.<span>  </span>{Using Vista Ultimate and VS 2005, running all as administrator.}<span>  </span>Thanks.</span></p> <p class=MsoNormal> </p>Mon, 14 May 2007 18:24:10 Z2007-05-18T02:50:02Zhttp://social.msdn.microsoft.com/Forums/en-US/vssetup/thread/5065fd7c-f2ed-4ddc-8242-19c0eda2a1a1#bb7d472e-69fe-4d8c-a069-46a7f9f47580http://social.msdn.microsoft.com/Forums/en-US/vssetup/thread/5065fd7c-f2ed-4ddc-8242-19c0eda2a1a1#bb7d472e-69fe-4d8c-a069-46a7f9f47580Phil2834http://social.msdn.microsoft.com/Profile/en-US/?user=Phil2834The Project Location is Not Trusted Dialog Box when trying to use Network Location<p class=MsoNormal style="margin-bottom:0pt;line-height:normal"><b><span style="font-size:13.5pt;font-family:">Two part process:</span></b><span style="font-size:12pt;font-family:"></span></p> <p class=MsoNormal style="line-height:normal"><span style="font-size:12pt;font-family:"> </span></p> <p class=MsoNormal style="line-height:normal"><b><span style="font-size:13.5pt;font-family:">STEP #1</span></b><span style="font-size:12pt;font-family:"></span></p> <p class=MsoNormal style="line-height:normal"><b><span style="font-size:13.5pt;font-family:">Mscorcfg.msc</span></b><span style="font-size:12pt;font-family:"></span></p> <p class=MsoNormal style="line-height:normal"><span style="font-size:12pt;font-family:">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.</span></p> <p class=MsoNormal style="margin-bottom:0pt;line-height:normal"><span style="font-size:12pt;font-family:">To give a file share FullTrust permission </span></p> <ol type=1> <li class=MsoNormal style="line-height:normal"><span style="font-size:12pt;font-family:">Start Mscorcfg.msc. or from the Start Menu, Admin Tools, <b>Microsoft .NET Framework 2.0 Configuration</b> </span> <li class=MsoNormal style="line-height:normal"><span style="font-size:12pt;font-family:">Expand the <b>Runtime Security Policy</b> node, the <b>Machine</b> node, the <b>Code Groups</b> node, and the <b>All_Code</b> node. </span> <li class=MsoNormal style="line-height:normal"><span style="font-size:12pt;font-family:">In the right pane, click <b>Add a Child Code Group.</b> </span> <li class=MsoNormal style="line-height:normal"><span style="font-size:12pt;font-family:">Choose <b>Create a new code group</b>, enter a name (<span style="color:red">VS Developmenmt</span>)for the code group, and then click <b>Next</b>. </span> <li class=MsoNormal style="line-height:normal"><span style="font-size:12pt;font-family:">Choose a condition type of <b>URL</b>, and enter the UNC path to the share location of your project, using the format <b>\\<i>servername</i>\<i>sharename</i>\*</b> where <b>\\</b><i>servername</i><b>\</b><i>sharename</i> (<span style="color:red">\\N5200\*</span>) is the name of the share. Click <b>Next</b>.  </span> <li class=MsoNormal style="line-height:normal"><span style="font-size:12pt;font-family:">Choose <b>Use existing permission set</b> and select <b>FullTrust</b>, and then click <b>Next</b>. </span> <li class=MsoNormal style="line-height:normal"><span style="font-size:12pt;font-family:">Click <b>Finish</b>.</span> <li class=MsoNormal style="line-height:normal"><span style="font-size:12pt;font-family:">Select your new code group, right click, and select <b>Properties</b></span> <li class=MsoNormal style="line-height:normal"><span style="font-size:12pt;font-family:">Under the General tab, <b>check the two boxes</b> under the &quot;If the membership condition is met&quot; statement, then click <b>Apply</b></span> <li class=MsoNormal style="line-height:normal"><span style="font-size:12pt;font-family:">Close Mscorcfg, Reboot Machine</span> <li class=MsoNormal style="line-height:normal"><span style="font-size:12pt;font-family:">Restart Visual Studio - You will now be able to create a new project without The Project Location is not Trusted Dialog Box.  However, you will not be able to Debug until you <b>choose a zone for your partial-trust application</b></span></li></ol> <p class=MsoNormal style="margin-bottom:0pt;line-height:normal"><span style="font-size:18pt;font-family:">Step #2<br><b>choose a zone for your partial-trust application<br>&lt;!--[endif]--&gt;</b></span><span style="font-size:12pt;font-family:"></span></p> <ol type=1> <li class=MsoNormal style="line-height:normal"><span style="font-size:12pt;font-family:">From the <b>Project</b> menu, choose <i>Projectname</i> <b>Properties</b>.</span> <li class=MsoNormal style="line-height:normal"><span style="font-size:12pt;font-family:">In the <i>Projectname</i> property pages, click the <b>Security</b> page.</span> <li class=MsoNormal style="line-height:normal"><span style="font-size:12pt;font-family:">Select <b>Enable ClickOnce Security Settings</b>.</span> <li class=MsoNormal style="line-height:normal"><span style="font-size:12pt;font-family:">Under <b>Zone your application will be installed from</b>, click the drop-down listbox and choose the zone you want to simulate the application being installed from.</span></li></ol> <p class=MsoNormal style="margin-left:0.5in;line-height:normal"><span style="font-size:12pt;font-family:">The <b>Permissions required by the application</b> grid shows all available permissions. The check mark indicates permissions granted to your application</span></p> <ol type=1 start=5> <li class=MsoNormal style="line-height:normal"><span style="font-size:12pt;font-family:">If the zone you choose was <b>(Custom)</b>, select the correct custom settings in the <b>Setting</b> column of the <b>Permissions</b> grid.</span> <li class=MsoNormal style="line-height:normal"><span style="font-size:12pt;font-family:">Click <b>OK</b> to close the property pages.</span></li></ol> <p class=MsoNormal style="line-height:normal"> </p>Tue, 15 May 2007 21:34:11 Z2007-05-18T02:50:02Zhttp://social.msdn.microsoft.com/Forums/en-US/vssetup/thread/5065fd7c-f2ed-4ddc-8242-19c0eda2a1a1#7c7a7fc6-dd52-46b5-9018-59d8f38085d3http://social.msdn.microsoft.com/Forums/en-US/vssetup/thread/5065fd7c-f2ed-4ddc-8242-19c0eda2a1a1#7c7a7fc6-dd52-46b5-9018-59d8f38085d3CraigC_qbMaxhttp://social.msdn.microsoft.com/Profile/en-US/?user=CraigC_qbMaxThe Project Location is Not Trusted Dialog Box when trying to use Network LocationWorked Great! Thanks Phill... <p align=left><font face=Arial size=2></font> </p>Wed, 09 Apr 2008 14:52:53 Z2008-04-09T14:52:53Zhttp://social.msdn.microsoft.com/Forums/en-US/vssetup/thread/5065fd7c-f2ed-4ddc-8242-19c0eda2a1a1#6accf0aa-c379-4bab-82ab-7c081d56b21chttp://social.msdn.microsoft.com/Forums/en-US/vssetup/thread/5065fd7c-f2ed-4ddc-8242-19c0eda2a1a1#6accf0aa-c379-4bab-82ab-7c081d56b21cngermainhttp://social.msdn.microsoft.com/Profile/en-US/?user=ngermainThe Project Location is Not Trusted Dialog Box when trying to use Network Location<p>I'm having the same problem but these steps didn't work.  </p> <p align=left> </p> <p align=left>The dialog still appeas every time I open the project and security exceptions are thrown whenever I try to accesss the serial port.  Visual Studio's Project directory are on a network drive, &quot;H:&quot;, so I set the URL condition to &quot;<font face=Verdana>file://H:/Visual Studio 2008/Projects/*&quot;.  I set the Project Properties as described above and rebooted but it still says that the project location is not trusted.</font></p> <p align=left><font face=Verdana></font> </p> <p align=left><font face=Verdana>My Control Panel lead me to</font></p> <p align=left><font face=Verdana>&quot;Microsoft .NET Framework 1.1 Configuration&quot;</font></p> <p align=left><font face=Verdana>is that &quot;1.1&quot; the version of the configuration program or the .NET version?  If it's the .NET version then something is wrong because I've installed .NET 3.5.</font></p> <p align=left><font face=Verdana></font> </p> <p align=left><font face=Verdana>What am I doing wrong?</font></p> <p align=left><font face=Verdana></font> </p> <p align=left><font face=Verdana>thank you so much!</font></p> <p align=left><font face=Arial size=2></font> </p>Tue, 15 Apr 2008 20:08:43 Z2008-04-15T20:08:43Zhttp://social.msdn.microsoft.com/Forums/en-US/vssetup/thread/5065fd7c-f2ed-4ddc-8242-19c0eda2a1a1#95ede09e-b50b-40a0-b0b1-5f685da33d35http://social.msdn.microsoft.com/Forums/en-US/vssetup/thread/5065fd7c-f2ed-4ddc-8242-19c0eda2a1a1#95ede09e-b50b-40a0-b0b1-5f685da33d35bac260http://social.msdn.microsoft.com/Profile/en-US/?user=bac260The Project Location is Not Trusted Dialog Box when trying to use Network LocationThe procedure above assumes that the network share is located in the Intranet Zone. For some reason, Windows thought my Buffalo Linkstation (NAS) was located in the Internet Zone instead of IntraNet so all the forum postings that talked about changing the security policies didn't work because the location was in the wrong zone!<br><br>So first check what zone your shared folder is located in by navigating there in Windows Explorer and checking the zone icon in the status bar (if the status bar is not visible, select <b>View-&gt;Status Bar</b> from the menu).<br><br>As far as I know, the .net framework uses the same zone settings as Internet Explorer so one way to change the zone of the network folder (if the folder is in the wrong zone), is to open Internet Explorer and go to <b>Tools-&gt;Internet Options-&gt;Security</b> and click on Local IntraNet. Then click the Sites button then the Advanced button. Finally, in the textbox labelled &quot;Add this website to the zone:&quot; enter the UNC path for the shared folder and click add. For my case, this was file://Buffalo<br><br>Having done that, the Local Intranet icon should now appear when the network share is navigated to in Windows Explorerer and the procedure above using mscorcfg should now work. Be sure to restart Visual Studio after making the security changes.<br><br><br><br><br>Wed, 22 Oct 2008 09:54:45 Z2008-10-22T09:54:45Zhttp://social.msdn.microsoft.com/Forums/en-US/vssetup/thread/5065fd7c-f2ed-4ddc-8242-19c0eda2a1a1#f123ffc9-60ab-4e99-a0c0-52284ce9c12bhttp://social.msdn.microsoft.com/Forums/en-US/vssetup/thread/5065fd7c-f2ed-4ddc-8242-19c0eda2a1a1#f123ffc9-60ab-4e99-a0c0-52284ce9c12bWiyosaya1http://social.msdn.microsoft.com/Profile/en-US/?user=Wiyosaya1The Project Location is Not Trusted Dialog Box when trying to use Network Location<blockquote>The procedure above assumes that the network share is located in the Intranet Zone. For some reason, Windows thought my Buffalo Linkstation (NAS) was located in the Internet Zone instead of IntraNet so all the forum postings that talked about changing the security policies didn't work because the location was in the wrong zone!<br/> <br/> So first check what zone your shared folder is located in by navigating there in Windows Explorer and checking the zone icon in the status bar (if the status bar is not visible, select <strong>View-&gt;Status Bar</strong> from the menu).<br/> <br/> As far as I know, the .net framework uses the same zone settings as Internet Explorer so one way to change the zone of the network folder (if the folder is in the wrong zone), is to open Internet Explorer and go to <strong>Tools-&gt;Internet Options-&gt;Security</strong> and click on Local IntraNet. Then click the Sites button then the Advanced button. Finally, in the textbox labelled &quot;Add this website to the zone:&quot; enter the UNC path for the shared folder and click add. For my case, this was file://Buffalo<br/> <br/> Having done that, the Local Intranet icon should now appear when the network share is navigated to in Windows Explorerer and the procedure above using mscorcfg should now work. Be sure to restart Visual Studio after making the security changes.<br/> <br/> <br/> <br/> <br/></blockquote> This is another solution that works as well.<br/> <br/> I initially had no luck when adding the UNC path to the LocalIntranet_Zone. I then found a post somewhere that suggested modifying the permissions on the Internet_Zone. I modified permissions for the Internet_Zone, and the solution loaded and ran without problems.<br/> <br/> However, on searching to post my experience to these forums, I found this post. I added the UNC path to the PC (just the PC that is &quot;\\PC_Name&quot;, not the actual share on the PC) with the share to the Local IntraNet as described above, deleted the code group from the Internet_Zone in the security settings (leaving a similar entry in the LocalIntranet_Zone code group), and the troublesome projects now load without problems and run perfectly.Thu, 02 Jul 2009 13:20:50 Z2009-07-02T13:20:50Z