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 / CLR / October 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 21:19 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
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.

Rate this thread:







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.