Click here to Skip to main content
15,881,248 members
Home / Discussions / C#
   

C#

 
AnswerRe: trapping F1 in a file dialog Pin
dan!sh 15-Jun-10 4:49
professional dan!sh 15-Jun-10 4:49 
GeneralRe: trapping F1 in a file dialog Pin
mla15415-Jun-10 5:12
mla15415-Jun-10 5:12 
GeneralRe: trapping F1 in a file dialog Pin
Dave Kreskowiak15-Jun-10 5:25
mveDave Kreskowiak15-Jun-10 5:25 
GeneralRe: trapping F1 in a file dialog [modified] Pin
mla15415-Jun-10 5:30
mla15415-Jun-10 5:30 
GeneralRe: trapping F1 in a file dialog Pin
Dave Kreskowiak15-Jun-10 7:05
mveDave Kreskowiak15-Jun-10 7:05 
GeneralRe: trapping F1 in a file dialog Pin
dan!sh 15-Jun-10 5:57
professional dan!sh 15-Jun-10 5:57 
QuestionCreating Calendar folders using WebDav and C# Pin
vonb15-Jun-10 4:10
vonb15-Jun-10 4:10 
QuestionAzMan Authorization provider and Security problem [modified] Pin
karanba15-Jun-10 3:01
karanba15-Jun-10 3:01 
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

AnswerRe: AzMan Authorization provider and Security problem Pin
R. Giskard Reventlov15-Jun-10 3:58
R. Giskard Reventlov15-Jun-10 3:58 
Questionadd property to Object OR String .... Pin
jojoba201115-Jun-10 2:31
jojoba201115-Jun-10 2:31 
AnswerRe: add property to Object OR String .... Pin
Peace ON15-Jun-10 2:46
Peace ON15-Jun-10 2:46 
QuestionRe: add property to Object OR String .... [modified] Pin
jojoba201115-Jun-10 2:51
jojoba201115-Jun-10 2:51 
AnswerRe: add property to Object OR String .... Pin
Luc Pattyn15-Jun-10 3:03
sitebuilderLuc Pattyn15-Jun-10 3:03 
QuestionRe: add property to Object OR String .... Pin
jojoba201115-Jun-10 3:04
jojoba201115-Jun-10 3:04 
AnswerRe: add property to Object OR String .... Pin
Luc Pattyn15-Jun-10 3:12
sitebuilderLuc Pattyn15-Jun-10 3:12 
AnswerRe: add property to Object OR String .... Pin
Dave Kreskowiak15-Jun-10 5:19
mveDave Kreskowiak15-Jun-10 5:19 
AnswerStop posting the same question. Pin
Pete O'Hanlon15-Jun-10 3:07
mvePete O'Hanlon15-Jun-10 3:07 
AnswerRe: add property to Object OR String .... PinPopular
J4amieC15-Jun-10 3:13
J4amieC15-Jun-10 3:13 
QuestionRe: add property to Object OR String .... Pin
jojoba201115-Jun-10 3:22
jojoba201115-Jun-10 3:22 
AnswerRe: add property to Object OR String .... Pin
DaveyM6915-Jun-10 3:30
professionalDaveyM6915-Jun-10 3:30 
AnswerRe: add property to Object OR String .... Pin
J4amieC15-Jun-10 5:11
J4amieC15-Jun-10 5:11 
QuestionRe: add property to Object OR String .... Pin
jojoba201115-Jun-10 3:48
jojoba201115-Jun-10 3:48 
AnswerRe: add property to Object OR String .... Pin
Pete O'Hanlon15-Jun-10 4:07
mvePete O'Hanlon15-Jun-10 4:07 
AnswerRe: add property to Object OR String .... Pin
DaveyM6915-Jun-10 4:17
professionalDaveyM6915-Jun-10 4:17 
QuestionRe: add property to Object OR String .... Pin
jojoba201115-Jun-10 4:26
jojoba201115-Jun-10 4:26 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.