|
security
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
PrincipalPermission.Demand() returns: Request for principal permission failed1) In IIS directory security, I've disabled Anonymous access and enabled Integrated Windows Authentication. 2) Created a local windows group called "TESTERS" 3) Created a local windows user called "TESTUSER" 4) I run the following code: Dim sDomain_User as string = "MyLocalMachine\TESTUSER" Dim sAuthGroup as string = "MyLocalMachine\TESTERS" Dim oPrincipalPerm1 As New PrincipalPermission(sDomain_User, sAuthGroup) oPrincipalPerm1.Demand() The exception: Request for principal permission failed is returned. Can anybody Help? If anybody can help I'd really appreciate it! -------------------------------- From: Dan Woodring -------------------------------- From: Dan Woodring ----------------------- Posted by a user from .NET 247 (http://www.dotnet247.com/) <Id>Tj9/hzg5DUiRE0AuPCEMkg==</Id> What does Thread.CurrentPrincipal.Identity.Name say and what do you get with
Thread.CurrentPrincipal.IsInRole("mylocalmachine\TESTERS")? That should probably work as long as that user was actually authenticated, but checking the above things will help troubleshoot. HTH, Joe K. Show quoteHide quote "Dan Woodring via .NET 247" <anonym***@dotnet247.com> wrote in message news:uDzFho0IFHA.720@TK2MSFTNGP10.phx.gbl... > I'm having a PrincipalPermission problem. Here's what I've done: > 1) In IIS directory security, I've disabled Anonymous access and enabled > Integrated Windows Authentication. > 2) Created a local windows group called "TESTERS" > 3) Created a local windows user called "TESTUSER" > 4) I run the following code: > Dim sDomain_User as string = "MyLocalMachine\TESTUSER" > Dim sAuthGroup as string = "MyLocalMachine\TESTERS" > Dim oPrincipalPerm1 As New PrincipalPermission(sDomain_User, sAuthGroup) > oPrincipalPerm1.Demand() > > The exception: Request for principal permission failed is returned. Can > anybody Help? > > If anybody can help I'd really appreciate it! > -------------------------------- > From: Dan Woodring > > -------------------------------- > From: Dan Woodring > > ----------------------- > Posted by a user from .NET 247 (http://www.dotnet247.com/) > > <Id>Tj9/hzg5DUiRE0AuPCEMkg==</Id>
Assembly.Load fails after assembly preloaded using Assembly.LoadFrom (v1.1.4322)
IIS Authentication Problem? AddDomain with FullTrust get remote server's SSL public key SignedXml fails under .NET 2.0 Beta WinForms App Security Error .NET thin control & IE Encrypting data using System.Security.Cryptography/ Decrypting w/PGP Help on Data Security choice ? StrongNameIdentityPermission and Web Services |
|||||||||||||||||||||||