Angular 使用 IE9 上传文件错误 ieframe.dll

Angular upload file error with IE9 ieframe.dll

我正在使用 angular-upload 处理通过 HTTPS 提供的应用程序中的文件上传。 Angular-upload 设置为 "fall back to iframe upload when FormData isn't supported," 但在 IE9 中使用 iframe 通过 HTTPS 上传的组合导致控制台中出现以下错误:

SEC7111: HTTPS security is compromised by res://ieframe.dll/forbidframing.htm 
SEC7111: HTTPS security is compromised by res://ieframe.dll/ErrorPageTemplate.css 
SEC7111: HTTPS security is compromised by res://ieframe.dll/errorPageStrings.js 
SEC7111: HTTPS security is compromised by res://ieframe.dll/httpErrorPagesScripts.js 
SEC7111: HTTPS security is compromised by res://ieframe.dll/red_x.png 
SEC7111: HTTPS security is compromised by res://ieframe.dll/bullet.png 
SEC7111: HTTPS security is compromised by res://ieframe.dll/background_gradient.jpg 

我尝试将 add name="X-Frame-Options" value="SAMEORIGIN" 添加到 web.config 中的自定义 headers ,以及删除 add name="Strict-Transport-Security" value="max-age=31536000",但这两种方法都没有改变结果。

除了拒绝支持 IE9(在这种情况下不是一个选项)之外,还有其他想法如何使 angular-upload 在 IE9 中与 HTTPS/iframe 很好地兼容吗?

UPDATE 通过使用 [AllowAnonymous] 标记网络 api 方法,我能够部分解决问题。上传的文件现在被接受了,但是出现了一个相关的问题:

1) 我可以在 "Network" 监视器上看到服务器返回响应,如预期的那样

2) 但是,监视器显示请求永久处于 "Pending" 状态,因此响应数据永远不会返回到 Angular 控制器,因此永远不会更新 UI

3) 上面显示的相同错误列表继续显示在控制台中

错误消息显示您的子框架有一个 X-FRAME-OPTIONS header 阻止它被加框。你需要解决这个问题;使用 Fiddler 验证 header 是否已正确删除。

另请注意,IE 会将 application/json 视为文件下载,不会内联呈现。