Questions tagged [windows-identity]

Use this tag to better reference questions about WindowsIdentity allowing to encapsulate information about Windows accounts.

The WindowsIdentity object encapsulates information about Windows accounts. You use the WindowsIdentity object if you want to make authorization decisions based on a user's Windows account information.

For example, using WindowsIdentity and WindowsPrincipal objects, you can write an application that requires all users to be currently validated by a Windows NT or Windows 2000 domain. You can also allow certain domain accounts to access your application while denying access to others.

To find more information :

204 questions
1
vote
1 answer

Using PrincipalContext to ValidateCredentials fails with right password after sending many wrong passwords

using (PrincipalContext pc = new PrincipalContext(ContextType.Domain, domainName)) { isWindowsAutenticated = pc.ValidateCredentials(username, password); } If pass to this code many wrong passwords for a user, then pass in the right password, it…
TheWommies
  • 4,922
  • 11
  • 61
  • 79
1
vote
2 answers

WIF IDP and SimpleSamlPHP as SP

I have a custom STS made in WIF that works as an IDP and now I need to configure SSO to a Service Provider made in SimpleSamlPHP. (The SP only supports Post Binding and Web Browser SSO Profile.) Any, idea on how should I approach this requirement?…
Beelphegor
  • 226
  • 1
  • 12
1
vote
1 answer

How to assign access rights "Everyone" to a directory

I encounter a problem to assign access rights to "Everyone" on a directory folder "wwwroot" on windows from my little programm in C#. Here's how I do it. //I also try with 'S-1-1-0'/'Everyone' but it's the same result string userPermission =…
Mehdi Bugnard
  • 3,889
  • 4
  • 45
  • 86
1
vote
1 answer

Why do I get a WindowsIdentity when using message security?

When switching from no security to Certificate I get a WindowsIdentity in the IAuthorizationPolicy.Evaluate (evaluationContext.Properties.TryGetValue("Identities", out obj)? Is this by design : From this :
Banshee
  • 15,376
  • 38
  • 128
  • 219
1
vote
1 answer

LogonUser function fails with error code 0 in c#

My objective is to copy a folder from my system to a remote computer in c#. I searched everywhere and found some information on how to do that. I am calling the LogonUser function with the domain, username and password, but it it fails and returns…
Vijay Nag
  • 257
  • 2
  • 9
  • 21
1
vote
3 answers

How can i get the WindowsIdentity or WindowsPrincipal of a WCF Claim / SecurityIdentifier (SID)?

I'm trying to allow all users in the Administrators group access through WCF. internal sealed class AuthorizationManager : ServiceAuthorizationManager { public override bool CheckAccess(OperationContext operationContext) { …
Simmen
0
votes
3 answers

HTTPContext.Current.User.Identity.Name not working inside a control?

I have a label and I want to set text of this label to HTTPContext.Current.User.Identity.Name So I wrote Text = '<%=HTTPContext.Current.User.Identity.Name %>' but it doesn't work, however when I wrote this outside of the lable for…
HOY
  • 1,067
  • 10
  • 42
  • 85
0
votes
1 answer

Protecting WIF-based sessions from Related Domain Cookie Attacks

How should I implement additional security to a WIF-based authentication session to protect myself from Related Domain Cookie Attacks that target authentication?
makerofthings7
  • 60,103
  • 53
  • 215
  • 448
0
votes
1 answer

Request.ServerVariables("LOGON USER") returns empty

Web.config file IIS permissions (Unchecked)Enable ananymouse access (Checked)Integrated windows authentication C# code, welcomeUser.InnerText =…
HOY
  • 1,067
  • 10
  • 42
  • 85
0
votes
1 answer

C# - Get ASPNET WindowsIdentity

I'd like to give the ASPNET user Full Control over several files, but it looks like I'll need to get the account's token first. Does anyone know how to impersonate the ASPNET account within a desktop app? Thanks!
Charles
  • 6,199
  • 6
  • 50
  • 66
0
votes
1 answer

Security Exception on WindowsIdentity.GetCurrent()

Click Once deplyment. Application runs fine in VS2008. When running the deployed app throws exception on: WindowsIdentity.GetCurrent() Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.0.0,…
theBruce
  • 257
  • 3
  • 16
0
votes
1 answer

STS and Redirecting causing issues with Ajax and also post requests

I've got a site that's integrated with WIF for security and mostly everything is ok. It's redirecting and dealing with load balancers etc. I've noticed on a few requests it's bouncing to the sts and back, if it's a get request not a problem but it's…
RubbleFord
  • 7,456
  • 9
  • 50
  • 80
0
votes
2 answers

Token replays still possible even after implementing DefaultTokenReplayCache in WIF

I've been able to subclass DefaultTokenReplayCache and make it work in my MVC application. This correctly detects tokens that would be replayed from the IDP to the RP by Fiddler or by pressing the Back arrow and resubmitting. My intent now is to…
makerofthings7
  • 60,103
  • 53
  • 215
  • 448
0
votes
2 answers

What value (Cookie, SessionID, variable) best represents a WIF Session?

I want to track a user's logon session from the time they login to my site, to the time they logoff. Is there a pre-existing cookie I should use, or variable? I thought of using ASP.NET sessionIDs but read on StackOverflow that these numbers may…
makerofthings7
  • 60,103
  • 53
  • 215
  • 448
0
votes
1 answer

Customizing the Windows Identity Foundation (WIF) error messages (yellow screen of death)

WIF will send our users the Yellow Screen of Death whenever an error occurs. This can be something such as a token replay, or a old token being sent to the server as shown below: How do I customize the display of this error and also log the…
makerofthings7
  • 60,103
  • 53
  • 215
  • 448