4

I'm having the problem described in this SO question when using Visual Studio T4 templates on a network share. The solution specified is to add your file share to your Trusted Sites Zone via Internet Explorer.

Here are two more guides on doing the same process, both via IE

While I am an admin on my machine, some of the settings on IE are locked by our enterprise system administrator:

IE Security Zone Settings

While it's certainly a possible route to go to change our enterprise wide trusted sites, it seems heavy handed for a use case that really only affects me, as someone with full administrator over their own machine to boot.

Is there any other way to add a Trusted Site?

As a workaround, and proof that this is the root of the issue. When I use the same exact files on C:\Projects it works fine, but H:\Projects (which maps to a network share) throws the error. Yes, I could just migrate everything to C Drive, but we have a process already in place that makes that option inconvenient.

  • What did your enterprise system administrator have to say? – Michael Hampton Nov 6 '17 at 17:03
  • @MichaelHampton, looking to gather info before bugging dev ops – KyleMit Nov 6 '17 at 17:06
  • You should have gone to them first. This isn't really something we can help you with. – Michael Hampton Nov 6 '17 at 17:16
  • @MichaelHampton, I mean fair enough I suppose. Regardless of the asker's organizational status, it's a question about if there's a vehicle for changing a setting on a PC. That seems within the wheelhouse of what ServerFault is for, but you'd know better than I. – KyleMit Nov 6 '17 at 17:55
  • 2
    @MichaelHampton, agreed, I can't change that setting - the question is "Is there any other way to add a Trusted Zone?" Turns out the answer is yes (see my answer below identified by my sys admin). The underlying frustration is that Trusted Zones are just acting as a shortcut for triggering UAC, which I have the permission to accept or reject and would be happy doing so on a case by case basis. However, some products (Visual Studio in this case) just have poor error handling when attempting an action that would normally invoke UAC and throw an error instead. – KyleMit Nov 7 '17 at 18:13
0

Yes, you can do that via registry keys per this Add Trusted Site to Internet Explorer via Registry:

HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\

Add a key with the domain name under there, example google.com, and add a DWORD with a name of * and a value of 2 under that key. This will add that site to the list of trusted sites. The other zones are…

| Value |        Setting        |
|-------|-----------------------|
|   0   | My Computer           |
|   1   | Local Intranet Zone   |
|   2   | Trusted Sites Zone    |
|   3   | Internet Zone         |
|   4   | Restricted Sites Zone |

More info from Microsoft: Internet Explorer security zones registry entries for advanced users

| improve this answer | |
  • If the group policy for Trusted Sites is a computer policy, it may work temporarily, but the manual entry should be removed the next time the computer applies group policy. If the group policy for Trusted Sites is a user policy, creating the machine policy manually may disable the Trusted Sites in the user policy. If your organization wants users to be able to add Trusted Sites in Internet Explorer, a more flexible solution would be for their policy to use registry preferences than the site-to-zone assignment in the group policy administrative templates. – Greg Askew Nov 7 '17 at 18:34
  • 1
    @KyleMit, could you please include an example of how you added the network drive\folder to your trusted site registry settings? I get an error "Specifiy a key without a backslash" when I try to create a key "T:\MyFolder" – EndlessSpace Jul 20 '18 at 19:39
  • 1
    The question is about the network share. This answer is about internet domains :-( – Milan Kerslager Dec 3 '18 at 11:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.