NetCore DockerDesktop 踩坑记录

1.Program.cs中的 UseUrls("http://localhost:8080") 导致运行后err-empty-response,需移除,原因尚不得知。

 

2.连接Sql Server

 System.Data.SqlClient.SqlException (0x80131904): A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: TCP Provider, error: 35 - An internal exception was caught)

 解决方法:修改Dockerfile

 FROM mcr.microsoft.com/dotnet/core/aspnet:3.1-buster-slim AS base 改成:

FROM mcr.microsoft.com/dotnet/core/aspnet:3.1-bionic AS base

posted @ 2021-04-23 10:13  春秋一梦  阅读(202)  评论(0编辑  收藏  举报