异常调用“DownloadString"带有“1"参数:“无法连接到远程服务器" [英] Exception calling "DownloadString" with "1" argument(s): "Unable to connect to the remote server"

查看:89
本文介绍了异常调用“DownloadString"带有“1"参数:“无法连接到远程服务器"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚开始使用以下命令在 Windows 10 上安装 NativeScript:

I just started to install NativeScript on Windows 10 with this command:

@powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((new-object net.webclient).DownloadString('https://www.nativescript.org/setup/win'))"

我从这里的安装指南中得到 https://docs.nativescript.org/角度/开始/快速设置

that I got from installation guide here https://docs.nativescript.org/angular/start/quick-setup

但我收到此错误消息:

Exception calling "DownloadString" with "1" argument(s): "Unable to connect to the remote server"
At line:1 char:1
+ iex ((new-object net.webclient).DownloadString('https://www.nativescr ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : WebException


C:Windowssystem32>@powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((new-object net.webclient).DownloadString('https://www.nativescript.org/setup/win'))"
Exception calling "DownloadString" with "1" argument(s): "Unable to connect to the remote server"
At line:1 char:1
+ iex ((new-object net.webclient).DownloadString('https://www.nativescr ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : WebException

有什么问题,我该如何解决?

What is the problem and how can I fix?

推荐答案

以下步骤对我有用:

  1. 从 URL 下载文件 (https://www.nativescript.org/setup/win).
  2. 以管理员身份运行 cmd 并 cd 到您下载文件的目录.
  3. 在cmd中执行以下命令:powershell -noexit "&""./native-script.ps1"""

这篇关于异常调用“DownloadString"带有“1"参数:“无法连接到远程服务器"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆