EC2实例中Blazor应用容器无法连接同实例SQL Server容器:DNS解析问题
EC2实例中Blazor应用容器无法连接同实例SQL Server容器:DNS解析问题
问题现状
目前我的Blazor应用已经能通过公网DNS正常访问了,但在执行注册操作(这一步需要访问数据库)时,浏览器里抛出了两个异常:
SocketException: Name or service not known.
SqlException: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 35 - An internal exception was caught).
需求目标
我现在要解决的核心问题是:让运行在EC2实例中的Blazor应用容器,成功连接到同一EC2实例里另一个容器中运行的SQL Server。
目前已确认的信息
- 两个容器(包括EC2代理)都在这个EC2实例内正常运行
- 1433端口已经配置为允许任意公网IP访问
备注:内容来源于stack exchange,提问作者user22874144
相关产品推荐
相关产品推荐

