impersonation

ASP.NET CORE 1.0, Impersonation

落爺英雄遲暮 提交于 2020-01-03 08:56:09
问题 I'm writing an Intranet application. Target framework in project.json is dnx451. That's my publishing command: dnu publish --runtime dnx-clr-win-x86.1.0.0-rc1-update1 --no-source Database Connection string: Server=name;Database=name;Trusted_Connection=True; I'm trying to impersonate the database access but it's not working. When I start the application my windows user is recognized and it says Hello, Domain\Username on top right. As soon as I try to access the database I get the error "Login

Move file onto network share (via impersonation) C#

这一生的挚爱 提交于 2020-01-03 03:03:49
问题 I have been working on a project in C# (.net4). Project pretty much allows people to upload files from their local machine to a network share. Network share is secured. It is only accessible by user called "proxy" which is created in active directory. I did some research and I found this class which I used for impersonation. using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Runtime.InteropServices; using System.Security.Principal; namespace

Identity Impersonation with ASP.NET 4 MVC not working as expected

徘徊边缘 提交于 2020-01-01 21:02:33
问题 I am in the process of building a Intranet MVC 4 application for our analysts. The goal is to allow internal users access to this application without having to sign on given they are part of our internal network. When they access the application I want to be able to capture their windows user name and check against the active directory using LDAP and retrieve the department they belong to and display the relevant details on the screen. Based on the advice from different fora, I have chosen

Parallel.ForEach() changes Impersonation Context

为君一笑 提交于 2020-01-01 03:01:51
问题 Today we deployed our newly created ASP.NET application to the server and soon we realized there was a strange security-related issue which was causing the application to crash. This is an internal application and we use Impersonation to manage how the users access resources. The application however, throws an "Access Denied" exception when the user attemps to access a folder over which they have full control. The exception was in fact an AggregateException and was being thrown in a method

Exchange Impersonation in Service Account: Autodiscover service couldn't be located

自闭症网瘾萝莉.ら 提交于 2019-12-31 02:15:31
问题 Sending a simple email through ews is working as intended - from my account to my account: ExchangeService ews = new ExchangeService(ExchangeVersion.Exchange2010); ews.AutodiscoverUrl("myname@mydomain.com"); EmailMessage email = new EmailMessage(ews); email.ToRecipients.Add("myname@mydomain.com"); email.Subject = "HelloWorld"; email.Body = new MessageBody("This is the first email I've sent by using the EWS Managed API"); email.Send(); Simply trying impersonation, it is also working as

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

痴心易碎 提交于 2019-12-30 03:32:07
问题 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

Application pool identity or Impersonation

…衆ロ難τιáo~ 提交于 2019-12-29 20:31:30
问题 (A question of similar vein has been asked before but both the question and the accepted answer do not provide the detail I am looking for) With the intention of running an asmx web service under a dedicated domain account what are the usage scenarios and/or pros and cons of using an Application Pool with the identity of the domain account versus Impersonation? We have 3 small internal web services that run under relatively low load and we would like to switch them to running under their own

Impersonate with Delegation or More than one hop on Kerberos? Completely lost

两盒软妹~` 提交于 2019-12-29 06:29:29
问题 My issue here is how to deal with security and a proper implementation of impersonation which will work from a client machine and authenticate properly to my IIS server which passes the still valid impersonation ticket along with the LDAP request. My System is an independent server running on my company intranet which hosts the domain controller, LDAP server, etc, and uses Kerberos protocol. System Info: IIS7 with Windows Auth and Impersonate on Windows 7 x64 Network Info: IIS 6, LDAP,

Accessing Impersonated users key store

ε祈祈猫儿з 提交于 2019-12-25 05:08:00
问题 I am impersonating a service user account in order to connect to a webservice that requires a cert to connect. I have installed the client cert on the service account on the machine which is running the code however I receive the error System.Security.Cryptography.CryptographicException: The system cannot find the file specified. using (var ctx = new ImpersonationContext("svcAcctUserName", "domain", "password")) { var clientCert = new X509Certificate2("filePath", "certPassword"); } The

Running a classic ASP page as under IIS account when Windows auth is enabled

跟風遠走 提交于 2019-12-25 04:36:14
问题 I've got windows authentication enabled on an ASP page so that I can grab the current user's username. This forces the ASP page to run as that user. I want to lock some files down that are currently being accessed by that page. Is there a way to have Windows Authentication enabled and still run the page under the account that IIS is running as? 回答1: In the end, I'm just going to be migrating this to ASP.net. There is an article at Microsoft regarding impersonation at http://support.microsoft