更新时间:2022-01-25 21:48:55
右键单击您的数据库,选择属性/安全/服务器身份验证/SQL Server 和 Windows 身份验证模式"单选按钮.重新启动 MS SQL 服务.
Right click on your database, select 'Properties / Security / Server Authentication / SQL Server and Windows Authentication Mode' radio button. Restart the MS SQL service.
例子
"ConnectionStrings": {
"DefaultConnection": "Server=YourServerName;Database=YourDatabaseName;MultipleActiveResultSets=true;User Id=UserNameYouJustAdded;Password=PassordYouJustCreated"
},
确保删除Trusted_Connection=True
.
我的示例 Docker 文件
My example Docker file
FROM microsoft/dotnet:nanoserver
ARG source=.
WORKDIR /app
EXPOSE 5000
EXPOSE 1433
ENV ASPNETCORE_URLS http://+:5000
COPY $source .
在提升的 PowerShell 中从与 Docker 文件相同的位置运行
Running from the same location as the Docker file in an elevated PowerShell
dotnet publish
docker build binDebug
etcoreapp1.0publish -t aspidserver
docker run -it aspidserver cmd
我想运行容器并查看它在 PowerShell 中运行时的输出.
I wanted to run the container and see the output as it was running in PowerShell.
一旦容器在命令提示符下启动并在容器中运行,我就启动了我的应用程序.
Once the container was up and running in the container at the command prompt I kicked off my application.
dotnet nameOfApplication.dll
如果一切按计划进行,则应该启动并运行.
If everything went to plan one should be up and running.