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
0
votes
1 answer

With IIS with Windows authentication on domain, can I start a process as the domain user who initiated request to IIS?

Let's say I'm on a domain (paddyspub.com) and user dennisreynolds@paddyspub.com calls a web service that is configured in IIS to use NTLM / windows authentication. Is there a way for me to start a process on the web server as…
Matt
  • 25,943
  • 66
  • 198
  • 303
0
votes
1 answer

WindowsIdentity throwing a "There are currently no logon servers available to service the logon request"

The code below works fine when running from a Console C# application: System.Security.Principal.WindowsIdentity wi = new System.Security.Principal.WindowsIdentity("User001"); but when I try to add it into a class inside my web application I…
Max
  • 1,289
  • 3
  • 26
  • 50
0
votes
1 answer

Cant get HttpContext.Current.User.Identity to return values

This project authenticates with System.Security.Principal.WindowsIdentity I had a look at this: Can't get HttpContext.Current.User.Identity to work in my WebMatrix project IIdentity WinId = HttpContext.Current.User.Identity;//returns no…
Jack
  • 526
  • 3
  • 10
  • 30
0
votes
0 answers

How to create a WindowsIdentity using a username string such as "JohnDoe" in C#

I have the isAdministrator(String a) as follows: public static bool IsAdministrator(String aString) { WindowsIdentity identity = new WindowsIdentity(a); WindowsPrincipal principal = new WindowsPrincipal(identity); return…
Bob Bobs
  • 1
  • 2
0
votes
1 answer

Extending WindowsIdentity/WindowsPrincipal in

I have an application in MVC 4, ASP.NET 4.5 and Windows Authentication. I'm trying to extend the Identity and Principal objects (WindowsIdentity and WindowsPrincipal respectively) in order to provide additional information about the user logged on,…
0
votes
1 answer

How can I generate a SAML Security Token within the same application that consumes it?

I've been configuring some of my applications to use the Windows Identity Foundation. I use the passive redirection to get security tokens from a Security Token Service. I accomplished this by inserting WIF code into a logon web site that existed…
Vivian River
  • 31,198
  • 62
  • 198
  • 313
0
votes
1 answer

Get Only First Name from Windows Identity

Is there any way I can get ONLY the first name of a user in WindowsIdentity? Now I'm getting full name by this code: DirectoryEntry userEntry = new DirectoryEntry("WinNT://" + domain + "/" + userName + ",User"); string fullName =…
0
votes
1 answer

Is it possible to show credentials box for WindowsIdentity?

Sometimes the WindowsIdentity can't find the user. Am I able to show a credentials box (screen where the user type login and password) to WindowsIdentity identify the user?
alansiqueira27
  • 8,129
  • 15
  • 67
  • 111
0
votes
1 answer

How to get WindowsIdentity for a remote logged in user?

I am working on client server application with following details: Client(C++) -----------HTTPS--- Server (C#/WCF) Server: With Users in windows Active Directory domain WCF service running in IIS providing authentication service against windows…
aJ.
  • 34,624
  • 22
  • 86
  • 128
0
votes
1 answer

Impersonated Full Text Search on Sharepoint (without the password)

I'm trying to execute a search query while impersonating a specific user. The goal is to have a web service that receives the user login name (via querystring or request header), perform a full text query and give back the results, respecting the…
0
votes
0 answers

WindowsIdentity client username and domain return wrong value C#

i'm trying to get the username and domain from Windows, using WindowsIdentity windowsIdentity = WindowsIdentity.GetCurrent(); windowsIdentity.Name; but its always returning 'IIS APPPOOL\DefaultAppPool'. What could I do to return the correct…
rriccilopes
  • 399
  • 2
  • 10
0
votes
1 answer

Why WIF (Windows Identity Foundation)?

How portable is Windows Identity Foundation? And what am I getting for its complex setup that I can't through custom security logic? Once I generated a ClaimIdentity and a Principal how can I delegate it to a middle tier service like…
Alwyn
  • 8,079
  • 12
  • 59
  • 107
0
votes
1 answer

LogonUser function in Windows 8

we are using this VB.NET code inside a class since many years for testing if a given user is an administrator (shortened for clarity, error checking removed): Private Declare Auto Function LogonUser Lib "advapi32.dll" (ByVal lpszUsername As String,…
Alex
  • 98
  • 6
0
votes
1 answer

WCF Services Authorisation to a service function without membership provider

I've a WCF service which uses UserNamePasswordValidator for authantication. I check the username and password. If it is ok, then I allow to access service call. class CustomUserNameValidator : UserNamePasswordValidator { WebServiceDM entity =…
Chaagalar
  • 13
  • 6
0
votes
2 answers

How do I maintain a cookie based session in MVC, without a WIF STS/IDP?

On the surface, I think I need many features of WIF The ability to use roles to distinguish between sessions No session state on the server All authentication and role data to reside in a HTTP only cookie ASP.NET MVC support However for my…
makerofthings7
  • 60,103
  • 53
  • 215
  • 448
1 2 3
13
14