Aurigma Forums
»
Upload Suite
»
FAQ – ActiveX/Java Uploader
»
PRB: Image Uploader for Java looses HTTP-only cookies
Rank: Advanced Member
Groups: Member, Administration, Moderator Joined: 9/19/2006(UTC) Posts: 505
Was thanked: 41 time(s) in 41 post(s)
|
Hi, As I see the problem is not in authentication, your upload script tries to redirect the POST to another page. The code something like this could be the problem: Code:void Page_Load()
{
//...
Response.Redirect("redirectScript.aspx");
//...
}
BTW, you can see the redirect URL in Java console. I've changed AddCookie sample for windows authentication mode usage and it worked fine in Firefox. All I did is: 1. Remove the string with AddCookie method. 2. Change web.config authentication and authorization sections: Code:<authentication mode="Windows"/>
<authorization>
<allow users="DomainName\DomainUser"/>
<deny users="*"/>
</authorization>
|
Best regards, Eugene Kosmin The Aurigma Development Team
|
|
|
|
Rank: Member
Groups: Member
Joined: 1/29/2007(UTC) Posts: 5
|
I can't seem to get this resolved using php. I tried using the posted solution and it seemed to fix the server redirect message (although I didn't realize it was asp right away ) so my php session is gone. I tried the following as a php equvalent... Code:function ImageUploader1_BeforeUpload(){
getImageUploader("ImageUploader1").AddCookie('PHPSESSID=<?=$_COOKIE['PHPSESSID']?>');
}
iu.addEventListener("BeforeUpload", "ImageUploader1_BeforeUpload");
Still get the server redirect error. Any help would be appreciated. Thanks.
|
|
|
|
Rank: Advanced Member
Groups: Member, Administration, Moderator Joined: 9/19/2006(UTC) Posts: 505
Was thanked: 41 time(s) in 41 post(s)
|
Hi, Your code looks proper. Please try to test it with ActiveX Image Uploader, if the error is still pending – the problem is not with cookies. And what was in java console dump after uploading? |
Best regards, Eugene Kosmin The Aurigma Development Team
|
|
|
|
Rank: Member
Groups: Member
Joined: 1/29/2007(UTC) Posts: 5
|
PHP errors were turned off....The error showed up in the java console. Looks like there is no cookie problem altogether. Thanks!
|
|
|
|
Rank: Member
Groups: Member
Joined: 7/27/2008(UTC) Posts: 10
|
hello, I just downloaded the trial version today and run into the same problem with FireFox. The IE works fine. I used the suggested solution but it doesn't work. Is there any final works or did anybody get it working with FireFox?
|
|
|
|
Rank: Advanced Member
Groups: Member, Administration, Moderator Joined: 8/3/2003(UTC) Posts: 1,070
Thanks: 1 times Was thanked: 12 time(s) in 12 post(s)
|
ycseattle wrote:hello, I just downloaded the trial version today and run into the same problem with FireFox. The IE works fine. I used the suggested solution but it doesn't work. Is there any final works or did anybody get it working with FireFox? Hello, What error do you get? Have you tried to use Image Uploader ActiveX? |
|
|
|
|
Rank: Member
Groups: Member
Joined: 7/27/2008(UTC) Posts: 10
|
Hi, thanks for the reply. I downloaded the free trial yesterday. I am using Visual Studio 2008, but I was not able to add the ActiveX control into the VS toolbox (I selected the four items but they didn't show up in the toolbox), so I just copy&paste the "basic demo" in the sample folder. I modified the code and added the event listener. It works in IE but still getting the redirecting error in FireFox. I think I am using the latest version of everything. How do I use ActiveX? Thanks for your help!
|
|
|
|
Rank: Member
Groups: Member
Joined: 7/27/2008(UTC) Posts: 10
|
This is what shows up in the Java Console when I use FireFox. For some reason the IE does not work anymore, giving a different error saying "Some server-side error occurred". Ideas? Aurigma ImageUploader version: 5.1.10.0 Current document URL: http://localhost:1295/Albums/CreateNewAlbum Reading cookies Reading referer Referer: http://localhost:1295/Albums/CreateNewAlbum Reading additional form content Uploading to http://localhost:1295/Albums/SaveUploadedPhoto Setting HTTP params: Host=localhost; Port=1295 Cookies:[AlbumB=CA674199029A1E962BC6012D7E46F7D3215CD5780D725C0B3BA21FEEE121A8F2DBFE327D685E9CE9851DF114BA958232253F8AE2C5234228C0DDFE0405DAD1E0E1188D46EFAE0D167E1E9A074A77D7F0] Starting upload ###Error occured### Status=[ERROR] Progress=[0] ValueMax=[0] Value=[11] [ErrorPage] [EndOfErrorPage]
|
|
|
|
Rank: Advanced Member
Groups: Member, Administration, Moderator Joined: 8/3/2003(UTC) Posts: 1,070
Thanks: 1 times Was thanked: 12 time(s) in 12 post(s)
|
Hello, I guess the problem is with authentication. You pass authentication ID via cookie and lose it while uploading. You need to do the same trick as with sessions: Code:
getImageUploader("ImageUploader1").AddCookie('USERID=Value');
USERID - cookie name, please, insert your authentication cookie name instead. Value - authentication value. Edited by user Monday, July 28, 2008 9:30:25 PM(UTC)
| Reason: Not specified |
|
|
|
|
Rank: Newbie
Groups: Member
Joined: 8/19/2008(UTC) Posts: 1
|
Has this issue been resolved yet? I am having the same exact problem with FireFox. My upload script itself does not do a redirect, but my ImageUploader script includes iu.addParam("RedirectUrl", "PhotoAlbums.aspx"); Eugene Kosmin wrote:Redirect is still possible. The behavior you described should work correctly. But you can’t do redirect from the script which handles your upload data. URL to this script is specified in Action property. For example, you can’t do such thing in upload.aspx: Code:<script runat="server">
void Page_Load()
{
Response.Redirect("RedirectAction.aspx");
}
</script>
|
|
|
|
Rank: Advanced Member
Groups: Member, Administration, Moderator Joined: 8/3/2003(UTC) Posts: 1,070
Thanks: 1 times Was thanked: 12 time(s) in 12 post(s)
|
Hello, Sorry, I did not understand whether you perform redirect in your server upload script or not. If not it should be a problem with forms authentication. The way to fix it is described in the first post of this thread. |
|
|
|
|
Rank: Advanced Member
Groups: Member, Administration, Moderator Joined: 8/3/2003(UTC) Posts: 1,070
Thanks: 1 times Was thanked: 12 time(s) in 12 post(s)
|
Hello, I just want to add the same trick with HTTP-Only cookies for session variables. All you need to fix the problem is to pass the cookie in the way described above. The name of cookie is ASP.NET_SessionId. You need to insert BeforeUpload event handler in your script and add the following: Code:
function ImageUploader_BeforeUpload()
{
getImageUploader("ImageUploader").AddCookie('ASP.NET_SessionId=<%= Session.SessionID %>');
}
Edited by user Tuesday, February 3, 2009 5:26:58 PM(UTC)
| Reason: Not specified |
|
|
|
|
Rank: Newbie
Groups: Member
Joined: 9/8/2008(UTC) Posts: 4
|
Hello, I am currently trying out Image Uploader Dual 5.5 with PHP 5. I was having a problem losing the HTTP cookie upon uploading, so I used the code posted above: Code:
function ImageUploader1_BeforeUpload(){
getImageUploader("ImageUploader1").AddCookie('PHPSESSID=<?=$_COOKIE['PHPSESSID']?>');
}
iu.addEventListener("BeforeUpload", "ImageUploader1_BeforeUpload");
This fixed my problem on Firefox 2.0... everything works great there. On IE 6/7 I am still losing the cookie. On IE 6, I am getting a JavaScript runtime error "Object doesn't support this property or method" on the following line: Code:
getImageUploader("ImageUploader1").AddCookie('PHPSESSID=<?=$_COOKIE['PHPSESSID']?>');
Any ideas? I've tried everything I can think of... thank you in advance.
|
|
|
|
Rank: Advanced Member
Groups: Member, Administration, Moderator Joined: 8/3/2003(UTC) Posts: 1,070
Thanks: 1 times Was thanked: 12 time(s) in 12 post(s)
|
Hello, parkeug wrote:This fixed my problem on Firefox 2.0... everything works great there. On IE 6/7 I am still losing the cookie. On IE 6, I am getting a JavaScript runtime error "Object doesn't support this property or method" on the following line: The problem with loss of HTTP-only cookies concerns Java version only. So you should use AddCookie method with Image Uploader Java. To perform it you can add condition when you specify event handler calling AddCookie: Code:
if (iu.getControlType() == "Java"){
iu.addEventListener("BeforeUpload", "ImageUploader1_BeforeUpload");
}
|
|
|
|
|
Rank: Newbie
Groups: Member
Joined: 9/8/2008(UTC) Posts: 4
|
Dmitry, Thank you for the help and the quick response. Unfortunately I am still losing the cookie in IE 6/7. The JavaScript runtime error has been resolved and was something else unrelated. Do you have any ideas on how I can continue to troubleshoot this issue? This is the only thing holding me back from purchasing this great product. Thank you again for your help.
|
|
|
|
Rank: Advanced Member
Groups: Member, Administration, Moderator Joined: 8/3/2003(UTC) Posts: 1,070
Thanks: 1 times Was thanked: 12 time(s) in 12 post(s)
|
Hello, Do you use Java or ActiveX version in IE? The problem with cookies loss concerns Java version only. We had no reports on this problem with ActiveX before. Edited by user Thursday, September 11, 2008 1:53:44 PM(UTC)
| Reason: Not specified |
|
|
|
|
Rank: Newbie
Groups: Member
Joined: 9/8/2008(UTC) Posts: 4
|
Dmitry, I am using the ActiveX version in IE (5.5.6.0). I have tried several things but to no avail. If I use an empty upload.php and gallery.php, I still lose the cookie. Again, the Java version in Firefox works fine. The cookie seems to disappear right as the file upload starts. Is there anything I can do to troubleshoot this further? Thank you again for your time.
|
|
|
|
Rank: Newbie
Groups: Member
Joined: 9/8/2008(UTC) Posts: 4
|
Dmitry, I am having the exact same problem described in this thread: http://forums.aurigma.com/yaf_postst1485.aspx I am using CakePHP 1.2, and basically my session is getting wiped out in the ActiveX version. I then came across this thread: http://forums.aurigma.com/yaf_postsm1878.aspx#1878 Is this in fact a known cause for this problem, and if so, will the recommended fix action be available any time soon? Thank you again for your help. Again, I'd love to buy the product, but I desperately need session support.
|
|
|
|
Rank: Advanced Member
Groups: Member, Administration, Moderator Joined: 8/3/2003(UTC) Posts: 1,070
Thanks: 1 times Was thanked: 12 time(s) in 12 post(s)
|
Hello, Okay, thank you for your detailed posts. Could you submit a case with your problem in our support incidents management system and add a link to the page where you experience the issue there? We will do our best to troubleshoot it and provide you with a solution. |
|
|
|
|
Rank: Newbie
Groups: Member
Joined: 9/22/2008(UTC) Posts: 3
|
Hello. Adding FormsAuthentication cookie by the "AddCookie" method solve this problem partially. Suppose to have the following scenario: - Access to application Directory "Admin" is allowed only for authenticated users. - An authenticated user try to upload a big amount of images. - The upload process start correctly. - While upload process is active, FormsAuthentication cookie expires. - Upload process terminates and user is redirected to the url specified into the "RedirectUrl" property "/Admin/ShowUploadedImages.aspx". - The ASP.NET runtime cannot find an athenticated user and forces a redirect to the login page ("/SignIn.aspx"): - The aurigma ImageUploader cotrol shows the error "The server attempted to redirect you, but server rdirects are not supported".
|
|
|
|
Aurigma Forums
»
Upload Suite
»
FAQ – ActiveX/Java Uploader
»
PRB: Image Uploader for Java looses HTTP-only cookies
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.