Docker Community Forums

Share and learn in the Docker community.

IIS Windows Authentication with Domain Controller

We’re porting an ASP.NET 4.5 Web Forms application to Docker. The deployment worked fine, it communicates with the Oracle database etc. The App Pool is set up for Windows Authentication. However, it doesn’t authenticate the user via a domain controller. The host is a Windows 2016 Server with IIS 8.5. How can I interact with a domain controller so that I can get the logged on user via Server variables “LOGON_USER” etc? Basically I just need to get the domain/user name of the currently logged in user.

This application was originally deployed in a corporate intranet.

If the web application is accessed directly from the host, then the user’s domain and user name is available in the server variables LOGON_USER. However, if the web application is accessed from the container IP then the LOGON_USER returns blank.

I’ve ported Web Api/MVC applications that used Forms Authentication.

Anything that points me in the right direction is appreciated.

Sorry, I’m a docker newbie :wink:


Any chance you found a solution to this? I suspect this is an issue I’m having right now.

Hi imterpsfan,

How did you set windows authentication in a docker container? Can you please help me deploying up windows auth application in docker?

I have a web application having one page. on page load, it should take the windows logged in user identity and go to the domain controller and retrieve email attribute from Active directory and print it on the web page.

I have set authentication = “windows” in web.config file when I deploy the application at local IIS it works perfectly fine but when I dockerize it then it throws an
“401 - Unauthorized: Access is denied due to invalid credentials.” error message.

Can you please help me to resolve this error message.