我们有一个托管在 azure Appservice 计划上的 Web 应用程序,与托管在 Azure VM 上的 Marklogic 服务器进行通信。 Webapp 和 VM 通过点对站点 VPN 进行通信,并且位于同一个 VNET 上
当我们调用托管在 xcc://admin 的 Marklogic 服务器时:[email protected] :9501 使用 .net XCC 库。 我们收到错误:
An address incompatible with the requested protocol was used [::ffff:10.10.1.4]:9501
stacktrace Message: at Marklogic.Xcc.Impl.SessionImpl.SubmitRequest(Request request) at IET.TV.Common.MarkLogicHelper.MarkLogicHelper.Invoke(String moduleUri, String inputSearchDetails) at IET.TV.Common.MarkLogicHelper.MarkLogicHelper.InvokeToSingleString(String moduleUri, String separator, String inputSearchDetails)
有没有办法控制如何使用.net XCC 库生成地址格式。 尝试在虚拟机上禁用 IPV6 选项仍然不起作用,是否还有其他选项可以使其正常工作
使用的 Marklogic 库版本是 MarkXCC.Net-8.0-6 和在 .net 4.6 上运行的 MVC 4。
最佳答案
我发现它可以在 Windows 10 上运行
https://support.microsoft.com/en-us/kb/929852
您需要在主机级别禁用 IPV6,Windows 才能不解析为 IPV6 地址。
有一个用于禁用 IPV6 和重新启用它的向导,以及注册表说明。我测试了该向导,它对我有用。 (之前也出现过和你一样的错误)。
我首先尝试了这个:https://msdn.microsoft.com/en-us/library/f59xd138(v=vs.90).aspx
但它不起作用。打印精美 https://msdn.microsoft.com/en-us/library/e2sb8t9k(v=vs.90).aspx
This setting enables IPv6 support for the obsolete members of the Dns class: BeginGetHostByName, BeginResolve, EndGetHostByName, EndResolve, GetHostByAddress, GetHostByName, and Resolve. For other members of the System.Net namespace, IPv6 addresses may be returned if IPv6 is enabled in the operating system.
关于asp.net-mvc - 使用 .net XCC 库将 Azure Webapp 连接到 VM 上的 azure Marklogic:使用了与请求的协议(protocol)不兼容的地址 [::ffff:10.10.1.4]:9501,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40849771/