Hi,
Regarding : code access security
when an assembly is loaded by the runtime does the runtime check the
evidence of the assembly. Then depending on the evidence does it assign the
assembly to a codeGroup. And finally, depending on the permission sets
assigned to the Codegroup (the assembl belongs to) is it allowed (or not) to
execute specific tasks.
My question is ? how can I make my assembly belong to a specific code group
?
Here's what I did :
Using the tool mscorcfg.msc did I :
1) create a MyPermissionSet
2) assign a few permissions to the set such as FileIO and FileDialog
3) create a My_CodeGroup
4) assigned the MyPermissionSet to My_CodeGroup
Now, how can I have a MyApplication (assembly) belong to My_CodeGroup ?
Thnx
Christian
Eric Cadwell - 31 Oct 2003 23:31 GMT
replied to in Framwork list.
Please don't cross post. There is a "public.dotnet.security" group which
appears to be the only group you did not post to.
-Eric
Michael Green - 01 Nov 2003 00:47 GMT
Chris,
Code Access Security Code Groups have two attributes:
1) The permission set
2) The membership condition.
The permission set is, as the name implies, the set of permissions granted
to code that is a member of the code group. The membership condition allows
the CLR to determine whether a piece of code belongs to a particular code
group. Membership conditions can be one of the following:
Application Directory
Hash
Publisher
Site
Strong Name
URL
IE Zone
For example say you want all code run from a specific server (say
http://mysite to belong to a codegroup. You could set the membership
condition to Site and specify "mysite".
I hope this is helpful,
Thanks,
Michael Green
Microsoft Developer Support
This posting is provided "AS IS" with no warranties, and confers no rights.
Please reply to newsgroups only.