我正在使用DocumentDB Migration工具将一些json从我的本地开发机器移动到在我的本地网络上的另一台机器上运行的Remote DocumentDB模拟器。当我运行DT.exe迁移时,它会抛出此错误:
System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel. ---> System.Security.Authentication.AuthenticationException: The remote certificate is invalid according to the validation procedure. at System.Net.TlsStream.EndWrite(IAsyncResult asyncResult)
从错误我明白这是一个证书问题,但我不知道如何解决它。我在port = 443上使用/ AllowNetworkAccess运行模拟器并使用默认的模拟器密钥(https://myservername)。然后我在DT.exe中使用以下ConnectionString:
AccountEndpoint=https://myservername/;AccountKey=C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw==;Database=MyDBName
有人试过这样做吗?