Solution for session and cookie invalidation when uploadify is used

Source: Internet
Author: User
 

Cat's original blog: http://zoechina.sinaapp.com /? P = 10

Cause:
Uploadify upload processing file (uploadify. in PHP), when a cookie or session is used, it is normal in IE, but fails in opera, chrome, and Firefox, the reason is that uploadify's use of cookies and sessions is limited by the inherent rules of Adobe Flash reference: http://www.antennule.net /? P = 241

Symptom:
Cookie. The session does not match the cookie and session left during the previous upload.

Solution:
During the upload, the cookie value is returned to the server again.
Here we use the configuration provided by uploadify and return it in post form.
'Scriptdata': {'firstname': 'ronni', 'age': 30}
API: http://www.uploadify.com/documentation/options/scriptdata/
In this way, we can get the value in form in the background.

Request.Cookies["userID"].Value
= HttpUtility.UrlEncode(Request.Form["userID"],Encoding.GetEncoding("UTF-8"));

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.