使用XRMToolbox连接Dataverse时遇“目标机器主动拒绝连接”错误求助
问题现象
- 连接Dataverse时触发报错,核心错误信息:
System.Exception: One or more errors occurred. = > An error occurred while sending the request. = > Unable to connect to the remote server = > No connection could be made because the target machine actively refused it
REQUESTING TOken FROM THE authentication context - General ADAL Error
One or more errors occurred. An error occurred while sending the request. Unable to connect to the remote server No connection could be made because the target machine actively refused it
<Server IP:0ne or more errors occurred. An error occurred while sending the request. Unable to connect to the remote server NO connection could be made because the target machine actively refused it
to connect to CRM: An error occurred while sending the request,
One or more errors occurred. An error occurred while sending the request. Unable to connect to the..”.
- 操作流程:打开XRMToolbox选择工具(如Record Counter)→ 提示需连接组织→点击“是”后新建连接→选择“连接向导”手动输入信息→触发错误
- 网络排查:运行
tracert命令可解析地址,但仅完成内部网络跳数,无法访问外部服务器,疑似无法离开局域网
排查与解决步骤
确认网络出口权限
- 联系公司IT确认是否限制了访问Dataverse的公网IP/443端口,是否需要通过企业VPN或代理服务器访问外部网络
- 直接访问Dataverse组织的Web端地址,验证网络是否能正常到达目标服务器,排除XRMToolbox本身的问题
配置XRMToolbox代理
- 打开XRMToolbox的设置(齿轮图标),找到“代理”选项
- 若公司网络需代理,勾选“使用系统代理设置”或手动输入企业代理地址、端口,保存后重新尝试连接
验证连接信息准确性
- 确认手动输入的Dataverse组织URL(格式如
https://yourorg.crm.dynamics.com)、用户名、密码无误 - 尝试使用“快速查找组织”功能自动匹配,避免手动输入URL出错
- 确认手动输入的Dataverse组织URL(格式如
更新组件与排查本地拦截
- 通过XRMToolbox的“插件更新”功能,检查并更新所有依赖组件(包括ADAL认证库)
- 临时关闭本地防火墙或杀毒软件的出站拦截规则,测试连接是否恢复(测试后立即恢复防护)
端口连通性测试
- 运行PowerShell命令
Test-NetConnection <Dataverse服务器IP> -Port 443,或使用telnet <Dataverse服务器IP> 443,确认目标端口是否能连通 - 请IT排查企业防火墙是否存在针对XRMToolbox进程的出站拦截规则
- 运行PowerShell命令
内容的提问来源于stack exchange,提问作者Gideon

