Groups | Blog | Home
all groups > visual studio .net setup > august 2007 >

visual studio .net setup : Making a network folder a trusted location.


dbuchanan
8/20/2007 11:21:54 PM
When opening a Visual Studio Project on a server drive I receive the
following message:

=====================================================
Microsoft Visual Studio
-----------------------------------------------------
/!\ The project location is not trusted:
M:\Folder\ProjectFolder
Running the application may result in security exceptions when it attempts
to perform actions which require full trust.
Click OK to ignore and contiue.
[ ] Do not show thsi message again
[OK][Cancel]
=====================================================

This is my own server. I keep projects there where they can be properly
backed up.
Is there a way I can make this location trusted?
stcheng NO[at]SPAM online.microsoft.com
8/21/2007 12:00:00 AM
Hi dbuchanan,

From your description, you're encountering some security warning(when open
a Visual Studio 2005 project) indicate that the project's location is not
trusted as below, correct?

=========================================
Microsoft Visual Studio
-----------------------------------------------------
/!\ The project location is not trusted:
M:\Folder\ProjectFolder
Running the application may result in security exceptions when it attempts
to perform actions which require full trust.
..........................
=======================================

Based on my experience, for such error, it is likely due to the project(the
Visual Studio will open) is residing in a network share folder(not a
physical local disk). As you mentioned that the project in your case is
residing in your own server(in M:), is "M" a mapped network share folder?
If so, and if you make sure that you want to make that network location
trusted, you can add a .NET code access security group to make the network
location a trusted location on your machine. To "trust" the network
location where you have stored the source file, follow these steps on your
local computer:

1. Start the Microsoft .NET Framework 2.0 Configuration tool. The .NET
Configuration 2.0 window opens.

2. In the left pane of the .NET Configuration 2.0 window, expand Runtime
Security Policy, and then expand Machine.

3. Expand Code Groups, and then expand All_Code.

4. Right-click LocalIntranet_Zone, and then click New. The Create Code
Group dialog box appears.

5. Click to select the Create a new code group option.

6. In the Name box, type "myCodeGroup" (without the quotation marks), and
then click "Next".

7. In the Choose the condition type for this code group box, click URL.

8. To fully trust all files that are located in the source/assemblies
folder, type the following text in the URL box:

- For a UNC share:
file:///\\<serverName>\<shareName>\*
- For a mapped drive:
file:///\\Z:\*

9. Click Next.

10. In the Use existing permission set box, click FullTrust, and then click
Next.

11. Click Finish.

You can now re-open the solution and the error will no longer be displayed.
This resolution would work if you where the only one working with the
source or you could be sure that only one person would attempt to work with
the solution at any time. If you have a two or more people that want access
to the source then we recommend that you use Source Control software. The
following whitepaper is a great resource covering Team Development:

897296 How to adjust security settings for Framework applications that are
running from a network share
http://support.microsoft.com/default.aspx?scid=kb;EN-US;897296

In addition, here are some other resource about .NET framework Code Access
security:

#Support WebCast: .NET Code Access Security
http://support.microsoft.com/default.aspx/kb/324789

#Code Access Security
http://msdn2.microsoft.com/en-us/library/930b76w0.aspx

#Introduction to Code Access Security
http://msdn2.microsoft.com/en-us/library/c5tk9z76.aspx

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead



==================================================

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.



Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.

==================================================


This posting is provided "AS IS" with no warranties, and confers no rights.















dbuchanan
8/21/2007 12:14:00 PM
Steven,

I fianally found where to access this ".NET Framework 2.0 Configuration
tool"? (You didn't tell me!)

But I can't access it.
Immediately after it opens it turns gray and a window opens with this
message:
=========================
Microsoft Windows
--------------------------------------
Microsoft Management Console has stopped working

A problem caused the program to stop working correctly. Windows will close
the program and notify you if a solution is available.
[Debug][Close Program]
=========================

Pressing degung results in nothing.
Pressing close program results in nothing.

Any suggestions?

I am running Windows Vista Enterprise with Visual Studio 2005
Version 8.0.50727.867 (vsvista.050727-8600)
(SP1 and KB932232 (update for vista))



[quoted text, click to view]
stcheng NO[at]SPAM online.microsoft.com
8/24/2007 2:46:04 AM
Thanks for your reply Dbuchanan,

Sorry for the inconvenience that I haven't pointed out the location of CAS
configuration wizard in earlier message.

So from your last reply, you can not even open the wizard on that machine,
correct?

If so, it seems something incorrectly with the framework SDK, since for
.net framework 2.0, the "Framework Configuration Wizard" is installed with
framework SDK. Before we dig further, would you help confirm the following
things:

** whether you've running it as an local administrator

** can you get it work if you switch/logon through another adminstrative
user account?

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


This posting is provided "AS IS" with no warranties, and confers no rights.

stcheng NO[at]SPAM online.microsoft.com
8/28/2007 3:07:43 PM
Hi Dbuchanan,

Have you got any progress on this issue? If you still need any help or have
any questions ,please don't hesitate to post here.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


This posting is provided "AS IS" with no warranties, and confers no rights.


--------------------
[quoted text, click to view]
<DO2NK784HHA.360@TK2MSFTNGHUB02.phx.gbl>
<unc0J4A5HHA.2752@TK2MSFTNGP06.phx.gbl>
[quoted text, click to view]
AddThis Social Bookmark Button