Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. AzMan Authorization provider and Security problem [modified]

AzMan Authorization provider and Security problem [modified]

Scheduled Pinned Locked Moved C#
csharpsysadminsecurityhelpdotnet
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    karanba
    wrote on last edited by
    #1

    Hi, I have a Win Form application (C# Net Framework 3.5) which I try to run on Windows 7. In my local network I set up an AD LDS role to a windows 2008 server. I make an application store by using azman on AD LDS. Define operations, task, roles and roles assignments on it. Using Enterprise Library 5.0 security application block I add an AzMan Authorization Provider to my app.config in Win Form. Here is the properties that I set; Name: MyProvider Application: Application Scope: Audit Identifier Prefix: W Store Location: LDAP://WS2008:389/CN=STR2,CN=WS,DC=PW,DC=COM Type: AzManAuthorizationProvider In Win Form I code like this..

    WindowsIdentity identity = WindowsIdentity.GetCurrent();
    WindowsPrincipal principal = new WindowsPrincipal(identity);

    // Default provider is MyProvider
    IAuthorizationProvider iAuthorizationProvider = AuthorizationFactory.GetAuthorizationProvider();
    bool auth = iAuthorizationProvider.Authorize(principal, "BackUpAdmin");

    the last line gives the following error Application attempted to perform an operation not allowed by the security policy. To grant this application the required permission, contact your system administrator, or use Microsoft .NET Framework Configuration tool. I want to understand why .net apply security policy for the code. How could I grant the application for the required permission. Did it relevant only on Client part (Windows 7), did I do anything on Windows 2008 server. I can reach application store via azman.msc on windows 7... Please inform and advice me.. See the end of this message for details on invoking just-in-time (JIT) debugging instead of this dialog box. ************** Exception Text ************** System.Security.SecurityException: The specified network provider name is invalid. (Exception from HRESULT: 0x800704B4) --->

    karanba

    modified on Tuesday, June 15, 2010 10:55 AM

    R 1 Reply Last reply
    0
    • K karanba

      Hi, I have a Win Form application (C# Net Framework 3.5) which I try to run on Windows 7. In my local network I set up an AD LDS role to a windows 2008 server. I make an application store by using azman on AD LDS. Define operations, task, roles and roles assignments on it. Using Enterprise Library 5.0 security application block I add an AzMan Authorization Provider to my app.config in Win Form. Here is the properties that I set; Name: MyProvider Application: Application Scope: Audit Identifier Prefix: W Store Location: LDAP://WS2008:389/CN=STR2,CN=WS,DC=PW,DC=COM Type: AzManAuthorizationProvider In Win Form I code like this..

      WindowsIdentity identity = WindowsIdentity.GetCurrent();
      WindowsPrincipal principal = new WindowsPrincipal(identity);

      // Default provider is MyProvider
      IAuthorizationProvider iAuthorizationProvider = AuthorizationFactory.GetAuthorizationProvider();
      bool auth = iAuthorizationProvider.Authorize(principal, "BackUpAdmin");

      the last line gives the following error Application attempted to perform an operation not allowed by the security policy. To grant this application the required permission, contact your system administrator, or use Microsoft .NET Framework Configuration tool. I want to understand why .net apply security policy for the code. How could I grant the application for the required permission. Did it relevant only on Client part (Windows 7), did I do anything on Windows 2008 server. I can reach application store via azman.msc on windows 7... Please inform and advice me.. See the end of this message for details on invoking just-in-time (JIT) debugging instead of this dialog box. ************** Exception Text ************** System.Security.SecurityException: The specified network provider name is invalid. (Exception from HRESULT: 0x800704B4) --->

      karanba

      modified on Tuesday, June 15, 2010 10:55 AM

      R Offline
      R Offline
      R Giskard Reventlov
      wrote on last edited by
      #2

      Before anyone will help you you need to cut down on the code dump: just post the fragments that are pertinent to the issue and no more.

      me, me, me "The dinosaurs became extinct because they didn't have a space program. And if we become extinct because we don't have a space program, it'll serve us right!" Larry Niven nils illegitimus carborundum

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups