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

问题描述 投票:1回答:2

我正在开发Adobe Air桌面应用程序。使用...尝试后端呼叫时出现错误(错误#2032)

<mx:HTTPService id="xmlReadDownloadSizeObject"
    resultFormat="xml"
    result="xmlDownloadSizeResultEvent(event)"
    fault="xmlDownloadSizeFaultEvent(event)"

public function askDownloadSize(xmlString:String):void
{
    var xmlParam:XML = new XML("<files>" + xmlString + "</files>");
    globaltotalSize = 0;
    xmlReadDownloadSizeObject.url = mainDataURL + "downloadsize.ashx";
    xmlReadDownloadSizeObject.method = "POST";
    xmlReadDownloadSizeObject.contentType = "application/xml"
    xmlReadDownloadSizeObject.send(xmlParam);
}

mx.rpc.events.FaultEvent

faultDetail“错误:[IOErrorEvent type =”ioError“bubbles = false cancelable = false eventPhase = 2 text =”错误#2032:流错误。网址:http://localhost:5800/downloadsize.ashx“errorID = 2032] .URL:http://localhost:5800/downloadsize.ashx

当我将后端调用更改为本地计算机上的网站应用程序副本(http://localhost:5800/downloadsize.ashx)时,会发生此错误。我最初直接调用服务器(https://www.serverName.com/Marathon/)。

我一直试图将这个漏洞弄清楚了一整天,我几乎把手举到空中!如果有人能提供一些有用的见解,我将不胜感激!

如果您需要更多信息,请与我们联系。谢谢

actionscript-3 flex actionscript air
2个回答
0
投票

操作时间比平时长,所以我通过设置来改变最大执行时间......

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

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

Adobe live docs


0
投票

对于那些来自Google搜索的人:

我在安装Adobe Air应用程序时遇到错误2032,因为提供的文件名不正确。因此,解决错误的第二步是检查URL。

© www.soinside.com 2019 - 2024. All rights reserved.