I have an aspx website which is deployed to a sharepoint 2016 server and have call to windows services (WCF) in another machine. I want to input a log-in credential and use this account for the request to windows services. But all requests have security token with AppPool identity, instead of my log-in account. My web.config:
<identity impersonate="true" />
<authentication mode="Forms" />
<authorization>
<allow users="*" />
<deny users="?" />
</authorization>
On IIS, I enable Windows Authentication, ASP.NET Impersonation and Anonymous Authentication (this is required by SP 2016 to access local resource).
When open the website, a log-in form is opened allow me to enter an account, I add log to default page to extract context's identity, and they are:
- HttpContext, SPContext, Thread Principal, WindowsPrincipal users are all my log-in account --> OK as expected
- But the WindowsIdentity is AppPool identity --> NOK
- And WCF request token is AppPool identity --> NOK
So how can I configure/code to be able to setlog-in account to WCF request token?
Thank you.