Welcome Guest! You need to login or register to make posts.

Notification

Icon
Error

Options
Go to last post Go to first unread
Mohan  
#1 Posted : Monday, March 3, 2008 5:39:15 PM(UTC)
Mohan

Rank: Newbie

Groups: Member
Joined: 3/3/2008(UTC)
Posts: 9

I am using Image Uploader ImageUploader4.cab having versions
activeXControlVersion = "4,5,70,0";
javaAppletVersion = "2.5.70.0";

I am using asp.net 3.5, When i have created separate application with these set of files then it runs well, but my actual application has cookies that i have set thru javascript and when i am trying to integrate these files of Basic Demo(Default.aspx,Gallery.aspx,Upload.aspx), i did the same as i have done in other application without having cookies.
While uploading it throws Error as
"The server attempted to redirect you, but server redirects are not supported".
Then i gone thru this forum i found the solution that

function ImageUploader1_BeforeUpload(){
getImageUploader("ImageUploader1").AddCookie('<%=FormsAuthentication.FormsCookieName %>=<%= Request.Cookies[FormsAuthentication.FormsCookieName].Value %>');
}

i did the same.But again its not working...Actually i got the point that why this error occurs but i am not getting the solution how to handle, plz give me detail code how to write this solution <%=FormsAuthentication.FormsCookieName%>=
<%= Request.Cookies[FormsAuthentication.FormsCookieName].Value %>

The only thing i come to know that it happens only when i am using cookies, and i am planning to purchase this product once the issue is being solved.
Brick wall
Eugene Kosmin  
#2 Posted : Wednesday, March 5, 2008 4:13:03 PM(UTC)
Eugene Kosmin

Rank: Advanced Member

Groups: Member, Administration, Moderator
Joined: 9/19/2006(UTC)
Posts: 455

Was thanked: 27 time(s) in 27 post(s)
Hello Mohan,

One of the symptoms when AddCookie method should be used is working ActiveX version. Please try to test you app with ActiveX.

You can try to debug redirection with Error event. When server tries to redirect, the new redirect address comes to this event. Maybe it would be useful.

Edited by user Wednesday, March 5, 2008 4:16:57 PM(UTC)  | Reason: Not specified

Best regards,
Eugene Kosmin.
Aurigma Development Team
Mohan  
#3 Posted : Thursday, March 6, 2008 10:02:31 PM(UTC)
Mohan

Rank: Newbie

Groups: Member
Joined: 3/3/2008(UTC)
Posts: 9

I am using ImageUplaoder 5.0 with asp.net 3.5 framework
I think my prob is in below line
//Configure URL files are uploaded to.
iu.addParam("Action","upload.aspx");
the above code is working fine in IE 7 but it gives Server redirection error in FireFox. I think in Firefox it is not taking the upload.aspx direct path
Eugene Kosmin  
#4 Posted : Monday, March 10, 2008 2:42:20 PM(UTC)
Eugene Kosmin

Rank: Advanced Member

Groups: Member, Administration, Moderator
Joined: 9/19/2006(UTC)
Posts: 455

Was thanked: 27 time(s) in 27 post(s)
Try to replace BeforeUpload handler for this:
Code:
function ImageUploader_BeforeUpload()
{    getImageUploader("ImageUploader").AddCookie('<%=FormsAuthentication.FormsCookieName %>=<%= Request.Cookies[FormsAuthentication.FormsCookieName].Value %>; ' + document.cookie);
}

Could you post here the entire page code ?
Best regards,
Eugene Kosmin.
Aurigma Development Team
Mohan  
#5 Posted : Thursday, March 13, 2008 11:10:31 PM(UTC)
Mohan

Rank: Newbie

Groups: Member
Joined: 3/3/2008(UTC)
Posts: 9

Here is my complete code and snapshot it shows Error code 4
<script type="text/javascript">
var imageUploader1 = null;
function Check_DDCategory()
{
imageUploader1.Send();
}
function fullPageLoad(){
imageUploader1=getImageUploader("ImageUploader1");
}
function selectView_change(){
if (imageUploader1){
var selectView = document.getElementById("selectView");
imageUploader1.setFolderView(parseInt(selectView.options[selectView.selectedIndex].value));
}
}
function ImageUploader_UploadFileCountChange(){
//imageUploader1=getImageUploader("ImageUploader1");
//imageUploader1.AddCookie('<%=FormsAuthentication.FormsCookieName %>=<%= Request.Cookies[FormsAuthentication.FormsCookieName].Value %>; ' + document.cookie);
//getImageUploader("ImageUploader1").AddCookie('<%=FormsAuthentication.FormsCookieName %>=<%= Request.Cookies[FormsAuthentication.FormsCookieName].Value %>');

}
function ImageUploaderID_Error(ErrorCode, HttpResponseCode, ErrorPage, AdditionalInfo) {
alert(ErrorCode);
}
</script>
<body style="background-color:white;">
<script type="text/javascript">
var imageUploader1 = null;
</script>
<div style="display:none;">
<input id="TotalSourceFileSize" name="TotalSourceFileSize" type="text" value="0" />
</div>
<form id="Form3" runat="server">
<div style="clear:both"></div>
<div class="textwhite" style="display:none;">Category:
<asp:DropDownList runat="server" Width="100px" CssClass="text" ID="DDCategory"></asp:DropDownList></div>
<div style="clear:both"></div>
</form>
<table cellspacing="0" cellpadding="0" border="0" style="float:left;" class="Toolbar">
<tbody>
<tr>
<td >
</td>
<td class="Panel">
<table cellspacing="0" border="0">
<tbody>
<tr>
<td>
<a href="#" onclick="imageUploader1.SelectAll();return false;">
<img class="Icon" src="Images/SelectAllSmall.gif" alt="Select All" />&nbsp;Select&nbsp;All
</a>
</td>
<td>
<a href="#" onclick="imageUploader1.DeselectAll();return false;">
<img class="Icon" src="Images/DeselectAllSmall.gif" alt="Deselect All" />&nbsp;Deselect&nbsp;All
</a>
</td>
<td>
<a href="#" onclick="Check_DDCategory();">
<img class="Icon" src="Images/SendSmall.gif" alt="Upload" />&nbsp;Upload </a>
</td>
<td>
<img class="Separator" src="Images/ToolbarSeparator.gif" alt="" />
</td>
<td>
<a href="#" onclick="imageUploader1.Refresh();return false;">
<img class="Icon" src="Images/RefreshSmall.gif" alt="Refresh" />&nbsp;Refresh </a>
</td>
<td>
<img class="Separator" src="Images/ToolbarSeparator.gif" alt="" />
</td>
<td>
<select id="selectView" onchange="selectView_change();">
<option value="0" selected="selected">Thumbnails</option>
<option value="1">Icons</option>
<option value="2">List</option>
<option value="3">Details</option>
</select>
</td>
</tr>
</tbody>
</table>
</td>
<td class="Right">
</td>
</tr>
</tbody>
</table>
<script type="text/javascript">
//<![CDATA[
//Create JavaScript object that will embed Image Uploader to the page.
var iu = new ImageUploaderWriter("ImageUploader1", 650,500);
//****Start of Ver 5.0******
iu.activeXControlCodeBase = "../ImageUploader5.cab";
iu.activeXControlVersion = "5,0,40,0";
iu.javaAppletJarFileName = "ImageUploader5.jar";
iu.javaAppletCodeBase = "../";
iu.javaAppletCached = true;
iu.javaAppletVersion = "5.0.40.0";
iu.showNonemptyResponse = "off";
//***End of Ver 5.0*****
//Configure appearance.
iu.addParam("PaneLayout", "ThreePanes");
iu.addParam("ShowDebugWindow", "true");
iu.addParam("ShowButtons", "False");
iu.addParam("AllowRotate", "false");
iu.addParam("BackgroundColor", "#F5F8F0");
iu.addParam("ShowDescriptions", "false");
////Configure License Keys
iu.addParam("LicenseKey", "71050-4620A-00000-092A8-E12C6;72050-4620A-00000-0F10B-988AB");
//Configure thumbnail settings.
iu.addParam("UploadThumbnail1FitMode", "Fit");
iu.addParam("UploadThumbnail1Width", "200");
iu.addParam("UploadThumbnail1Height", "200");
iu.addParam("UploadThumbnail1JpegQuality", "60");
//Start:Configure MedRes Images 03 March 08
iu.addParam("UploadThumbnail2FitMode", "Fit");
iu.addParam("UploadThumbnail2Width", "500");
iu.addParam("UploadThumbnail2Height", "500");
iu.addParam("UploadThumbnail2JpegQuality", "60");
//End:Configure MedRes Images 03 March 08
iu.addParam("FileMask", "*.jpeg;*.jpg;*.jpe");
iu.addParam("AdditionalFormName", "Form1");
iu.addParam("ShowDebugWindow", "true");
//Configure URL files are uploaded to.
iu.addParam("Action","upload.aspx");
iu.addEventListener("BeforeUpload", "ImageUploader_UploadFileCountChange");
//****For Error COde to check**
iu.addEventListener("Error", "ImageUploaderID_Error");
//*****************************
iu.fullPageLoadListenerName = "fullPageLoad";
iu.writeHtml();
//]]>
</script>
</body>


Mohan attached the following image(s):
ServerErrorFirefox.JPG
Eugene Kosmin  
#6 Posted : Sunday, March 16, 2008 1:52:27 PM(UTC)
Eugene Kosmin

Rank: Advanced Member

Groups: Member, Administration, Moderator
Joined: 9/19/2006(UTC)
Posts: 455

Was thanked: 27 time(s) in 27 post(s)
Please uncomment AddCookie method calling.

As I guess you have a server-side error. Is there any information in Java console?

Also you can try to use ExtractFiles.aspx from our Helper scripts for testing uploaded content. It saves POST content as a plain text file so you can see the difference between Java and ActiveX upload results.

Edited by user Wednesday, October 29, 2008 3:07:37 AM(UTC)  | Reason: Not specified

Best regards,
Eugene Kosmin.
Aurigma Development Team
Mohan  
#7 Posted : Sunday, March 16, 2008 3:20:58 PM(UTC)
Mohan

Rank: Newbie

Groups: Member
Joined: 3/3/2008(UTC)
Posts: 9

Thax for replying sir, but when i uncomment that line addcookie it gives me error "Object reference not set to an instance of an object."
Can u plz tell me...for using FormsAuthentication.FormsCookieName we need to add this event in Global.asax? can we use this directly in default.aspx of Uploader.
I am desprtly waiting for u r reply...

Edited by user Sunday, March 16, 2008 3:24:13 PM(UTC)  | Reason: Not specified

Eugene Kosmin  
#8 Posted : Tuesday, March 18, 2008 5:16:55 PM(UTC)
Eugene Kosmin

Rank: Advanced Member

Groups: Member, Administration, Moderator
Joined: 9/19/2006(UTC)
Posts: 455

Was thanked: 27 time(s) in 27 post(s)
Hello Mohan,

Sorry for the long delay.

I’ve added small code snippet into PRB: Image Uploader for Java looses HTTP-only cookies, maybe it could help. I tested it with the last available IU 5.0.40.
Best regards,
Eugene Kosmin.
Aurigma Development Team
smandros  
#9 Posted : Monday, July 14, 2008 2:02:02 AM(UTC)
smandros

Rank: Member

Groups: Member
Joined: 9/21/2007(UTC)
Posts: 12

I am getting the same issue for two customers that is running IE 6.0 and 7.0.
What do I need to do to fix the issue?
I would appreciate the prompt reply as my customers are getting paid for the images they are uploading and it is becoming a big issue now.
Eugene Kosmin  
#10 Posted : Monday, July 14, 2008 11:49:07 AM(UTC)
Eugene Kosmin

Rank: Advanced Member

Groups: Member, Administration, Moderator
Joined: 9/19/2006(UTC)
Posts: 455

Was thanked: 27 time(s) in 27 post(s)
Hi Svetlana,

If your clients use Java version please try to use code from here: PRB: Image Uploader for Java looses HTTP-only cookies.

Otherwise, try to find out redirection URL through Error event. BTW, when Java used redirect URL is written to console dump.

Do you use redirection in your upload script, maybe after bad data validating or something like that?
Best regards,
Eugene Kosmin.
Aurigma Development Team
Users browsing this topic
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.