Active Dirctory Permissions

Working on AD I found that permissions play a huge part in allowing access to directory objects.
I think that creating a new abject without using any kind of elevation of privileges is a very bad
idea as you will get an exception that is not very useful. So to counter this heart ache we use elevation.

Elevation Code 

DirectoryServicesPermission dPermission = new DirectoryServicesPermission
(System.Security.Permissions.PermissionState.Unrestricted);

dPermission.Assert();

Hope this helps with AD!

Laughing

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Add comment


(Will show your Gravatar icon)  

  Country flag

biuquote
  • Comment
  • Preview
Loading



 

Dilbert of the day