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

How to pass Windows credentials to a network socket

I have client and server application on C#. The client and server contact each other through a network socket. I need pass some data from the client to the server. I used binary serialization for it, but I need to check that the users who starts the…
1
vote
0 answers

Android - Authenticating using Windows Identity Foundation

We have a RESTful web service which uses WIF (Windows Identity Doundation) - STS , Token based authentication. And I would like to use it within a native android app. could you guide me on where should I look to start from ?! any thing from a ready…
Muhammad Naderi
  • 3,090
  • 3
  • 24
  • 37
1
vote
1 answer

Using WindowsIdentity token across multiple processes

I have the following architecture outlined: An API gateway (Web API) which is only available over the intranet, therefore the site is configured to use Windows authentication. This API allows users to interact with a Dll (C++ unmanaged) and because…
MeTitus
  • 3,390
  • 2
  • 25
  • 49
1
vote
0 answers

User.Identity.Groups is not showing all users groups

I'm using Windows.Security.Principal.WindowsIdentity for role based security in a MVC app. Recently we got new Windows 2012 domain controllers and now only the basic Windows groups are showing up under User.Identity.Groups in the MVC app. I'm not…
witchlightning
  • 271
  • 1
  • 2
  • 10
1
vote
1 answer

Is it possible to change WCF UPN (identity) on deployment by Powershell

I have a WCF webservice that run under a domain account . I use powershell to deploy a webapplication that host the service on 4 different platforms (development, systemtest, usertest, production).On every platform we have a domain account that we…
Nokomo
  • 31
  • 1
1
vote
1 answer

Should I cache a WindowsIdentity object in a MVC app? If so, what's the best way to do it?

I'm currently generating a WindowsIdentity object in my MVC application and I'd ideally would like to cache it so I won't be hitting the AD on every request; The problem is that I often get the exception: "Safe Handle has been closed" I've read…
Kemuel Sanchez
  • 636
  • 7
  • 13
1
vote
1 answer

Call Dispose() on a WindowsIdentity object? C#

I am retrieving a WindowsIdentity object by calling: win_id = System.Security.Principal.WindowsIdentity.GetCurrent(); with the intention of getting the currently logged on user name, which works fine. WindowsIdentity implements IDisposable, but…
Andy
  • 5,188
  • 10
  • 42
  • 59
1
vote
0 answers

Get WindowsIdentifiy from Operating system using a SID

I am sending request via WCF from Machine A to Machine B. The domain and users are same on both machines. In Machine B, using a given parameters, I want to create a WindowsIdentity for that user that invoked the operation from Machine A. I know…
ilansch
  • 4,784
  • 7
  • 47
  • 96
1
vote
1 answer

How to store user data on the server instead of cookies using Windows Identity Foundation

I'm working on an MVC application using WIF. I'm trying to store some session variables in a ClaimsIdentity using something like: ClaimsIdentity identity = HttpContext.User.Identity as ClaimsIdentity; identity.AddClaim(new Claim("foo",…
xlecoustillier
  • 16,183
  • 14
  • 60
  • 85
1
vote
2 answers

How do I manage access in Windows Identify Foundation without raising exceptions?

In the Windows Identity Foundation (WIF), there is a class called ClaimsPrincipalPermission. The documentation on MSDN is very sparse. It states: ClaimsPrincipalPermission represents the permission required to access a resource.…
Vivian River
  • 31,198
  • 62
  • 198
  • 313
1
vote
0 answers

No 'Access-Control-Allow-Origin' header is present on the requested resource. IN ADFS and single sign on

I m using ADFS for single sign on with my asp.net MVC application. Now all is working fine except one thing only. When my fedauth cookie will get expire or some intentionally delete it and make AJAX request it throws an error as mentioned…
1
vote
2 answers

Using WindowsIdentity to get a list of files/directories in ASP.NET while logged in using Forms Authentication

Edit 7: I'm guessing this can't be done after all, might need to use some kind of command line application to do this and and parse the output, although I expect this could be very slow when lots of people are accessing the folder and/or the NetBIOS…
SamWM
  • 5,196
  • 12
  • 56
  • 85
1
vote
2 answers

Windows Identity Foundation: How to get new security token in ASP.net

I'm writing an ASP.net application that uses Windows Identity Foundation. My ASP.net application uses claims-based authentication with passive redirection to a security token service. This means that when a user accesses the application, they are…
Vivian River
  • 31,198
  • 62
  • 198
  • 313
1
vote
1 answer

Retrieve the Windows Identity of the AppPool running a WCF Service

I need to verify that the underlying server-side account running my WCF Service has correct ACL permissions to various points on the local file system. If I can get the underlying Windows Identity, I can take it from there. This folds into a larger…
bartonm
  • 1,600
  • 3
  • 18
  • 30
1
vote
2 answers

Get Windows Logon From Within ASP.NET Page

Just like the title states. Need the windows logon and domain info from within our asp.net page. I tried string userName = System.Security.Principal.WindowsIdentity.GetCurrent().Name; but it returns the IIS App Pool not the user name Thanks
RobDog888
  • 239
  • 1
  • 3
  • 14