Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Whenever I try to open my own projects in VS 2010 Express, I get the following message:

You should only open projects from a trustworthy source

I can click OK on the message and open the solution, but I would prefer to not get warned every time I open my solution.

The files were not downloaded from the Internet; they are sitting right on my department's network drive. There's nothing to unblock if I look at the Properties window for the project file.

Any tips for squashing this bug will be appreciated.

share|improve this question
    
Have you tried setting your share to fulltrust or not? –  Martijn B Dec 2 '11 at 9:11

5 Answers 5

First, this is not a bug. It's a feature intended to save the more gullible users who might just open something from an untrustworthy source. The local network drive is in the same security zone (or similar) to that of the world wide web.

To answer your question though, here's a tutorial on how to get rid of the annoying message step by step with screenshots.

Fixing this is quite easy, just select the project file in the Windows Explorer, right click and open the files properties and click the Unblock button to tell Windows, and Visual Studio, that you trust the file.

enter image description here

share|improve this answer
    
>The files were not downloaded from the Internet...There's nothing to unblock if I look at the Properties window for the project file. –  Zian Choy Jun 25 '10 at 21:37
    
If there isn't an option to unblock then you shouldn't be seeing that message. Does the message appear from other files which you make on your own local computer? –  Daisetsu Jun 25 '10 at 22:34
    
Yes. <spam filter filler...the answer to life is 42...> –  Zian Choy Jan 14 '11 at 23:53
    
I just found someone else with the exact same problem. social.msdn.microsoft.com/Forums/en/vssetup/thread/… Seems that if you specifically run as administrator it clears the problem up. Give that a try. –  Daisetsu Jan 15 '11 at 0:19

The only reported solution to this problem seems to be to map the network share as a local drive.

However, that is not enough as stated in Custom WPF namespace mappings failing in Visual Studio 2010 :

First of all, the problem comes from the fact that the project is not on a local drive which creates some issues within the Visual Studio environment.

To solve the problem:

  1. Make sure that the project is opened using a mapped drive (like P:/Projects/.../mySolution.sln). Be careful, this means that mapping the drive is not sufficient; you have to open it from the mapped path (from a file explorer windows using the mapped drive). If you keep loading it using the "recent projects" menu in VS, the path will still be absolute.

  2. Modify the development environment config file called devenv.exe.config and add <loadFromRemoteSources enabled="true" /> in the section configuration/runtime. This file is located on the drive VS is installed on.

[EDIT]

As you say this answer does not address your problem, and as this is the only problem for which a solution is available, I suggest that you let Microsoft know about your problem.

I think that this behavior is hard-built into VS 2010, so nothing short of a fix to the product itself can solve the problem.

In any way, all you have to do is accept each project once to get rid of the message for this project forever on this computer.

share|improve this answer
    
At least in my case, I am loading the solution from a mapped drive and I have modified the configuration file and I still get the error. The Stack Overflow question you are referencing is describing a separate issue. This answer solves not being able to load assemblies from a network share, not the error message in the original question. –  heavyd Nov 30 '11 at 20:20
    
Have you tried loading the project from Explorer by double-clicking on the .sln file? That worked in the quoted question. –  harrymc Nov 30 '11 at 20:35
    
Yes I have, and like I said the quoted question is addressing a different problem. –  heavyd Dec 1 '11 at 1:02
    
Added an edit. Probably not what you are wishing to hear. –  harrymc Dec 1 '11 at 8:38
    
I'm afraid your edit might be correct, that is except for the last sentence. Its not an accept once and then its gone, its every time I open the solution! Otherwise it wouldn't be as big of a deal. –  heavyd Dec 1 '11 at 12:30

There is some sort issue with the Visual Studio 2010. Check This for more details at Microsoft website Issue listingTrusting network shares in Visual Studio 2010 / .NET 4.0.

This will be triggered not only by originating from the internet (which would allow you to hit Unblock) but also in some other cases, like I think, being on a network share, in the temp or downloads directory. I don't know a way to switch that off wholesale, I"m afraid. You are supposed to be able to do it with Tools>Options>Projects and Solutions>Warn user when project location is not trusted

To avoid the message, you can either

(1) just agree to load; this should suppress the message for whenever you open the project as part of that solution as the same user on the same machine;

or

(2) go to windows explorer, right click on the project file, choose Properties, look at the bottom of the General tab, if there's an Unblock button click on that. You might need to do this for any .user file next to the project as well.

share|improve this answer
    
Downvoter care to comment???????/ –  Niranjan Kala Dec 1 '11 at 11:45
    
The files were not downloaded from the Internet; they are sitting right on my department's network drive. what is the meaning of this statement.. the referred link in my answer explaining all the reason of this error.. If someone who have down voted can put light on this issue and our mistake.. –  Niranjan Kala Dec 1 '11 at 11:47
    
Your solution is either (for one) not a real solution, or for two, what if there is no unblock? –  soandos Dec 1 '11 at 15:14

There are 2 easy ways to do this:

How Do I Allow my Visual Studio .NET Projects to Run from a Network Location?

To grant permission to all your projects in your Visual Studio Projects folder located on the network, follow these 8 steps:

  • Open Microsoft .NET Framework 1.1 Configuration which you'll find under Administrative Tools in the Control Panel.
  • Expand Runtime Security Policy | Machine, | Code Groups | All_Code | LocalIntranet_Zone
  • In the right-hand pane, click Add a Child Code Group.
  • In the dialog that follows choose Create a new code group and fill in a Name like Visual Studio Projects.
  • Optionally, provide a Description for the Code Group. (You'll see the description when you click a Code Group in the left tree, helping you identify the various Code Groups you may have) .
  • In the Condition Type drop down, choose URL
  • For the URL field, type something like this:

    file://YourServer/My Documents/Visual Studio Projects/*
    

Under Use existing permission set, choose FullTrust (that is, if you trust your own applications. If you don't, choose a different permission set or create a new one).


How to: Grant Permissions to Folders and Assemblies

share|improve this answer
    
This will work for version of Visual Studio prior to 2010, but does not solve the problem for VS 2010. I have the network location setup as being trusted and am able to run CLR 2.0 apps from the network. –  heavyd Dec 6 '11 at 2:37

Windows sets zones and decides what files to block based Security Zones. You should check there first.

That is probably why the above answers do not help you. Files on your machine fall under the Local Machine Zone. Those of us that have used IE 4 and 5 probably remember this setting. Starting with IE 6 and XP, the Local Machine zone was locked down and disappeared from the Security tab. There are several ways Windows detects if a file originated from outside the Local Machine Zone. One of the ways is partially shown above, with the unblock button. Files downloaded from a more restrictive zone are marked.

Go under Internet Explorer or Control panel and go to Internet Options. Under Internet Options, click the Intranet zone. It should already have the autodetect intranet option checked. Now click Custom Level and look under Miscellaneous and look for Launch Applications and unsafe files.

Make sure it is set to Enable. If you go into the Internet Zone and do the same thing, it will make it to where you do not get prompts when you run downloaded files. Windows marks files downloaded from the Internet using the alternate data stream. Files from other zones are just straight up intercepted and that's how you get the prompts.

Another method Windows detects files from otherzones is by URL or Network Protocol. If you turn off intranet settings and have a DNS server point a URL back onto a webserver hosted on your local machine, you can get Windows to give you the same warning prompt.

UNC paths are included in the Intranet. http://technet.microsoft.com/en-us/library/cc817500.aspx

This is a list of the Zone settings. http://technet.microsoft.com/en-us/library/cc961173.aspx

More Mark of the Web info: This is probably the best blog post about Mark of the Web and Internet Security Zones.

This is also a good blog post. Especially because it concentrates, not on dumbing down or getting rid of the warnings, but rather talks about why the warnings show up in the first place. It isn't a How-To, but a rather Why-Is.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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