Groups | Blog | Home
all groups > visual studio .net general > january 2005 >

visual studio .net general : The project location is not fully trusted by the .NET runtime


Coco
1/27/2005 6:53:03 PM
Hi,

I have fews class libary projects that i keep my file server,
whenever i open the the solution of contains these project from my local
computer
i get the error message

The project location is not fully trusted by the .NET runtime. This is
usually because it is either a network share or mapped to a network share
not on the local machine. If the output path is under the project location,
your code will not execute as fully trusted and you may recieve unexpected
security exceptions."

i have seen a few articles in the web site but it does not really tell me
what is the problem and solution, will i have problem deploying my
application next time?
What willl happend when i develop a windows application that will use these
class libary and run the windows app from my PC?

Carlos J. Quintero [.NET MVP]
1/31/2005 3:06:18 PM
The problem is that with default .NET security settings .NET applications
can not run on file servers, only on hard disk. If you have a vs.net
solution on a file server, the output will be on that file server (bin
subfolder) and vs.net warns you beforehand about the potential problem. So,
you need to adjust the .NET security to full trust that folder on the file
server. See:

http://groups.google.es/groups?hl=es&lr=&threadm=%23xeT%23LPXEHA.1128%40TK2MSFTNGP10.phx.gbl&rnum=1&prev=/groups%3Fhl%3Des%26lr%3D%26q%3Dmicrosoft.public%2BLOcalIntranet_Zone%2BQuintero

--

Carlos J. Quintero

MZ-Tools 4.0: Productivity add-ins for Visual Studio .NET
You can code, design and document much faster.
http://www.mztools.com


"Coco" <Coco@discussions.microsoft.com> escribió en el mensaje
news:602DE3FA-B5D9-4ADE-8F11-A8F230885D51@microsoft.com...
[quoted text, click to view]

Coco
1/31/2005 4:57:02 PM
Hi Carlos,
Thank you for that
another question here, if i give adjust the .NET security to full trust that
folder where i keep my project files, does it mean that the dll developed
from that project files will have the full access right to my server? isn't a
thread o my server?

[quoted text, click to view]
Carlos J. Quintero [.NET MVP]
2/1/2005 2:56:55 PM
Not exactly, it means that the .NET Framework won´t prevent execution of
statements because of lack of .NET security settings, but security settings
outside .NET still apply (Windows security such as ACLs, etc.).

In other words, for example, your DLL tries to execute an statement to write
a file in a folder of the hard disk:

- If the assembly is not fully trusted, the .NET Framework will refuse to
execute that statement. This is code access security.
- If the assembly is fully trusted, the .NET Framework will not refuse to
execute that statement, but maybe the user executing the assembly does not
have rights to write in that folder of the file system. This is Windows
security.

See:

Chapter 8 - Code Access Security in Practice
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetsec/html/THCMCh08.asp
--

Carlos J. Quintero

MZ-Tools 4.0: Productivity add-ins for Visual Studio .NET
You can code, design and document much faster.
http://www.mztools.com


"Coco" <Coco@discussions.microsoft.com> escribió en el mensaje
news:FF344166-BDA1-4381-84D3-ACA4575C58E9@microsoft.com...
[quoted text, click to view]
AddThis Social Bookmark Button