【问题标题】:Error 400 (Bad Request) from Visual Studio 2015 Ripple来自 Visual Studio 2015 Ripple 的错误 400(错误请求)
【发布时间】:2015-09-24 13:13:04
【问题描述】:

我正在尝试从 Visual Studio 的 2015 Android Ripple Emulator 作为 WCF 服务访问,但我收到错误 400:错误请求。我修改了在 C:\Users\User\AppData\Roaming\npm\node_modules\vs-tac\node_modules\ripple-emulator\lib\server\proxy.js 中找到的 proxy.js

来自:

app.use(express.bodyParser());

到:

app.use(bodyParser.text({type: '*/*'}));

但这并没有解决问题,正在尝试访问 WCF 服务,如下所示 - http://localhost:4400/ripple/xhr_proxy?tinyhippos_apikey=ABC&tinyhippos_rur...http%3A//example.com/Service.svc/GoodToGo%3Fmessage%3DOK

有没有人设法解决了这个问题(经过这个帖子后我没有解决 - Expressjs raw body

【问题讨论】:

    标签: wcf cordova ripple


    【解决方案1】:

    您可以通过禁用网络安全来避免此错误。

    1. 关闭所有 Chrome 实例。
    2. 使用 --disable-web-security 参数打开 Chrome。
    3. 通过 Ripple 运行应用程序。
    4. 在页面右侧,点击setting -> cross domain proxy,设置为disable
    5. 刷新应用并运行。

    【讨论】:

    • 谢谢。所以基本上我正在做的是我(暂时)禁用 Chrome 上的所有网络安全以解决这个问题。
    猜你喜欢
    • 1970-01-01
    • 2015-04-03
    • 1970-01-01
    • 2018-04-27
    • 1970-01-01
    • 2017-08-04
    • 1970-01-01
    • 1970-01-01
    • 2018-06-22
    相关资源
    最近更新 更多