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
2
votes
0 answers

How Can I Get Client Windows Identity from Published Web Site on IIS?

Server and Client in the same Domain. I am trying to get client windows identity from Published Web Site on IIS. WindowsIdentity identity = WindowsIdentity.GetCurrent(); string userNameWithDomain = identity.Name.ToString(); string identityName =…
Bilgehan
  • 305
  • 1
  • 3
  • 13
2
votes
1 answer

WindowsIdentity always returning the same user regardless who signs in

I am running an application on a secure server (I have to remote in and have to email files to someone for them to put them onto the server, so making changes in code is not a quick process). At one point the service grabs the logged-in user…
TruthOf42
  • 2,017
  • 4
  • 23
  • 38
2
votes
2 answers

List files user has read access to (ASP.NET)

I am wanting to list all the files in a folder that a user has read access to. The user visits the website and can use Forms Authentication for some aspects of the site (e.g. adding links etc), but I want to list files in a given folder using their…
SamWM
  • 5,196
  • 12
  • 56
  • 85
2
votes
1 answer

Successful sign-on using Window Identity/OWIN not producing authenticated user in MVC app

I am able to authenticate against both Facebook and via a local database using Windows Identity and OWIN. I am able to successfully return a ClaimsIdentity in both instances. Without error, I am able to able to sign in that ClaimsIdentity with the…
Mister Epic
  • 16,295
  • 13
  • 76
  • 147
2
votes
1 answer

How do I change the value returned by WindowsIdentity.GetCurrent in ASP.net?

I'm writing an ASP.net application and I'm working with the WindowsIdentity.GetCurrent() function. I want to know how (or if it's possible) to change what identity the ASP.net application runs as. I eventually want to run it as an account…
Vivian River
  • 31,198
  • 62
  • 198
  • 313
2
votes
1 answer

WPF, Active Directory and Custom Role Provider

I have a WPF client/server application using WCF on the server side. It is presently unsecured and I'm wishing to secure it for a userbase on my Active Directory. The application should host it's own Role/Permissions database which can be attached…
BobTheBuilder
  • 2,455
  • 2
  • 27
  • 39
2
votes
2 answers

How to store WindowsIdentity for use at a later, indeterminate time

I've a WCF service that queues and executes commands on behalf of the user at a later, indeterminate time. I was hoping to store the WindowsIdentity as a byte array and stuff it into a database, and then later deserialize and use that object. Some…
dthagard
  • 823
  • 7
  • 23
2
votes
2 answers

.Net Secure Token Service (STS) issuing different Tokens based on the Realm

I have implemented a .Net STS website and everything is working fine. The token is populated with Claims of type Role, and these are used to control what the user has access to in the application. A new requirement is that there needs to be a second…
John Mc
  • 2,862
  • 1
  • 22
  • 37
2
votes
1 answer

How to get another user WindowsIdentity without knowing his password?

I'm trying to intercept WindowsAuthenticationModule to login into application as another user, but I cannot create new WindowsIdentity without knowing his password. The code will run under administrator privilegies, so, is there any way how to get…
nothrow
  • 15,882
  • 9
  • 57
  • 104
2
votes
1 answer

Comparing WindowsIdentity.Current.Name on Server

I am currently reviewing a system with a wcf service and a client application that connects to it via tcp, using Windows Auth. On certain actions it is required to store the user name on an objects property, send it to the service and compare it to…
Argo
  • 201
  • 3
  • 5
2
votes
1 answer

What is the difference between Owner and User (WindowsIdentity)?

When getting the username and/or SID of the current user, what is the preferred method? Is it using: WindowsIdentity.GetCurrent().Owner Or: WindowsIdentity.GetCurrent().User What is the difference between the two? This would be a great question…
Mark Carpenter
  • 17,445
  • 22
  • 96
  • 149
1
vote
1 answer

WindowsIdentity.GetAnonymous()

Could you please explain me what is the anonymous identity used for? As far as I know windows does not have an anonymous account type ?!
pkolodziej
  • 1,347
  • 3
  • 17
  • 24
1
vote
1 answer

WCF and PrincipalPermission

I have a number of services that will be running under the security context of NT Authority\System as a Windows service (the services are NetTCP-based). There are six groups stored in Active Directory that will be allowed to access these…
1
vote
1 answer

What is hToken (com.sun.jna.platform.win32.WinNT.HANDLE) in CreateProcessAsUser method. How to retrieve it using windowsIdentity Object

[Reference] [1]: Create process as different user with Java and Kerberos As mentioned in the code, we need to pass hToken in the below snippets: Advapi32.INSTANCE.ImpersonateLoggedOnUser(/* provide the security context token */) In the below code…
Chandru
  • 81
  • 1
  • 9
1
vote
0 answers

WindowsIdentity.RunImpersonated not working?

I have a website where I click a button and a process its supposed to start. The problem is that I have to start that new process with other user and its starting with the user currently running the site in IIS. Even when I Log inside the…