apache-flex 为什么我的Adobe Air应用程序中出现错误#2032?

uqdfh47h  于 2022-10-31  发布在  Apache
关注(0)|答案(2)|浏览(217)

我正在使用Adobe Air桌面应用程序。当尝试使用...进行后端呼叫时,我收到错误(错误#2032)

  1. <mx:HTTPService id="xmlReadDownloadSizeObject"
  2. resultFormat="xml"
  3. result="xmlDownloadSizeResultEvent(event)"
  4. fault="xmlDownloadSizeFaultEvent(event)"
  5. public function askDownloadSize(xmlString:String):void
  6. {
  7. var xmlParam:XML = new XML("<files>" + xmlString + "</files>");
  8. globaltotalSize = 0;
  9. xmlReadDownloadSizeObject.url = mainDataURL + "downloadsize.ashx";
  10. xmlReadDownloadSizeObject.method = "POST";
  11. xmlReadDownloadSizeObject.contentType = "application/xml"
  12. xmlReadDownloadSizeObject.send(xmlParam);
  13. }

mx.rpc.events.FaultEvent
错误:[IOErrorEvent类型=“ioError”气泡=假可取消=假事件阶段=2文本=“错误#2032:流错误。URL:“错误ID =2032]。网址:http://localhost:5800/downloadsize.ashx英寸
当我将后端调用更改为本地计算机上的网站应用程序副本(http://localhost:5800/downloadsize.ashx)时,开始出现此错误。我最初是直接调用服务器(https://www.serverName.com/Marathon/)。
我一直在试图弄清楚这个错误一整天了,现在几乎把我的手抛到空中!如果有人能提供一些有用的见解,我将非常感激!
如果你需要更多的信息,请告诉我。谢谢

pdsfdshx

pdsfdshx1#

该操作花费的时间比平时长,所以我通过设置更改了最大执行时间...

  1. import flash.net.URLRequestDefaults;
  2. URLRequestDefaults.idleTimeout = 1200000; // or any amount of time in ms

还应注意,只有在应用程序安全沙箱中运行的Adobe® AIR®内容才能使用URLRequestDefaults类。其他内容在访问此类的成员或属性时将导致抛出SecurityError。
请参阅Adobe live docs

aij0ehis

aij0ehis2#

对于那些通过Google搜索来到这里的人:
我在安装Adobe Air应用程序时遇到错误2032,因为提供的文件名不正确。所以解决错误的第二步是检查URL。

相关问题