Asp.net mvc 从Visual Studio 2019启动Docker时,用户名或密码不正确
所以,我是Docker的新手,我正试图用它来封装ASP.NET(Framework 4.7.2)应用程序。我的平台是Windows 10,应用程序将在Windows容器下运行。以下是我所做的:Asp.net mvc 从Visual Studio 2019启动Docker时,用户名或密码不正确,asp.net-mvc,visual-studio,docker,Asp.net Mvc,Visual Studio,Docker,所以,我是Docker的新手,我正试图用它来封装ASP.NET(Framework 4.7.2)应用程序。我的平台是Windows 10,应用程序将在Windows容器下运行。以下是我所做的: 在Visual Studio中右键单击项目时,单击“添加->Docker支持…” 正在等待它生成Dockerfile 单击“运行” 当Chrome启动时,会弹出一个通用的500 IIS错误,它在IP 172.26.102.145打开,而不是像在没有Docker的情况下运行时一样在localhost:por
exec's CreateProcess() failed [module=libcontainerd exec=9c32d86647bc2b4b4207c447f15433d06603297dd01513445405b7841e9aa64c container=fbe41e9f4206b4b8ba3c789c7e0514e313589182e90c36e0a71b7d6cd74e17e5 namespace=moby error=container fbe41e9f4206b4b8ba3c789c7e0514e313589182e90c36e0a71b7d6cd74e17e5 encountered an error during hcsshim::System::CreateProcess: failure in a Windows system call: The user name or password is incorrect. (0x52e)
[Event Detail: Provider: 00000000-0000-0000-0000-000000000000]
[Event Detail: Provider: 00000000-0000-0000-0000-000000000000]
[Event Detail: onecore\vm\compute\management\orchestration\vmhostedcontainer\processmanagement.cpp(173)\vmcomputeagent.exe!00007FF7FF789F4B: (caller: 00007FF7FF73E13A) Exception(4) tid(4c0) 8007052E The user name or password is incorrect.
CallContext:[\Bridge_ProcessMessage\VmHostedContainer_ExecuteProcess]
Provider: 00000000-0000-0000-0000-000000000000] extra info: {"CommandLine":"cmd.exe /C \"ECHO 192.168.1.71 host.docker.internal \u003e\u003e %systemroot%\\system32\\drivers\\etc\\hosts \u0026 ECHO 192.168.1.71 gateway.docker.internal \u003e\u003e %systemroot%\\system32\\drivers\\etc\\hosts\"","User":"Administrator","WorkingDirectory":"C:\\inetpub\\wwwroot","Environment":{"COMPLUS_ForceENC":"1","COMPLUS_NGenProtectedProcess_FeatureEnabled":"0","DEV_ENVIRONMENT":"1","ROSLYN_COMPILER_LOCATION":"C:\\RoslynCompilers\\tools","VBCSCOMPILER_TTL":"604800"},"CreateStdInPipe":true,"CreateStdOutPipe":true,"CreateStdErrPipe":true,"ConsoleSize":[0,0]}]
我在别处读到,这个问题可能是因为知识产权?我在Powershell中运行了以下命令以获取我认为可以工作的另一个命令:
docker inspect <container_id>
这个问题被证明是一个危险的问题,真正的问题是通过查看docker容器中的IIS应用程序日志发现的。我建议面临此问题的任何人通过运行以下命令打开容器中的powershell:
docker container exec-it powershell
然后使用以下内容浏览应用程序日志:
获取事件日志-日志名应用程序-最新15
你可能会看到一个问题。此外,您可以尝试在容器中运行此命令,以查看是否出现错误:
调用WebRequesthttp://localhost
#Depending on the operating system of the host machines(s) that will build or run the containers, the image specified in the FROM statement may need to be changed.
#For more information, please see https://aka.ms/containercompat
FROM mcr.microsoft.com/dotnet/framework/aspnet:4.8-windowsservercore-ltsc2019
ARG source
WORKDIR /inetpub/wwwroot
COPY ${source:-obj/Docker/publish} .