Security question

G

Guest

Hi,

I am debugging a solution located in machine A from machine B. The reason is
to test the environment (e.g. COM registry) in machine B yet the source is
only available in machine A.

I get this warning as I open the solution:

---------
The project location \\Satellite\C\etc is not trusted. Running the
application may result in security exceptions when it attempts to perform
actions which require full trust.
---------

How can I give that path full trust? Actually how can I give the whole
Satellite computer (which is machine A) full trust?

Probably a dumb question...
 
W

Wei-Dong XU [MSFT]

Hi,

Thanks for posting at the newsgroup!

This error should be raised by the .Net code-access security(CAS) which is
newly introduced at .Net Framework to provide the control on the code
execution. It is a new security model that can check not only the whole
assembly execution but also the execution of some methods in the assembly.
At the assembly loading time, CAS will collect the assembly evidence and
then grant one permission set to the assembly based on the policy setting
in the box. Then the assembly can be executed by .Net Framework with the
permission from the generated permission set. Since it is a big topic, I'd
suggest this webcast will introduce more information for you regarding
this.
Support WebCast: .NET Code Access Security
http://support.microsoft.com/?id=324789

Mostly speaking, the default policy setting in .Net is to trust all the
assemblies loaded from the local file system. For your scenario, the folder
in machine A is not the local folder, so machine B will not treat it as
trusted. So I have several suggestions for you:

1. If your scenario permits, you can close your CAS checking at Machine B
by using the CAS utility.
Please open the VS.net command prompt from VS.net menu item in Start.
Type "caspol -s off" (without quotation mark) to temporarily turn off the
CAS. Then you can have a debugging to see whether that error appears.

2. If you are debugging one assembly located at the remote folder, we can
use the .Net framework configuration utility to specify the assembly from
that folder as the trusted so that yout debugging can work as expected.
This kb article introduces the detailed steps for you:
How to adjust security settings for Framework applications that are running
from a network share
http://support.microsoft.com/?id=897296
* if you are using .net 2.0, this article also applied to your scenario. We
can use the .Net Framework 2.0 configuration tool on the adjustment.

3. The file share path (\\remoteserver\folder) is treated in the Intranet
zone at CAS. We can configure the Intranet zone as Full Trust.
a. Please open .Net Configuration utility(start->control
panel->Administrative Tools),
b. expand the node at the left panel and select the node "Runtime security
Policy",
c. then click the link "Adjust Zone Security". Choose the first option
"Make changes to this machine"
d. then click the Intranet zone and set it as full trust

Though I mark the three suggestions as number ordering, they each should
work for you to keep the error message away from the debugging.

Please feel free to let me know if you have any further question on this
issue.

Have a nice day!

Best Regards,
Wei-Dong XU
Microsoft Support
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top