impersonation

Passthrough (impersonation) authentication with ASP.NET and TFS api

对着背影说爱祢 提交于 2019-12-17 16:39:29
问题 I'm trying to enable passthrough or impersonation authentication inside an ASP.NET website that uses the TFS2010 API. I've got this working correctly with Cassini, however with IIS 7.5 (Windows 7) something is going wrong. I found this blog post on the subject, and tried the following: private static void Test() { TfsTeamProjectCollection baseUserTpcConnection = new TfsTeamProjectCollection(new Uri(Settings.TfsServer)); // Fails as 'baseUserTpcConnection' isn't authenticated

How to use LogonUser properly to impersonate domain user from workgroup client

微笑、不失礼 提交于 2019-12-17 10:23:31
问题 ASP.NET: Impersonate against a domain on VMWare This question is what I am asking, but the answer does not provide details on how the _token is derived. It seems to only use WindowsIdentity.GetCurrent().Token so there's no impersonation happening. Can I impersonate a user on a different Active Directory domain in .NET? This next question has conflicting answers, with the accepted one bearing a comment "I'm beginning to suspect that my problem lies elsewhere." Not helpful. LogonUser works only

Change system clock by ProcessLauncher on uwp

别说谁变了你拦得住时间么 提交于 2019-12-13 19:41:15
问题 I'm trying to run a powershell script on raspberry (uwp) to change the system clock by c#. Running the code below throw an exception 'System.UnauthorizedAccessException'. await ProcessLauncher.RunToCompletionAsync(..."set-date.ps1", date.ToString()); set-date.ps1 file content: function Set-Time ([string]$dateTime) { $newDate = Get-Date $dateTime Set-Date $newDate } I'm trying to find other way to do it or try to run ProcessLauncher inside impersonator, but i don't know how to do it on uwp.

How to do impersonation in spring

…衆ロ難τιáo~ 提交于 2019-12-13 19:09:20
问题 We have multiple portals Employer-portal, Employee-portal and Admin-portal , All three portals are deployed separately. All portals follow spring-mvc pattern. And we used spring security and using openId for login and logout. Now we want to give admin-portal feature that admin can impersonate as employee and employer and do things on their behalf. Can any body with previous experience guide my how to work on it, or can share any good article which i can readout to get good knowledge over it.

Adding ASP.NET impersonation users of specific domain to windows authentication

淺唱寂寞╮ 提交于 2019-12-13 08:01:20
问题 I have MVC4 application installed in windows server 2008 in my company(IIS 7.5). to access the windows server remotely we use(xxxxDMZ\username, password) which are the same windows authentication required to access specific page of the website. My problem is not everyone has this "xxxxDMZ" account so they can't access that page, what I am trying to do is adding their windows login credentials to access that page(by only adding the username) which that would be 'xxxx\username'. I read that in

c# library impersonate problem

限于喜欢 提交于 2019-12-13 07:45:02
问题 I'm working on a website that has been coded by someone else. The application contains three layers. A website, a web service and a library. The Web service is up for other application to call methods and everything. The website is used by workers to performs queries and everything. The problem is : The website use the web service that use the library instead of going directly to the library. I want to remove the web service usage and use the library straight away instead. Unfortunately, the

Impersonate Access Token with Backup And Restore Privilege for Copying File Across Domain

怎甘沉沦 提交于 2019-12-13 05:39:54
问题 Computer A is on Domain A Computer B is on Domain B Domain A and Domain B have a trust allowing Accounts to connect to the other domain's computers Account A is Admin on Computer A and has Backup&Restore Privileges Account B is Admin on Computer B and has Backup&Restore Privileges Account A IS NOT Admin on Computer B and does not have Backup&Restore Privileges Account B IS NOT Admin on Computer A and does not have Backup&Restore Privileges A person owns both Account A and Account B. They want

Impersonate WCF service to run under a specific Domain Account(Hosted on IIS)

只愿长相守 提交于 2019-12-13 04:42:37
问题 I want my WCF service which is host on IIS server should impersonate to a specific Domain Account. In case of a normal website I am using below code to impersonate to specific domain account : <system.web> <!-- ASP.NET runs as the specified user --> <identity impersonate="true" userName="DOMAIN\user" password="password" /> </system.web> I need something similar approach which I can use in my WCF service web.config file to impersonate to a specific domain account so that all WCF's operation

ERROR_NO_TOKEN after call to WindowsIdentity.Impersonate()

我怕爱的太早我们不能终老 提交于 2019-12-13 03:52:37
问题 I am using @MattJohnson's technique for impersonating a new user using C# on .NET 4.0 on a Windows 2008 R2 domain, as described here. I manage to log on the user successfully, and the call to WindowsIdentity.Impersonate() runs silently, returning an apparently valid context. However, when I check the last error number by using Marshal.GetLastWin32Error() right after this, I get the value 1008 aka ERROR_NO_TOKEN. If I let my code run, it behaves as the new user is logged on (i.e. Environment

WindowsIdentity winId = (WindowsIdentity)HttpContext.Current.User.Identity; How to make this cast work; currently it is failing

微笑、不失礼 提交于 2019-12-13 02:28:40
问题 I am basically trying to access the network share resources from my Web Application by impersonating the logged in user. I followed this example [http://msdn.microsoft.com/en-us/library/ms998351.aspx#paght000023_impersonatingbyusingwindowsidentity], here the writer does not mention about the cast failing. When i did that cast, I got the runtime exception that the cast cannot be made. Anyone has gone through this kind of issues before? Guidance or suggestions are higly appreciated! Thank you