【问题标题】:AngularJS Web API - IE does not post Form bodyAngularJS Web API - IE 不发布表单正文
【发布时间】:2015-08-10 22:02:51
【问题描述】:

当我在 Angular JS(使用 IE 11)中执行 http post 时,OAuthValidateClientAuthenticationContext 表单正文不包含 ValidateClientAuthentication 的任何数据。

请注意,这对 Chrome 和 Firefox 非常有效。如果我打开调试器并切换到 IE 9,它可以工作,但是当我关闭调试器时,它会切换到 IE 11 并停止工作。

任何想法表示赞赏!

//sample code    
var data = "grant_type=password&username=john&password=mYpass10&client_id=self"

this.$http.post('/token', 
    data, { headers: { 'Content-Type': 'application/x-www-form-urlencoded' } })
    .success(function(response: any) {})
    .error(function(err, status) {});

【问题讨论】:

    标签: javascript angularjs oauth-2.0 asp.net-web-api internet-explorer-11


    【解决方案1】:

    将以下内容添加到您的页面会解决问题吗?

    <meta http-equiv="x-ua-compatible" content="IE=9" >

    这显然是微软正在调查的一个错误。查看更多信息:

    http://blog.yorkxin.org/posts/2014/02/06/ajax-with-formdata-is-broken-on-ie10-ie11/

    Why is IE 10 Refusing to send POST data via jQuery $.ajax

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-02-18
      • 2013-12-03
      • 1970-01-01
      • 2016-05-10
      • 2016-08-17
      • 1970-01-01
      相关资源
      最近更新 更多