Connecting Tech Pros Worldwide Forums | Help | Site Map

"Logging in" to a specific session with asp.net session provider

Kocureq
Guest
 
Posts: n/a
#1: Jun 27 '08
Hi all,

I'm using a default, InProc ASP.NET session provider, ASP.NET 3.5.

I want to use a nice flash file uploader. The problem with it is that it
can't send cookies with the files, so I don't know on ASP.NET from which
client the files are comming.

I can modify the form action parameter with javascript to say, e.g.
upload.aspx?sessionID=X, where X is ASP.NET session ID read from cookie.
However, I can't find a way to access a specific session on ASP.NET. Is
it possible?
--
/\ /\ [ Jakub 'Kocureq' Anderwald ] /\ /\
=^;^= [ [nick][at][nick].com ] =^;^=
/ | [ GG# 1365999 ICQ# 31547220 ] | \
(___(|_|_| [ kocureq@jabber.org ] |_|_|)___)

Michael Nemtsev [MVP]
Guest
 
Posts: n/a
#2: Jun 27 '08

re: "Logging in" to a specific session with asp.net session provider


Hello Kocureq,

JS runs on client, and your session in serverside stuff.
There is no standard way to access your session in js if you are not using
hidden fields or ajax
Quote:
Quote:
>so I don't know on ASP.NET from which client the files are comming.
what exactly do u need to get?! user name or what?


---
WBR,
Michael Nemtsev [.NET/C# MVP] :: blog: http://spaces.live.com/laflour

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo


KHi all,
K>
KI'm using a default, InProc ASP.NET session provider, ASP.NET 3.5.
K>
KI want to use a nice flash file uploader. The problem with it is that
Kit can't send cookies with the files, so I don't know on ASP.NET from
Kwhich client the files are comming.
K>
KI can modify the form action parameter with javascript to say, e.g.
Kupload.aspx?sessionID=X, where X is ASP.NET session ID read from
Kcookie. However, I can't find a way to access a specific session on
KASP.NET. Is it possible?
K>


Kocureq
Guest
 
Posts: n/a
#3: Jun 27 '08

re: "Logging in" to a specific session with asp.net session provider


Michael Nemtsev [MVP] pisze:
Quote:
JS runs on client, and your session in serverside stuff.
There is no standard way to access your session in js if you are not
using hidden fields or ajax
I don't want to access it.

See, I have a flash upload "widget", that uploads files nicely to my
ASP.NET website, but doesn't send the session cookies.

In ASP.NET I need to know which user has sent me the file - so I have to
access this user's session. One method I thought of is to use Javascript
to take out the session ID from cookie and send it with the picture,
e.g. modify the form action from

upload.aspx

to

upload.aspx?session_id=9uu8053ungwe8ryt83

so I can get the session ID on ASP.NET side.

However, I need a way to tell ASP.NET "here's the session ID - use this
one".

--
/\ /\ [ Jakub 'Kocureq' Anderwald ] /\ /\
=^;^= [ [nick][at][nick].com ] =^;^=
/ | [ GG# 1365999 ICQ# 31547220 ] | \
(___(|_|_| [ kocureq@jabber.org ] |_|_|)___)
Kocureq
Guest
 
Posts: n/a
#4: Jun 27 '08

re: "Logging in" to a specific session with asp.net session provider


Kocureq pisze:
Quote:
Michael Nemtsev [MVP] pisze:
>
Quote:
>JS runs on client, and your session in serverside stuff.
>There is no standard way to access your session in js if you are not
>using hidden fields or ajax
>
I don't want to access it.
>
See, I have a flash upload "widget", that uploads files nicely to my
ASP.NET website, but doesn't send the session cookies.
>
In ASP.NET I need to know which user has sent me the file - so I have to
access this user's session. One method I thought of is to use Javascript
to take out the session ID from cookie and send it with the picture,
e.g. modify the form action from
>
upload.aspx
>
to
>
upload.aspx?session_id=9uu8053ungwe8ryt83
>
so I can get the session ID on ASP.NET side.
>
However, I need a way to tell ASP.NET "here's the session ID - use this
one".
Can anyone please help?

Or maybe there is a better, ASP.NET-compatible fancy multi-file upload
with real progress bar?

--
/\ /\ [ Jakub 'Kocureq' Anderwald ] /\ /\
=^;^= [ [nick][at][nick].com ] =^;^=
/ | [ GG# 1365999 ICQ# 31547220 ] | \
(___(|_|_| [ kocureq@jabber.org ] |_|_|)___)
Michael Nemtsev [MVP]
Guest
 
Posts: n/a
#5: Jun 27 '08

re: "Logging in" to a specific session with asp.net session provider


Hello Kocureq,

I hope this sample will help http://www.codeproject.com/KB/webfor...gress_Bar.aspx

---
WBR,
Michael Nemtsev [Microsoft MVP] :: blog: http://spaces.live.com/laflour

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo


KKocureq pisze:
K>
Quote:
Quote:
>Michael Nemtsev [MVP] pisze:
>>
Quote:
>>JS runs on client, and your session in serverside stuff.
>>There is no standard way to access your session in js if you are not
>>using hidden fields or ajax
>I don't want to access it.
>>
>See, I have a flash upload "widget", that uploads files nicely to my
>ASP.NET website, but doesn't send the session cookies.
>>
>In ASP.NET I need to know which user has sent me the file - so I have
>to access this user's session. One method I thought of is to use
>Javascript to take out the session ID from cookie and send it with
>the picture, e.g. modify the form action from
>>
>upload.aspx
>>
>to
>>
>upload.aspx?session_id=9uu8053ungwe8ryt83
>>
>so I can get the session ID on ASP.NET side.
>>
>However, I need a way to tell ASP.NET "here's the session ID - use
>this one".
>>
KCan anyone please help?
K>
KOr maybe there is a better, ASP.NET-compatible fancy multi-file
Kupload with real progress bar?
K>


Closed Thread