By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
458,166 Members | 1,608 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 458,166 IT Pros & Developers. It's quick & easy.

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

P: n/a
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 ] | \
(___(|_|_| [ ko*****@jabber.org ] |_|_|)___)
Jun 27 '08 #1
Share this Question
Share on Google+
4 Replies


P: n/a
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
>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>
Jun 27 '08 #2

P: n/a
Michael Nemtsev [MVP] pisze:
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 ] | \
(___(|_|_| [ ko*****@jabber.org ] |_|_|)___)
Jun 27 '08 #3

P: n/a
Kocureq pisze:
Michael Nemtsev [MVP] pisze:
>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 ] | \
(___(|_|_| [ ko*****@jabber.org ] |_|_|)___)
Jun 27 '08 #4

P: n/a
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>
>Michael Nemtsev [MVP] pisze:
>>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>
Jun 27 '08 #5

This discussion thread is closed

Replies have been disabled for this discussion.