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

Notification

Icon
Error

Options
Go to last post Go to first unread
alberto  
#1 Posted : Wednesday, January 9, 2008 7:57:51 PM(UTC)
alberto

Rank: Newbie

Groups: Member
Joined: 1/9/2008(UTC)
Posts: 5

I'm facing an issue with the java applet version of Image uploader (using FireFox).

This is, shortly, my configuration:

Code:
function ImageUploader1_BeforeUpload()
{
	getImageUploader("ImageUploader").AddCookie('.ASPXAUTH=XXXXXXXX');
	getImageUploader("ImageUploader").AddCookie('ANOTHERCOOKIE=XXXXXXX');
}

var iu = new ImageUploaderWriter("ImageUploader", 650, 450);

iu.addParam("FileMask", "*.jpg;*.gif;*.png");
iu.addParam("Action", "/Upload.aspx");
iu.addParam("ShowDebugWindow", "true");
iu.addParam("AdditionalFormName", "aspnetForm");
iu.addParam("RedirectUrl", "/MyPage.aspx");

iu.activeXControlCodeBase = "/ThirdParty/ImageUploader/ImageUploader4.cab";
iu.activeXControlVersion = "4,5,50,0";
iu.activeXControlEnabled = true;

iu.javaAppletCodeBase = "/ThirdParty/ImageUploader/";
iu.javaAppletVersion = "2.5.50.0";
iu.javaAppletEnabled = true;

iu.addEventListener("BeforeUpload", "ImageUploader1_BeforeUpload");

iu.writeHtml();

As you can see, I need to send two cookies.

With ActiveX version I've not encountered any problem, the upload works fine.

With Java Applet version, instead, I receive the message "Page to upload is unaccessible".

In every request of my application the event PreRequestHandlerExecute is handled by an HttpModule.

That's something like this:

Code:
void context_PreRequestHandlerExecute(Object sender, EventArgs e)
{
	Debug.WriteLine(application.Context.Request.AppRelativeCurrentExecutionFilePath);

	HttpApplication application = (HttpApplication)sender;
    	if ((application.Context.User != null) &&
      		(application.Context.User.Identity.IsAuthenticated))
     	{
        	Int32 cookieValue = GetCookieValue(application.Context);
                if (cookieValue > 0)
        		application.Context.Items.Add("MyItem", GetMyObjectFromCookie(cookieValue));
   	}
}

It's strange, but my debugger never prints the value "Upload.aspx".

This value, instead, is printed using the ActiveX version of the component.

We've already bought some licenses, but newer version of our application make use of this HttpModule.

Did you face my problem before?

Regards,

Alberto Bartoli

Edited by user Sunday, February 10, 2008 6:44:54 PM(UTC)  | Reason: Not specified

Alex Makhov  
#2 Posted : Thursday, January 10, 2008 4:03:36 PM(UTC)
Alex Makhov

Rank: Advanced Member

Groups:
Joined: 8/3/2003(UTC)
Posts: 998

Hello Alberto,

AddCookie method should be called only once so if you want to add two cookies, you should call AddCookie with your two cookie values separated with standard cookie separator (I think it is ";"). Try it and I hope it helps.

Sincerely yours,

Alex Makhov

UserPostedImage Follow Aurigma on Twitter!

Users browsing this topic
Guest
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.