Windows Containers


Windows authentication of an app hosted in Windows Container


I would like to use Windows authentication to access an ASP.NET application, hosted in a Windows Container (in Windows Server 2016 TP4). For this, I presume I need to add the container to the Active Directory domain. Is it all possible to add a Windows
Container (or Hyper-V Container) to a domain? There is no clear documentation from Microsoft on this, and I myself tried adding the container to the domain using PowerShell, but with no luck.
If this domain joining a Container is not supported, is there any alternative way to enable Windows Authentication in a web application hosted in a Windows or Hyper-V Container?
Any input will be highly appreciated.
Frankly, this is a popular question of late and I have not seen any answers from MSFT regarding the state.
Knowing a bit of the underpinnings, I might expect a Hyper-V Container being able to domain join (at this time) but a Server Container might not. All due to what is / is not shared with the root. However, I have not tried.
I will definitely ask the folks I know.Brian Ehlert
http://ITProctology.blogspot.com
Learn. Apply. Repeat.
Any update on this?
Here is what I tried so far to join a Hyper-V Container to a domain:
1) I added the host Win 2016 TP4 server to the domain that I created (mydomain.com). Then logged in to the server using domain admin account.
2) To make the Hyper-V container accessible from outside, I created NAT port mapping to map port 80 of container to host's port 80, using Add-NetNatStaticMapping cmdlet. Also, configured inbound firewall rule for the port 80.
3) The PowerShell management cmdlet "Add-Computer" to add a computer to a domain is not recognized from within the container, so I tried to run the same from host machine like this:
Add-Computer -ComputerName 172.16.0.3 -LocalCredential mydomain\Administrator -DomainName mydomain.com -Credential mydomain\Administrator –Restart
Here, 172.16.0.3 is my container IP address and 'mydomain\Administrator' is the domain admin account.
However, this gave error "Cannot establish the WMI connection to the computer '172.16.0.3' with the following error message: Access is denied."
4) Thinking adding the user 'mydomain\Administrator' to the Container's administrators group might resolve the error, I tried doing the same using the following script:
$DomainName = "mydomain.com"
$ComputerName = "172.16.0.3"
$UserName = "Administrator"
$AdminGroup = [ADSI]"WinNT://$ComputerName/Administrators,group"
$User = [ADSI]"WinNT://$DomainName/$UserName,user"
$AdminGroup.Add($User.Path)
However, it generated error "The following exception occurred while retrieving member "Add": "The network path was not found."
5) Following a suggestion from a post, I also enabled File and Printer Sharing on the firewall, but that did not solve the issue either.
Any update on this? I'm too seeking the same answer to using Windows Authentication to a web app in a containers.
Hello again, same answer as in the other thread. Here's our current statement on this:
https://msdn.microsoft.com/en-us/virtualization/windowscontainers/about/work_in_progress#domain-membership
Please feel free to share any feedback you have on this, and what you'd like to see.
Regards,
Ender
That link is dead now, redirects elsewhere. Can you include the relevant text when quoting a link as a source?

Related Links

DTC in container
problems with mount full driver for the container
Does anybody ssh to a windows container?
Windows container docker pull fails.
Error Looking at Container Network.
how to call the docker daemon in Azure VM Windows Server 2016 TP5 from a client docker on windows 10
Github container example for apache produces non-zero code 255 on TP5
TP5 Unable to run windowsservercore with docker native command
Hyper-V Error - the operation cannot be performed while the object is in its current state
Remote debugging of C++ applications using visual studio inside container
Static IP Addresses: Constraints related to NAT networks
Can I do anything right now to get Visual Studio to deploy to a windows container?
Get-EventLog inside container - InvalidOperationException
Trouble Collection TP 5
Continuous Integration - Windows, Databases, and Licenses
Import-ContainerImage fails (TP5)

Categories

MSDN
Windows Live Developer
Development
Samsung PC
Office Live Development
Microsoft Atlas API: D...
Microsoft Azure
Archived Forums #
Archived Forums C-D
Archived Forums E-H
Archived Forums I-L
Archived Forums N-R
Visual Basic
Parallel Computing in ...
Test Tools in Visual S...
Register and Manage Ac...
App & Ad Unit Management
Network Monitor
Windows Filtering Plat...
Windows Hardware Testi...
Office 365 for Developers
SharePoint 2010 - Setu...
SharePoint Legacy Vers...
Azure Management Portal
Azure Active Directory
Azure API Management
Azure CDN
Azure Data Factory
Azure Log Analytics
Azure Security Center
Azure Disk Encryption
Azure Analysis Services
.NET Framework Class L...
Windows Presentation F...
Visual FoxPro General
Architecture General
WCF Data Services
ADO.NET Entity Framewo...
Reactive Extensions (Rx)
JScript Native
Internet Explorer Exte...
Microsoft Robotics - S...
SQL Server Tools
SQL Service Broker
SQL Server Application...
Standard 2009: Compone...
Standard 7: Servicing ...
Windows Embedded 8.1 I...
Windows Embedded Compa...
SQL Server 2012 Analys...
SQL Server 2012 Master...
ClickOnce and Setup & ...
Windows Server 2008 Ap...
CRM Development
MSDN Subscriptions Fee...
App Linking
WebsitePanel - Enterpr...
WebsitePanel - Develop...
The Samsung Windows De...
Bing Maps REST, SOAP, ...
Bing Maps for Windows ...
Open Specifications Qu...
SQL Server Protocols
Project Customization ...
Microsoft Atlas APIs: ...
Microsoft Unified Comm...
Programming Silverligh...
Silverlight Controls a...
Expression Encoder
Windows Performance To...
.NET Framework 4: Wind...
Acropolis
ADO.NET Entity Framewo...
AppFabric Service and ...
Building Windows Store...
Casablanca
Crystal Reports for Vi...
Deep Zoom Composer
(Retired) Exchange Pre...
Face Tracking – Kinect...
ISV Community Days
Microsoft ESP Platform...
Network Class Library ...
Office Development wit...
Search Server: Known B...
Silverlight (formerly ...
Share your How to samp...
SyncFx - Feedback [Rea...
SyncFx - Microsoft Syn...
SyncFx - Technical Dis...
Team Foundation Server...
Visual Basic Express 2...
Visual Basic Power Packs
Visual C# 2008 (Pre-re...
Visual Studio Guidance...
Visual Studio UI Autom...
Windows Live Search: D...
Windows Workflow Found...
Windows XP Wireless SDK
Reporting
Windows Phone Preview ...
SQL Server 2016 Preview
Windows IoT

Resources

Encrypt Message



code
soft
python
ios
c
html
jquery
cloud
mobile