Page 1 of 1

Forms - VB Session identifier

Posted: Thu Aug 19, 2010 5:39 am
by sliceofpie
Hi,
I'm using a simple form to create a password protected login for JFileUpload. I was able to follow the directions to get JFileUpload working with process.aspx but came across "server error HTTP/1.1 302 Found". After doing some research I found out that I need to set

<PARAM NAME="url" VALUE="http://server.com/script.jsp;jsessionid=ABC123">
<PARAM NAME="forward" VALUE="http://server.com/page.jsp;jsessionid=ABC123">

in the applet_http_aspx.js file :? . I tried doing
document.write('url="http://idr/idr/process.aspx?User.Identi ... myUserName" ')
but that doesn't seem to be working.

Can someone point me into the right direction? :|

Re: Forms - VB Session identifier

Posted: Thu Aug 19, 2010 6:06 am
by support
I think you should use cookies instead. See:
http://www.jfileupload.com/products/jfi ... ation.html

Re: Forms - VB Session identifier

Posted: Thu Aug 19, 2010 5:11 pm
by sliceofpie
Thanks for the link. How do I use the session Cookie identifier in VB/ASP.Net?

Is there a sample I can try out? Any suggestion would greatly help me as I've tried getting this to work but haven't succeeded.

Re: Forms - VB Session identifier

Posted: Thu Aug 19, 2010 9:52 pm
by support
You have to check you ASP.NET session cookie is "ASP.NET_SessionId" so you have to get session id value and then setup applet parameter as:

Code: Select all

<PARAM NAME="param6" VALUE="cookiename">
<PARAM NAME="value6" VALUE="ASP.NET_SessionId">
<PARAM NAME="param7" VALUE="cookievalue">
<PARAM NAME="value7" VALUE="<%= YOURSESSIONIDHERE %>">
You have similar sample at:
viewtopic.php?f=2&t=246&p=990&hilit=ASP ... ionId#p990

Re: Forms - VB Session identifier

Posted: Fri Aug 20, 2010 5:52 am
by sliceofpie
I apologize for not completely understanding as I will need some more help. As you can tell I'm a beginnner at this :) But I'm eager to get this figured out.

I'm using the parameters below but still getting a 302 error

Code: Select all

<PARAM NAME="param6" VALUE="cookiename">
<PARAM NAME="value6" VALUE="ASP.NET_SessionId">
<PARAM NAME="param7" VALUE="cookievalue">
<PARAM NAME="value7" VALUE="Session.SessionID">

Re: Forms - VB Session identifier

Posted: Fri Aug 20, 2010 10:27 pm
by sliceofpie
I've figured it out! :arrow: :P

Code: Select all

<param name="param6" value="cookiename">
<param name="value6" value="<%= FormsAuthentication.FormsCookieName %>">
<param name="param7" value="cookievalue">
<param name="value7" value="<%= (FormsAuthentication.FormsCookieName).Value %>">

Re: Forms - VB Session identifier

Posted: Sun Aug 22, 2010 9:09 am
by support
Great. You was using FormsAuthentication API that why's regular ASP.NET session id was not working.