Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / .NET SDK / November 2003

Tip: Looking for answers? Try searching our database.

code access security

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Chris - 31 Oct 2003 20:55 GMT
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
"Shawn Farkas [MS]" - 14 Nov 2003 01:17 GMT
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

Signature

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/cpyright.htm

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
[quoted text clipped - 12 lines]
>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
[quoted text clipped - 26 lines]
>
>Christian

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.