Tim Huffam

Dotting the I and crossing the T of I.T.

  Home  |   Contact  |   Syndication    |   Login
  140 Posts | 0 Stories | 1468 Comments | 659 Trackbacks

News

Archives

Post Categories

Interesting Blogs/Links

This error occurred when trying to run code that accessed the System.DirectoryServices namespace.

To work around this, just open up your .NET 2.0 security:

  1. Start the .NET Framework 2.0 Configuration tool (from Administrative Tools).
  2. Expand Runtime Security Policy.
  3. Expand User - Code Groups and right-click on All_Code and select Properties.
  4. On the Membership Condition tab make sure All Code is selected in the dropdownlist.
  5. On the Permission Set tab make sure FullTrust is selected in the dropdownlist.
  6. Click OK
  7. Under Runtime Security Policy, expand Machine - Code Groups and right-click on All_Code and select Properties.
  8. Perform steps 4 - 6.

HTH

Tim

 

posted on Wednesday, March 08, 2006 1:40 PM

Feedback

# re: .NET 2.0 error: Request for the permission of type 'System.DirectoryServices.DirectoryServicesPermission, System.DirectoryServices, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' failed. 8/1/2006 8:04 AM Roger
Yes ! it works ! thanks a lot...

# re: .NET 2.0 error: Request for the permission of type 'System.DirectoryServices.DirectoryServicesPermission, System.DirectoryServices, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' failed. 8/8/2006 12:09 PM Franklin
Yes, that works but I dont want to do this on every client machine.
Is there another way to solve this issue without going to the .Net Framework Configuration tool?

# re: .NET 2.0 error: Request for the permission of type 'System.DirectoryServices.DirectoryServicesPermission, System.DirectoryServices, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' failed. 9/5/2006 11:58 PM Dave
This post assumes you have the .NET 2.0 SDK installed, because the Configuration Tool is only available in the SDK, a 354MB download. I'm not going to download and install a huge package like that just to get one file, and definetly not on all of my users computers. Does anyone else have another solution? Perhaps a registry hack or something? thanks

# re: .NET 2.0 error: Request for the permission of type 'System.DirectoryServices.DirectoryServicesPermission, System.DirectoryServices, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' failed. 9/6/2006 12:05 AM Dave
I noticed that I only got this error when running my executable off of a network drive. Once I copied it to a location on my local hard drive I was able to run it without getting this error.

# re: .NET 2.0 error: Request for the permission of type 'System.DirectoryServices.DirectoryServicesPermission, System.DirectoryServices, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' failed. 9/15/2006 9:50 AM Vincent Pradeep.S
I got the same problem my code is working in my local system. In the server its giving the same error. Give me any other solution for this.

# re: .NET 2.0 error: Request for the permission of type 'System.DirectoryServices.DirectoryServicesPermission, System.DirectoryServices, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' failed. 1/4/2007 7:57 PM Daniel hobbs
Just what I needed. Many thanks.

# re: .NET 2.0 error: Request for the permission of type 'System.DirectoryServices.DirectoryServicesPermission, System.DirectorySe 12/1/2009 8:05 PM Hue Hung
It works perfect! Many thanks.

Post A Comment
Title:
Name:
Email:
Website:
Comment:
Verification: