有趣的问题:FLEX 多次请求中间出错!

错误信息:
1。Content Object flex.messaging.messages.ErrorMessage
2。Detected duplicate HTTP-based FlexSessions, generally due to the remote host disabling session cookies. Session cookies must be enabled to manage the client connection correctly.
3。String Server.Processing.DuplicateSessionDetected
描述:如下代码段在运行时,Foreach执行第一次是出错,第二次正确,如此循环至foreach终止。 问题出在什么方?高手请帮看一下,急等!!!!

 foreach (CPNOLTPackageInfo cpn in requestMethod.cpnOltPackageInfo)

            {
                var slotcode = cpn.slotCode;
                // 封装一个Message
                AMFPostData cpnoltpostdata = new AMFPostData(AMFType.AMF3, 0, 1);
                cpnoltpostdata.AddTargetAndResponse("null", "null");
                RemotingMessage cpnoltmessage = new RemotingMessage();
                cpnoltmessage.operation = "listPortInfoByOltPkg";
                cpnoltmessage.source = null;
                cpnoltmessage.timestamp = 0;
                cpnoltmessage.clientId = null;
                cpnoltmessage.timeToLive = 0;
                cpnoltmessage.messageId = Guid.NewGuid().ToString().ToUpper();
                cpnoltmessage.destination = "cpnMgmtFacade";

                List<object> cpnoltbody = new List<object>();
                cpnoltbody.Add(int.Parse(shOltID));
                cpnoltbody.Add(slotcode);
                cpnoltmessage.body = cpnoltbody; ;

                Dictionary<string, object> cpnobjoltHeaders = new Dictionary<string, object>();
                cpnobjoltHeaders.Add("DSEndpoint", "my-amf");
                cpnobjoltHeaders.Add("DSId", Guid.NewGuid().ToString().ToUpper());
                cpnoltmessage.headers = objoltHeaders;

                AMFPostDataBody cpnoltpostdatabody = new AMFPostDataBody(DataType.Array, 1);
                cpnoltpostdatabody.AddData(DataType.AMFdata, cpnoltmessage);
                cpnoltpostdata.AddBody(cpnoltpostdatabody);

                byte[] cpnoltdata = cpnoltpostdata.Message.ToArray();
                requestMethod.PostOltPortData(cpnoltdata, sh_Url, currentCookie);//请求查询

            }

1个回答

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问
相关内容推荐