impersonation

providing domain/user credentials to webview control

和自甴很熟 提交于 2019-11-30 22:22:20
Does anyone know how to provide credentials to a WebView control (or even better - run a Windows 8 Metro style application / WinRT app in the context of a specific domain user?) I've tried following the HttpClient + WebView approach as listed here (http://social.msdn.microsoft.com/Forums/en-US/winappswithcsharp/thread/05e46a0a-e913-469d-a4a5-4a805dcf158a) but it still prompts the user for credentials, since in the returned content there are links to secured items. I have a NetworkCredential object, and I pretty much want to apply it to every single HTTP call that gets made. Surely someone must

get Current user context

烂漫一生 提交于 2019-11-30 20:55:00
I've got problems with running a powershellscript from different locations (c# application, webservice...). I think it is a user context problem, so now I'm trying to find out under which user context powershell script is running. Is there any possibility log the current usercontext of the powershellscript? If you need to know the actual user: [reflection.assembly]::LoadWithPartialName("System.DirectoryServices.AccountManagement") [System.DirectoryServices.AccountManagement.UserPrincipal]::Current Use: [System.DirectoryServices.AccountManagement.UserPrincipal]::Current | gm to know available

How do I configure IIS so that the user's domain credentials are used when connecting to SQL server?

怎甘沉沦 提交于 2019-11-30 20:12:32
We've recently released the latest version of our intranet application, which now uses windows authentication as standard, and needs to be able to connect to a configured SQL server with the end-user's domain credentials. Lately we've found that on a couple of customer deployments, although IIS can see the user's domain credentials, it will not pass these on to SQL server. Instead, it seems to use the anonymous account. This is in spite of following all the correct steps (changing the directory security to Win Auth, updating Web.Config to use Win Auth and denying anonymous users). I've been

providing domain/user credentials to webview control

坚强是说给别人听的谎言 提交于 2019-11-30 18:24:59
问题 Does anyone know how to provide credentials to a WebView control (or even better - run a Windows 8 Metro style application / WinRT app in the context of a specific domain user?) I've tried following the HttpClient + WebView approach as listed here (http://social.msdn.microsoft.com/Forums/en-US/winappswithcsharp/thread/05e46a0a-e913-469d-a4a5-4a805dcf158a) but it still prompts the user for credentials, since in the returned content there are links to secured items. I have a NetworkCredential

Using advapi32.dll:LogonUserA() to impersonate a remote machine's local user

限于喜欢 提交于 2019-11-30 17:41:48
问题 I need to be able to run RegLoadKey() on a remote machine, and it may be that my machine and the remote machine are not in the same domain. If they are, the below code works OK and I can impersonate a user that has admin privileges on the machine. Otherwise, if we're talking about local users, according to this discussion I found... http://www.eggheadcafe.com/conversation.aspx?messageid=34224301&threadid=34224226 ...There has to be a local user on my machine with the same username and

Symfony impersonation - separate firewalls and separate user providers

爱⌒轻易说出口 提交于 2019-11-30 17:37:50
问题 I have a Symfony application with two firewalls, one for admins and one for normal users. admin: provider: admin # etc main_site: form_login: provider: fos_userbundle csrf_provider: form.csrf_provider I'd like admin users to be able to impersonate normal users. How can I do this, given that they're using separate firewalls and separate user providers? 回答1: There were several things I had to do to get this to work. Context key: As described here, I had to give both firewalls the same context.

How can I temporarily impersonate a user to open a file?

霸气de小男生 提交于 2019-11-30 16:35:04
I would like to temporarily impersonate a domain user account to read in a file on a network drive from an ASP.NET site. I would rather not set up impersonation for the entire site or set up a mapped drive on the server. Even Mien I ended up using code from Michiel van Otegem: WindowsImpersonationContext made easy and added an implementation of IDisposable. I found this in another question about impersonation in ASP.NET . Usage: using (WindowsImpersonationContextFacade impersonationContext = new WindowsImpersonationContextFacade( Settings.Default.ImpersonationDomain, Settings.Default

Classic ASP page is impersonating NT AUTHORITY\\ANONYMOUS LOGON

风流意气都作罢 提交于 2019-11-30 16:29:43
We have a classic ASP application. I'm trying to clone it on the same server, with the same instance of IIS7, so we have a dev version. I copied the files, and duplicated all of the configuration that I can find in IIS manager. The problem is DB access. The new copy is using the same Application Pool as the old one and the same connection string, but when I create ADODB.Connection and call conn.Open(str) with the same old connection string, that call throws "Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'." . That is not the user account the application pool is using, but that seems not

Impersonation in ASP.NET web application does not work when running on IIS

怎甘沉沦 提交于 2019-11-30 15:37:45
I am working on ASP.NET 4.0 MVC3 web application that works in intranet environment. The application makes use of Windows authentication. Its application pool is run by domain user that has spn set on a domain controller. Authentication works using Kerberos (on IE and Firefox after some additional configuration). Now I want to upload files to sharepoint, but it's important for me to upload the file as the user currently logged in into the application (so the file is created on Sharepoint with his/her credentials). I have the following code in ResourceExists(Uri uri) function: '... Dim identity

Why do Thread.CurrentPrincipal.Identity and WindowsIdentity.GetCurrent() differ when impersonation is turned on?

痞子三分冷 提交于 2019-11-30 15:35:34
I enabled impersonation and windows authentiaction. <authentication mode="Windows" /> <identity impersonate="true" userName="name" password="passord"/> But Thread.CurrentPrincipal.Identity.Name returnes the name of authenticated user and WindowsIdentity.GetCurrent() returns impersonated identity. Shouldn't these identities be the same? And under wich credentials does the code run in this case? Andrei Zubov As far as I can understand the Thread.CurrentPrincipal contains the information of conditions the thread has been started with, including the WindowsIdentity. That's why Thread