跨域请求的重复Flex会话 [英] Duplicate Flex Sessions With Cross-Domain Requests

查看:169
本文介绍了跨域请求的重复Flex会话的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我在本地发出请求时,我在维护我的FlexSession时没有任何问题;但是,当我从另一台计算机发出请求时,它会为每个请求创建重复的FlexSession。我注意到JSESSIONID对于每个请求是不同的,这是可能导致被欺骗的会话。

When I make a request locally, I have no problems at all maintaining my FlexSession; however, when I make a request from another computer, it creates duplicate FlexSession for every request. I noticed the JSESSIONID is different for each request which is what's probably causing the duped sessions.

但我不知道为什么会发生。我得到的具体错误是:

But I have no idea why this is happening. The specific error I get is:

Channel.Ping.Failed error 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.

我的crossdomain.xml如下:

My crossdomain.xml is as follows:

<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
    <site-control permitted-cross-domain-policies="master-only"/>
    <allow-access-from domain="*" secure="false"/>
    <allow-http-request-headers-from domain="*" headers="*" secure="false"/>
</cross-domain-policy>

编辑

我们在后端使用spring-flex集成。此外,这种情况发生在多个浏览器;我们尝试过IE,Firefox和Chrome。

We are using spring-flex integration on the backend. Also, this happens in multiple browsers; we tried IE, Firefox, and Chrome.

这里是Flex代码:

var ro : RemoteObject = new RemoteObject("myDestination");
ro.endpoint = "http://localhost/foo";
ro.source = "com.bar.MyService";

var op : AbstractOperation = ro.getOperation("serviceMethod");
op.addEventListener( FaultEvent.FAULT, ro_faultHandler );
op.addEventListener( ResultEvent.RESULT, ro_resultHandler );
op.send();


推荐答案

文章是由一些工作在BlazeDS的家伙写的,你应该能够在阅读它们后解决你的问题。如果没有,尝试创建一个功能测试再现的问题,我会看看。

There are three articles describing what happens. The articles are written by some guys working on BlazeDS and you should be able to fix your problem after reading them. If not, try to create a functional test reproducing the problem and I'll take a look.

Alex的博客

< a href =http://meteatamel.wordpress.com/2011/01/26/duplicate-session-errors-in-lcdsblazeds/> Mete的博客

线上博客

这篇关于跨域请求的重复Flex会话的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆