从运行在容器中(托管在Windows中)的.net Core api连接到在主机上运行的Identity Web服务会产生错误400错误请求

时间:2018-06-22 12:49:58

标签: docker docker-machine docker-networking

预期行为:

到目前为止,我已经能够使我的api在容器中运行。该api应该能够通过以下位置连接到运行在我的主机上的Identity Server:http://localhost:26019/

实际行为:

不幸的是,来自容器的错误是:

Response status code does not indicate success: 400 (Bad Request)

我可以通过自己的api通过以下连接字符串来联系主机上的SQL Server数据库:

"Database": "Data Source=docker.for.win.localhost,1433;Database=.;Initial Catalog=Test;Integrated Security=false;User Id=AppUser;Password=****;MultipleActiveResultSets=True"

类似地,我正在尝试通过连接字符串联系主机上运行的Identity Web服务:

"AuthorityUrl": "http://docker.for.win.localhost:26019"

不幸的是,我无法成功使用该服务。我想念什么?预先感谢!

0 个答案:

没有答案