google-translator-toolkit - 通过企业网络中的防火墙解锁以访问 Google Translate API(高级版)需要哪些 url?
问题描述
通过企业网络中的防火墙解锁以访问 Google Translate API(高级版)需要哪些 url?
目前解锁的是: *.googleapis.com 和 accounts.google.com
但我仍然得到以下错误:
System.Reflection.TargetInvocationException:调用的目标已引发异常。---> Grpc.Core.RpcException: Status(StatusCode="Unavailable", Detail="连接所有地址失败", DebugException="Grpc.Core.Internal.CoreErrorDetailException: {" ;created":"@1612337108.132000000","description":"选择子频道失败","file":"T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\ext\filters\client_channel\client_channel.cc" ,"file_line":4090,"referenced_errors":[{"created":"@1612337108.132000000","description":"连接所有地址失败","file":"T :2.UnaryCall(TRequest msg) at Grpc.Core.DefaultCallInvoker.BlockingUnaryCall[TRequest,TResponse](Method
2 方法,字符串主机,CallOptions 选项,TRequest 请求)在 Grpc.Core.Interceptors.InterceptingCallInvoker.b__3_0[TRequest,TResponse](TRequest req,ClientInterceptorContext 2 ctx) at Grpc.Core.ClientBase.ClientBaseConfiguration.ClientBaseConfigurationInterceptor.BlockingUnaryCall[TRequest,TResponse](TRequest request, ClientInterceptorContext
2 上下文,BlockingUnaryCallContinuation 2 continuation) at Grpc.Core.Interceptors.InterceptingCallInvoker.BlockingUnaryCall[TRequest,TResponse](Method
2 方法,字符串主机,CallOptions 选项,TRequest 请求)在谷歌.Cloud.Translate.V3.TranslationService.TranslationServiceClient.TranslateText(TranslateTextRequest request, CallOptions options) at Google.Api.Gax.Grpc.ApiCall.GrpcCallAdapter 2.CallSync(TRequest request, CallSettings callSettings) at Google.Api.Gax.Grpc.ApiCallRetryExtensions.<>c__DisplayClass1_0
2.b__0(TRequest request, CallSettings callSettings) at ABG.Foundation.LanguageTranslator.GoogleTranslator。 TranslateData(String sourceLanguage, String targetLanguage, List 1 content) in D:\a\1\s\src\Foundation\LanguageTranslator\code\GoogleTranslator\GoogleTranslator.cs:line 106 at ABG.Foundation.LanguageTranslator.GoogleTranslator.TranslateData(List
1 items, String sourceLanguage, String targetLanguage) in ...
注意:相同的代码和设置在公司网络之外也能正常工作。
解决方案
推荐阅读
- c# - 从自定义位置加载本地化资源
- wordpress - 如何在 WooCommerce 中使用已经存在的产品属性而不是使用 WC_Product_Attribute 类创建新属性?
- java - 使用 Java AWS 开发工具包和访问点将对象上传到 S3
- java - 如何对使用游戏循环的 Java 套接字游戏进行单元测试?
- ios - iOS OAuth2 授权最佳实践
- html - 如果在 css 网格中使用百分比,则错误 safari div 的大小计算
- javascript - 如何通过 API 控制器使用 Ajax 将对象列表加载到选择标签中?
- javascript - 在二叉搜索树Javascript的画布上定位圆
- delphi - 如何从窗口句柄中获取可执行文件名?
- docker - 一个 pod 中的容器与多容器 pod 中的一个容器进行通信