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