[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Chris

10/31/2003 7:56:00 PM

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




1 Answer

shawnfa

11/14/2003 1:18:00 AM

0

Hi Christian,

You need to add a membership condition to your code group which will match your assembly. The framework ships with several membership
conditions which range from the AllMembershipCondition (which will match everything), to the StrongNameMembershipCondition (which will match
code signed with a specific key).

-Shawn

--

This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cp...

Note: For the benefit of the community-at-large, all responses to this message are best directed to the newsgroup/thread from which they
originated.
--------------------
>From: "Chris" <christianc@pandora.be>
>Newsgroups: microsoft.public.dotnet.framework.sdk
>Subject: code access security
>Lines: 31
>X-Priority: 3
>X-MSMail-Priority: Normal
>X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
>X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
>Message-ID: <d7zob.117403$sv3.5125148@phobos.telenet-ops.be>
>Date: Fri, 31 Oct 2003 19:55:53 GMT
>NNTP-Posting-Host: 213.119.144.149
>X-Complaints-To: abuse@telenet.be
>X-Trace: phobos.telenet-ops.be 1067630153 213.119.144.149 (Fri, 31 Oct 2003 20:55:53 MET)
>NNTP-Posting-Date: Fri, 31 Oct 2003 20:55:53 MET
>Organization: Telenet Internet
>Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed00.sul.t-online.de!t-online.de!newsfeed.icl.net!newsfeed.fjserv.net!skynet.be!
skynet.be!skynet.be!skynet.be!ossa.telenet-ops.be!phobos.telenet-ops.be.POSTED!not-for-mail
>Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.sdk:8022
>X-Tomcat-NG: microsoft.public.dotnet.framework.sdk
>
>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
>
>
>
>
>