469,647 Members | 1,796 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,647 developers. It's quick & easy.

Trust permission opening a project.

Hi,

This is a novists question so please bear with me!

I downloaded a test C# project from 'The Code Project' internet site.
Unzipped the project to my local folder 'C:\Test'. When I open the
project (SingleInstanceApp.csproj file) from within Visual C# I get the
following error dialog:

The project location is not trusted.

Running the application may result in security exceptions when it
attempts to perform actions which require full trust.

I click OK and can compile and run it OK. It's a simple app which does
no file access etc. so I assume for this application the full trust
requirement is not an issue.

When I go into the .NET Framework 2.0 Configuration utility and look at
this node:

Runtime Security Policy\Machine\Code Groups\All_Code\My_Computer_Zone

It has the following description:

Code group grants full trust to all code originating on the local
computer

Assembly evidence must match this membership condition to belong to the
code group: Zone: MyComputer.

Assemblies matching the membership condition are granted this
permission set at the current policy level: FullTrust.

Permission Set Description:
Allows full access to all resources
I assume it's the 'Assembly evidence must match' part that is causing
me trouble. My question is, what do I need to do to get rid of this
error and ensure that the project gets Full trust status. BTW. The
projects that I have created from scratch do not have this problem when
I open the project.

TIA.

John.

Jul 26 '06 #1
2 1780
<Jo********@hotmail.co.ukwrote in message
news:11**********************@p79g2000cwp.googlegr oups.com...
Hi,

This is a novists question so please bear with me!

I downloaded a test C# project from 'The Code Project' internet site.
Unzipped the project to my local folder 'C:\Test'.
When you download a file, it gets flagged as originating from outside the
local machine. When you extract a downloaded zip archive, each extracted
file receives the same flag. This means that all your project files appear
to be located in the internet zone, which is why they are receiving only a
partial CAS permission grant. The best way to avoid this problem is to
remove the flag from the zip archive before extracting it. To do so,
right-click the zip file, select the Properties item from the context menu,
then click the Unblock button on the General tab of the file properties
dialog.

When I open the
project (SingleInstanceApp.csproj file) from within Visual C# I get the
following error dialog:

The project location is not trusted.

Running the application may result in security exceptions when it
attempts to perform actions which require full trust.

I click OK and can compile and run it OK. It's a simple app which does
no file access etc. so I assume for this application the full trust
requirement is not an issue.
It may or may not be. If you compiled the app on your machine, it probably
isn't being flagged as originating elsewhere, so chances are that it's
receiving an unrestricted CAS permission grant.

>
When I go into the .NET Framework 2.0 Configuration utility and look at
this node:

Runtime Security Policy\Machine\Code Groups\All_Code\My_Computer_Zone

It has the following description:

Code group grants full trust to all code originating on the local
computer

Assembly evidence must match this membership condition to belong to the
code group: Zone: MyComputer.

Assemblies matching the membership condition are granted this
permission set at the current policy level: FullTrust.

Permission Set Description:
Allows full access to all resources
I assume it's the 'Assembly evidence must match' part that is causing
me trouble. My question is, what do I need to do to get rid of this
error and ensure that the project gets Full trust status. BTW. The
projects that I have created from scratch do not have this problem when
I open the project.

TIA.

John.
Jul 26 '06 #2
Thanks Nicole, I'll try that.

Nicole Calinoiu wrote:
<Jo********@hotmail.co.ukwrote in message
news:11**********************@p79g2000cwp.googlegr oups.com...
Hi,

This is a novists question so please bear with me!

I downloaded a test C# project from 'The Code Project' internet site.
Unzipped the project to my local folder 'C:\Test'.

When you download a file, it gets flagged as originating from outside the
local machine. When you extract a downloaded zip archive, each extracted
file receives the same flag. This means that all your project files appear
to be located in the internet zone, which is why they are receiving only a
partial CAS permission grant. The best way to avoid this problem is to
remove the flag from the zip archive before extracting it. To do so,
right-click the zip file, select the Properties item from the context menu,
then click the Unblock button on the General tab of the file properties
dialog.

When I open the
project (SingleInstanceApp.csproj file) from within Visual C# I get the
following error dialog:

The project location is not trusted.

Running the application may result in security exceptions when it
attempts to perform actions which require full trust.

I click OK and can compile and run it OK. It's a simple app which does
no file access etc. so I assume for this application the full trust
requirement is not an issue.

It may or may not be. If you compiled the app on your machine, it probably
isn't being flagged as originating elsewhere, so chances are that it's
receiving an unrestricted CAS permission grant.


When I go into the .NET Framework 2.0 Configuration utility and look at
this node:

Runtime Security Policy\Machine\Code Groups\All_Code\My_Computer_Zone

It has the following description:

Code group grants full trust to all code originating on the local
computer

Assembly evidence must match this membership condition to belong to the
code group: Zone: MyComputer.

Assemblies matching the membership condition are granted this
permission set at the current policy level: FullTrust.

Permission Set Description:
Allows full access to all resources
I assume it's the 'Assembly evidence must match' part that is causing
me trouble. My question is, what do I need to do to get rid of this
error and ensure that the project gets Full trust status. BTW. The
projects that I have created from scratch do not have this problem when
I open the project.

TIA.

John.
Jul 26 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Peter Olcott | last post: by
12 posts views Thread by Russ | last post: by
3 posts views Thread by musosdev | last post: by
reply views Thread by Atul Thombre | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.