我使用了uploadify插件上传文件
多文件上传,有进度条显示
上传操作写在ashx中
但是我有些值得传递回去,我就放入session
  context.Session["xxx"]="aaa";
上传成功跳转到a.aspx中
string str=Session["xxx"];
我在IE中和FF中都可以上传并传递session
在Google浏览器中就出现了错误
URI formats are not supported.Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.ArgumentException: URI formats are not supported.Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

解决方案 »

  1.   

    session 不存在有传递这种说法,可以认为是个公共变量你这个问题,不知道是哪行代码报错,但上面的描述来看,是你的提交地址有问题,跟session无关
      

  2.   

    string str=Session["xxx"];
    就出错了
    但是IE和FF中都可以
      

  3.   

    string str=Session["xxx"];出错的
    Session["xxx"]这个出错,对象未引用
    但是IE和FF中都是可以的
      

  4.   

    Session["xxx"]他就是为null
    所以我很尴尬
    求解
    帮助啊
      

  5.   

    估计应该是你的google浏览器禁用cookie了吧,而session设置又刚好设置成依赖cookie的,所以就传不过去了
      

  6.   

    session的传递跟客户端浏览器关系不大(除非同时用到了cookie),这个是服务器端的动作.
    但是不保证chrome的open或者跳转页面会刷新页面(相当于新建连接,重建会话)造成session丢失.
    (推测而已,没有怎么弄过chrome)因此.可能出错的地方
    1.uploadify插件在chrome下表现异常,造成页面跳转不成功
    2.你代码的错误,可能url写法不正确,或者跳转动作完成前出错.
      

  7.   

    uploadify可以在chrome下上传,也已经传到服务器
    上传成功后我跳转到a.aspx
    a.aspx中调用session为null
    IE和FF中都是正确的
      

  8.   

    调浏览器的安全级别。是浏览器的安全级别限制了 seesion 的读取。建议你别搞啥session 来存。
      

  9.   

    使用其他上传组件看看
    或ajax无刷新上传文件,使用iframe模仿 
    检查跳转方法
      

  10.   

    在一般处理程序中用session引用
    using System.Web.SessionState;public class Handler : IHttpHandler, IRequiresSessionState
      

  11.   

    IRequiresSessionState我实现了
    不用session来存
    那还有其他办法把值从ashx传递到ascx吗?
      

  12.   

    干嘛用Session传?处于安全考虑!??uploadify传值网上应该有啊!我自己的方案(GET):
    $('#uploadify').uploadifySettings('script','upload.ashx?opertype=pricedocument&id=' + id);
    //点击上传前,动态设置参数;
      

  13.   

    我是需要从ashx中传值到ascx中
    不是ascx传到ashx
    我实在没找到传值方法
      

  14.   


    顶这个,然后在程序中通过context.Session["aa"]来获取值
      

  15.   

    有时候ahsx会出现 session为空的情况,你可以这样解决:引用
    using System.Web.SessionState;命名空间显式地实现这个接口,
    public class Handler : IHttpHandler, IRequiresSessionState这样做就OK了
      

  16.   


    在aspx中如何获取呢?
      

  17.   

    我也遇到这个问题,登录是在aspx文件里配置session的。为了实现Ajax效果,使用了ashx一般处理程序,结果发现一般处理程序中没法获取session里的值。纠结了好久哦?